Job step:-
//PS015 EXEC PGM=IKJEFT01,PARM='CDESTRFN &FNM1'
//SYSEXEC DD DSN=THI.REXX.LIB,DISP=SHR
//SYSTSPRT DD SYSOUT=&SOUTA
//SYSTSIN DD DUMMY
//SYSEXEC DD DSN=THI.REXX.LIB,DISP=SHR
//SYSTSPRT DD SYSOUT=&SOUTA
//SYSTSIN DD DUMMY
REXX:-
arg infile
call ENC_Infile_Strip
call say_messages
exit rc
ENC_Infile_Strip:
x=outtrap(on.)
x=outtrap(rec1.)
Address "TSO"
"LISTC ENT('"infile"')"
if rc ¬= 0 then exit rc
x=outtrap(off)
do x = 1 to rec1.0
if pos("NONVSAM",rec1.x) > 0
then do
f1 = substr(rec1.x,36,15)
end
end
return
say_messages:
say " "
say " Filename string passed to job: "f1
say " "
return
call ENC_Infile_Strip
call say_messages
exit rc
ENC_Infile_Strip:
x=outtrap(on.)
x=outtrap(rec1.)
Address "TSO"
"LISTC ENT('"infile"')"
if rc ¬= 0 then exit rc
x=outtrap(off)
do x = 1 to rec1.0
if pos("NONVSAM",rec1.x) > 0
then do
f1 = substr(rec1.x,36,15)
end
end
return
say_messages:
say " "
say " Filename string passed to job: "f1
say " "
return
I want to use f1 value in job to produce new filename. Please let me know how to achieve this.