by samurai » Tue Mar 25, 2014 9:23 pm
Hello pedro,
Thanks for the info, i can read all the data inside ps using ALLOC and EXECIO as below code:
"ALLOC F(IN) DS('MX9C.SAMPLE.JCL')SHR"
"EXECIO * DISKR IN(FINIS STEM INP."
"FREE F(IN)"
DO I = 1 TO INP.0
SAY INP.I
END
"ALLOC F(OUT) DS('MX9C.SAMPLE.JCL')SHR"
"EXECIO * DISKW OUT(FINIS STEM OUT."
"FREE F(OUT)"
Can you tell me how to edit the PDS inside a PS that i have mentioned in ALLOC
my ps contains 2 pds as shown below
MX9C.SAMPLEF.JCL ----> PS
MX9C.SAMPLE1.JCL
MX9C.SAMPLE2.JCL
the above is the PDS inside PS
and each pds has SAM1 as member name in which i need to apply c all xxxx to yyyy
FYI: i have written the below code to change in a member of a single PDS:
"ALLOC F(INFILE) SHR DS('MX9C.SAMPLE1.JCL(SAM1)')"
"EXECIO * DISKR INFILE (STEM RECD. FINIS"
HOW_MANY = RECD.0
DO C = 1 TO HOW_MANY
STRT = POS('NOTIFY=&SYSUID,',RECD.C)
SAY STRT ' STRT POS'
DO WHILE STRT > 0
SAY RECD.C
LN = LEFT(RECD.C,STRT-1)||'USER =RU99,NOTIFY=MX9C,'
RECD.C=LN
STRT=POS(IDCAMS,RECD.C)
SAY RECD.C
END
END C
"ALLOC F(OUTFILE) SHR DS('MX9C.SAMPLE1.JCL(SAM1)')"
"EXECIO * DISKW OUTFILE (STEM RECD. FINIS"