From: Jeff H. <Je...@Je...> - 2020-04-02 12:15:01
|
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <p>Can you do this and have it work?:</p> <p><font face="Century Gothic"><font face="Courier New, Courier, monospace">do </font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> loop forever</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> . . . peekto…</font></font></p> <p><font face="Century Gothic"><font face="Courier New, Courier, monospace"> do </font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> . . . process input record . . .</font></font></p> <p><font face="Century Gothic"><font face="Courier New, Courier, monospace"> catch </font></font><font face="Century Gothic"><font face="Courier New, Courier, monospace">UnknownHostExceptiom</font></font></p> <p><font face="Century Gothic"><font face="Courier New, Courier, monospace"> </font></font><font face="Century Gothic"><font face="Courier New, Courier, monospace">handle problem</font></font></p> <p><font face="Century Gothic"><font face="Courier New, Courier, monospace"> end</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> . . . output. . .</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> . . . readto. . .</font></font><br> <br> <font face="Century Gothic"><font face="Courier New, Courier, monospace">-- catch UnknownHostExceptiom</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace">-- do</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace">-- . . . handle problem. . .</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace">-- . . . output. . .</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace">-- . . . readto. . .</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace">-- . . . << here I want to head up to forever loop to do next record>>. .</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> </font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace">-- catch StageError</font></font><br> <br> <font face="Century Gothic"><font face="Courier New, Courier, monospace">-- end /*do UnknownHostException */ </font></font><br> <br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> catch StageError</font></font><br> <br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> end /*do loop forever */</font></font></p> <div class="moz-cite-prefix">On 3/31/2020 11:35 PM, ColinK wrote:<br> </div> <blockquote type="cite" cite="mid:407...@im..."> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <font face="Century Gothic">I am working on creating the NetRexx pipeline filter that mimics the VM/CMS filter HOSTBYNAME and I have run into a problem that I am not sure how to get around (perhaps partly because I am not very Java savvy).<br> <br> When a hostname is passed to the routine that cannot be resolved an UnknownHostException is thrown. I can catch this (in fact I have to catch it since it is a checked exception) and handle it but how do I get back up into the main forever loop to process the next input record? It seems that once I am in a catch section the stage collapses. The Rexx iterate statement does not work since it is not in the first ‘instructionlist’ section. <br> <font face="Courier New, Courier, monospace"><br> </font></font> <blockquote><font face="Century Gothic"><font face="Courier New, Courier, monospace">do </font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> loop forever</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> . . . peekto…</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> . . . process input record . . .</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> . . . output. . .</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> . . . readto. . .</font></font><br> <br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> catch UnknownHostExceptiom</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> do</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> . . . handle problem. . .</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> . . . output. . .</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> . . . readto. . .</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> . . . << here I want to head up to forever loop to do next record>>. .</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> </font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> catch StageError</font></font><br> <br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> end /*do UnknownHostException */ </font></font><br> <br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> catch StageError</font></font><br> <br> <font face="Century Gothic"><font face="Courier New, Courier, monospace"> end /*do loop forever */</font></font><br> </blockquote> <font face="Century Gothic"> <br> It would be interesting to see how a real VM/CMS system handles the following:</font><br> <blockquote><font face="Century Gothic"><font face="Courier New, Courier, monospace"><font face="Century Gothic"><font face="Courier New, Courier, monospace"> pipe "(end ?) literal <a class="moz-txt-link-abbreviated" href="http://www.shaw.ca;dns.google;bogus.bogus;www.google.ca" moz-do-not-send="true">www.shaw.ca;dns.google;bogus.bogus;www.google.ca</a> | split string /;/ | h: hostbyname | console<br> <br> </font></font>pipe "(end ?) literal <a class="moz-txt-link-abbreviated" href="http://www.shaw.ca;dns.google;bogus.bogus;www.google.ca" moz-do-not-send="true">www.shaw.ca;dns.google;bogus.bogus;www.google.ca</a> | split string /;/ | h: hostbyname | console ? h: | insert ,Bad: , BEFORE | console"</font></font><br> </blockquote> <font face="Century Gothic"><br> Right now my grand attempt pumps out the following:<br> </font> <blockquote><font face="Century Gothic"><font face="Courier New, Courier, monospace">Z:\NetRexx-3.08-GA\bin>pipe "(end ?) literal <a class="moz-txt-link-abbreviated" href="http://www.shaw.ca;dns.google;bogus.bogus;www.google.ca" moz-do-not-send="true">www.shaw.ca;dns.google;bogus.bogus;www.google.ca</a> | split string /;/ | h: hostbyname | console</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace">23.6.246.208</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace">8.8.4.4 8.8.8.8</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace">Input record 3: Unable to determine IP address for bogus.bogus</font></font><br> </blockquote> <blockquote><font face="Century Gothic"><font face="Courier New, Courier, monospace"><font face="Century Gothic"><font face="Courier New, Courier, monospace">Z:\NetRexx-3.08-GA\bin></font></font>pipe "(end ?) literal <a class="moz-txt-link-abbreviated" href="http://www.shaw.ca;dns.google;bogus.bogus;www.google.ca" moz-do-not-send="true">www.shaw.ca;dns.google;bogus.bogus;www.google.ca</a> | split string /;/ | h: hostbyname | console ? h: | insert ,Bad: , BEFORE | console"</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace">23.6.246.208</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace">8.8.4.4 8.8.8.8</font></font><br> <font face="Century Gothic"><font face="Courier New, Courier, monospace">Input record 3: Unable to determine IP address for bogus.bogus</font></font><br> </blockquote> <font face="Century Gothic">Note that the 4th hostname does not appear to be processed.<br> <br> Is there some kind of trick in handling this scenario.<br> <br> Thanks.<br> Colin<br> <br> </font> <br> <fieldset class="mimeAttachmentHeader"></fieldset> <br> <fieldset class="mimeAttachmentHeader"></fieldset> <pre class="moz-quote-pre" wrap="">_______________________________________________ netrexx-pipelines mailing list <a class="moz-txt-link-abbreviated" href="mailto:net...@li...">net...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines">https://lists.sourceforge.net/lists/listinfo/netrexx-pipelines</a> </pre> </blockquote> </body> </html> |