On Mon, 8 Sep 2014 09:08:47 -0500, John McKown <[email protected]> wrote: > >Possible REXX program: > >/* rexx */ >data='' >CRLF='0D25'X >do forever > "execio 1 diskr sysut1" > if rc <> 0 then leave > parse pull record > data=data||record > i=pos(CRLF,data) > do while i <> 0; > output=left(data,i-1); > queue output > "execio 1 diskw sysut2" > data=substr(data,i+2) > i=pos(CRLF,data) > end >end >i=pos(CRLF,data) >do while i <> 0; > output=left(data,i-1); > queue output > "execio 1 diskw sysut2" > data=substr(data,i+2) > i=pos(CRLF,data) >end >"execio 0 diskr sysut1(finis" >"execio 0 diskw sysut2(finis" >
You know REXX better than I do - I couldn't have written this in such a short time. But is it not possible that in rare cases the original data might have been split into separate records right between the '0D'X and the '25'X, in which case this would produce problematic results? Just wanted to mention it. Bill ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
