On Wed, 30 Dec 2015 22:12:37 -0600, Dale R. Smith wrote: > >According to the TSO REXX Reference, if "*" is used with DISKW and a STEM, >then stem.0 is ignored and it writes stem. records until it finds either a >null record or an uninitialized stem value. For example, it you read a member >of a PDS into STEM mem. and the member contained 100 records, (mem.0 = 100), >then you wrote the stem to another member or file with EXECIO * DISKW and >(STEM MEM., it would write 100 records to the file, (mem.101 is not set). If >you now read a PDS member with 90 records into the same stem name, (mem.0 = >90), and you wrote it out with EXECIO * DISKW and (STEM MEM., then it would >write the 90 records from the current member and the last 10 records from the >previous member! Not good! > All this provided that the input file contains no null record in which case it would stop even sooner, at that null record. Such a null record is what caused the OP's problem.
>It would be best to use "EXECIO" mem.0 "DISKW" instead of "*" or to "Drop >mem." after the write and before the next read. If the REXX program is >processing a lot of members, it may be a good idea to do both, because >dropping the stem will free up storage. > Dropping does not eliminate the hazard of the null record. Do both. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
