From: ColinK <ibm...@im...> - 2020-04-01 03:35:29
|
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). 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. do loop forever . . . peekto… . . . process input record . . . . . . output. . . . . . readto. . . catch UnknownHostExceptiom do . . . handle problem. . . . . . output. . . . . . readto. . . . . . << here I want to head up to forever loop to do next record>>. . catch StageError end /*do UnknownHostException */ catch StageError end /*do loop forever */ It would be interesting to see how a real VM/CMS system handles the following: pipe "(end ?) literal www.shaw.ca;dns.google;bogus.bogus;www.google.ca | split string /;/ | h: hostbyname | console pipe "(end ?) literal www.shaw.ca;dns.google;bogus.bogus;www.google.ca | split string /;/ | h: hostbyname | console ? h: | insert ,Bad: , BEFORE | console" Right now my grand attempt pumps out the following: Z:\NetRexx-3.08-GA\bin>pipe "(end ?) literal www.shaw.ca;dns.google;bogus.bogus;www.google.ca | split string /;/ | h: hostbyname | console 23.6.246.208 8.8.4.4 8.8.8.8 Input record 3: Unable to determine IP address for bogus.bogus Z:\NetRexx-3.08-GA\bin>pipe "(end ?) literal www.shaw.ca;dns.google;bogus.bogus;www.google.ca | split string /;/ | h: hostbyname | console ? h: | insert ,Bad: , BEFORE | console" 23.6.246.208 8.8.4.4 8.8.8.8 Input record 3: Unable to determine IP address for bogus.bogus Note that the 4th hostname does not appear to be processed. Is there some kind of trick in handling this scenario. Thanks. Colin |