From: Jeff H. <Je...@Je...> - 2023-01-15 13:25:56
|
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <p>Leslie,</p> <p>I think I may have our solution. Look at this.</p> <br> <div style="display:inline-block;white-space:pre;background-color:#012456;font-family:'Cascadia Code',monospace;font-size:10pt;padding:4px;"><span style="color:#D3D7CF;background-color:#012456;">PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> </span><span style="color:#FCE94F;background-color:#012456;">pipe </span><span style="color:#06989A;background-color:#012456;">"(getHelp) < getOOrexxDocs.nrx | console" </span><span style="color:#D3D7CF;background-color:#012456;">some start lines /* -- Help File Text Start - some interior lines */ -- Help File Text End - some end lines PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> </span><span style="color:#FCE94F;background-color:#012456;">pipe </span><span style="color:#06989A;background-color:#012456;">"(getHelp) < getOOrexxDocs.nrx | inside %/* -- Help File Text Start -% %*/ -- Help File Text End -% | console" </span><span style="color:#D3D7CF;background-color:#012456;">PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes></span></div> <p></p> <div class="moz-cite-prefix">No output!</div> <div class="moz-cite-prefix"><br> </div> <div class="moz-cite-prefix">Can you spot the difference?</div> <div class="moz-cite-prefix"><br> </div> <div class="moz-cite-prefix">I have put a space in front of the comments.</div> <div class="moz-cite-prefix"><br> </div> <blockquote> <div class="moz-cite-prefix"><i>inside</i> <b>Select Records between Labels</b></div> <blockquote> <div class="moz-cite-prefix"><i>inside</i> selects groups of records whose first record follows a record that begins with a specified string. The end of each group can be specified by a count of records to select, or as a string that must be at the beginning of the first record after the group. </div> </blockquote> </blockquote> <p>So while we have been chasing the delimiter character, all along the stage and pipe were doing exactly what they should, with any of the tested delimiters. In thinking about this, I was about to suggest using the <i>between </i>stage<i>, </i>but it too works with labels at the beginning of the records.</p> <p>The suggested alternative in the CMS reference is:</p> <p> <blockquote type="cite">3. <i>pick</i> can do what <i>inside </i>does and much more.</blockquote> Unfortunately, the NetRexx <i>pick</i> implementation is currently incomplete. That "much more" is a bear. We are lacking the <i>from/to</i> options that we need here. Someday, I hope, someone will -- since this is all volunteer driven open source software -- improve our <i>pick</i>. Even if only incrementally.<br> </p> <p>At the moment, all I can suggest is in your <i>inside</i> options to put in the exact number of SPACE characters to match the file's records.</p> <div style="display:inline-block;white-space:pre;background-color:#012456;font-family:'Cascadia Code',monospace;font-size:10pt;padding:4px;"><span style="color:#D3D7CF;background-color:#012456;">PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> </span><span style="color:#FCE94F;background-color:#012456;">pipe </span><span style="color:#06989A;background-color:#012456;">"(getHelp) < getOOrexxDocs.nrx | inside % /* -- Help File Text Start -% % */ -- Help File Text End -% | console" </span><span style="color:#D3D7CF;background-color:#012456;">some interior lines PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes></span></div> <p></p> <div class="moz-cite-prefix">Jeff</div> <div class="moz-cite-prefix"><br> </div> <div class="moz-cite-prefix">On 1/13/2023 11:04 PM, J Leslie Turriff wrote:<br> </div> <blockquote type="cite" cite="mid:202...@ma..."> <pre class="moz-quote-pre" wrap=""> I have several accounts on my machine. One returns absolutely nothing; the other sets return code 13. I wonder, is NetRexx sensitive to the version of Java in use? I recently upgraded from Java 18 to Java 19; is that significant? Leslie On 2023-01-12 09:22:11 Jeff Hennick wrote: </pre> <blockquote type="cite"> <pre class="moz-quote-pre" wrap="">Leslie, I am not sure what is going on. If there is some setting in your system or shell that is causing the problem. Could it not like the "/*"? (Or "like" it too well?) I have not been able to duplicate the problem on my Windows 10 system in PowerShell. I'm not working with the full file -- I'm not sure where/how to get it -- so first here is my test file, then the results from your pipe, which was copy and pasted from your posting. PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> pipe "(getHelp) < getOOrexxDocs.nrx | console" some start lines /* -- Help File Text Start - some interior lines */ -- Help File Text End - some end lines PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> pipe "(getHelp) < getOOrexxDocs.nrx | inside %/* -- Help File Text Start -% %*/ -- Help File Text End -% | console" some interior lines PS C:\Users\Jeff\Documents\nr\netrexx-code\examples\pipes> Are you getting some error message? No output with an abnormal return code? </pre> </blockquote> <pre class="moz-quote-pre" wrap=""> </pre> </blockquote> </body> </html> |