Can you, please help me with an idea: I am writing a REXX program in TSO that reads all the files in PDS1 and let's say writes line by line all the files into PDS2. My problem is:
- I read a file1 of 1500 lines ; I write a file1 of 1500 lines in PDS2
- I read a file2 of 200 lines ; I write a file2 of 1500 lines in PDS2 . The extra lines are from the file1 !
- I read a file3 of 2500 lines ; I write a file3 of 2500 lines in PDS2
I'm not able to see where my problem is. The code is as follows:
ADDRESS TSO "ALLOC DA("newDS") FI(infile4) SHR"
ADDRESS TSO "ALLOC DA("newDSO") FI(outfile)"
................
S= RES.0
DO q = 7 TO S
RES.q = STRIP(RES.q)
...........
ADDRESS TSO "EXECIO * DISKR infile4 (STEM LINE. FINIS"
do until i > line.0
ADDRESS TSO "EXECIO * DISKR infile4 (STEM LINE. FINIS"
......
ADDRESS TSO "EXECIO * dISKW outfile (STEM lineo. FINIS"
......
i = i + 1
end
ADDRESS TSO "FREE FI(infile4)"
ADDRESS TSO "FREE FI(outfile)"
END
Thanks in advance