I am writing a rexx in which new member is allocated and in each member I am writing few line of code, all this had been done in single rexx.
Issue that I am facing first member lines are being override in consecutive member, Below is the code:-
/* REXX */
PDS = "XYZ.TEST.IN"
PDS4 = "ABC.TEST.OUT"
pds1 = pds || "("||MAINPROC||")"
"ALLOC FI(PDS1) DA('"PDS1"') SHR REUSE"
"EXECIO * DISKR PDS1 (STEM PROC1. FINIS"
"FREE FI(PDS1)"
SAY 'ENTER NUMBER OF MEMBER'
PULL NOM
DO P=1 TO NOM
SAY 'ENTER MEMBER NAME'
PULL NEWMWMB
SAY 'ENTER LINES TO BE COPIED'
PULL LINE
pds2 = pds4 || "("||newmemb||")"
"ALLOC FI(PDS2) DA('"PDS2"') SHR REUSE"
DO J=1 TO LINE
PROCO.J = PROC1.J
"execio * diskw pds2(stem proco.finis")
END
END
EXIT
This issue somewhere related to while allocation of new member.Kindly help me on this.
Thanks in advacnce.