HI,
I need to retrieve the data from spool corresponding to ddname & step name..
When am trying to do it say "SYSIN" is my ddname & "TSCRACTH" is my step name..There are more than one SYSIN so the data i need is corresponding to TSCRACTH stepname, but it is getting retrieved from the first SYSIN only..
Here is the code i have tried..
/***************REXX**************/
ADDRESS TSO
"alloc f(isfin) tracks space(1) reu" /* used by sdsf */
"alloc f(isfout) new delete reu " , /* used by sdsf */
"tracks space(100,100) lrecl(133) recfm(f,b,a) dsorg(ps)"
"alloc f(temp1) da('z198.SAMPLE.output1') shr"
/*SAY 'ENTER JOBID:'
PULL ID
jobid = strip(ID)
JOBID = 'JOB02911'
SAY 'ENTER JOBNAME:'
PULL JNAME
JOBNM = STRIP(JNAME) */
RC = ISFCALLS(ON)
ISFPREFIX = "TB796"
ADDRESS SDSF "ISFEXEC ST"
IF RC <> 0 THEN
DO
SAY 'ERROR'
EXIT 20
END
LOOP = ISFROWS
DO I = 1 TO LOOP
COLVAL = VALUE(JOBID.I)
IF COLVAL = 'JOB07050' THEN
DO
ADDRESS SDSF "ISFACT ST TOKEN('"TOKEN.I"') PARM(NP ?)"
IF RC <> 0 THEN EXIT
DO J = 1 TO STEPN.0
IF STEPN.J = 'TSCRATCH' THEN
IF DDNAME.J = 'SYSIN' THEN
do
QUEUE "PRE" TB796
queue "st"
/*queue "filter jobid eq "jobid*/
QUEUE "FIND " COLVAL
queue "++?" /* open output of job */
queue "find" SYSIN
queue "++S"
say ' am after sysin '
queue "print file temp1" /* print to temp dataset */
queue "print 1 999999"
queue "print close"
queue "end"
queue "exit"
"execio" queued()" diskw isfin (finis" /* input to sdsf batch */
address ispexec "select pgm(isfafd) parm('++25,80')"/* invoke sdsf */
END
END
END
END
RC = ISFCALLS(OFF)
--------------X--------------