Page 2 of 2

Re: COMMAND NOT FOUND

PostPosted: Wed Sep 11, 2019 9:58 pm
by sergeyken
samb01 wrote:Sorry but as you can see, my output dataset are in SHR and it works :

but i can't understand what is for you "output portion (sorry for my english...)


As "portion" I meant "the group of records going to the same file".

Since you are using keyword (FINIS after each record being written to the file, then every subsequent EXECIO for the same file will need to re-open it again before writing new line (and closing it again after that). When there is no explicit option (OPEN the file in REXX is open automatically if was closed before the I/O begins. Besides of absolute stupidity and inefficiency of performing the whole sequence of OPEN-WRITE-CLOSE for every line going to the file, as per zOS consideration, every new OPEN for output file without DISP=MOD, or DISP=NEW, or SYSOUT=* will position the file at the beginning of it before output begins, and hence overriding all its previous content.

I have been faced this issue so many times in my life that I don't want to run extra test just to demonstrate it to those who doesn't want to learn something.

I gave you an advice. You can accept it, or not, it's up to you.