THE name of rexx prog is REXXGETS.
The rexx prog is :
jobname = 'XMITJ'
queue 'set confirm off'
queue 'owner *'
queue 'prefix *'
queue 'h'
queue 'select 'jobname
queue 'afd refresh'
queue 'find 'jobname
queue ''
'execio * diskw isfin (finis'
parm = '/ ++20,500'
address linkpgm 'sdsf parm'
'execio * diskr isfout (stem tmpline. finis'
say tmpline.0
posjobname = 0
posjobid = 0
posmaxrc = 0
do i = 1 to tmpline.0 while posjobname = 0
posjobname = index(tmpline.i, 'JOBNAME')
posjobid = index(tmpline.i, 'JobID')
posmaxrc = index(tmpline.i, 'Max-RC')
if posjobname > 0 then
do
say 'posjobname = ' posjobname
say 'posjobid = ' posjobid
say 'posmaxrc = 'posmaxrc
end
end
do i = 1 to tmpline.0
if(pos(jobname,tmpline.i)) > 0 then
do
say 'tmpline.i = ' tmpline.i
jobname1 = strip(substr(tmpline.i, posjobname ,8 )
jobid = strip(substr(tmpline.i, posjobid, 7)
maxrc = strip(substr(tmpline.i, posmaxrc, 10))
end
end
say 'jobname = ' jobname1
say 'jobid = ' jobid
say 'maxrc = ' maxrc
queue 'set confirm off'
queue 'owner *'
queue 'prefix *'
queue 'h'
queue 'select 'jobname
queue 'afd refresh'
queue 'find 'jobname
queue ''
'execio * diskw isfin (finis'
parm = '/ ++20,500'
address linkpgm 'sdsf parm'
'execio * diskr isfout (stem tmpline. finis'
say tmpline.0
posjobname = 0
posjobid = 0
posmaxrc = 0
do i = 1 to tmpline.0 while posjobname = 0
posjobname = index(tmpline.i, 'JOBNAME')
posjobid = index(tmpline.i, 'JobID')
posmaxrc = index(tmpline.i, 'Max-RC')
if posjobname > 0 then
do
say 'posjobname = ' posjobname
say 'posjobid = ' posjobid
say 'posmaxrc = 'posmaxrc
end
end
do i = 1 to tmpline.0
if(pos(jobname,tmpline.i)) > 0 then
do
say 'tmpline.i = ' tmpline.i
jobname1 = strip(substr(tmpline.i, posjobname ,8 )
jobid = strip(substr(tmpline.i, posjobid, 7)
maxrc = strip(substr(tmpline.i, posmaxrc, 10))
end
end
say 'jobname = ' jobname1
say 'jobid = ' jobid
say 'maxrc = ' maxrc
when I use EXEC in front of member in ds,like this: EXEC REXXGETS
it can generate right result.
when i use the job to submit the REXX,it can generate wrong result.
//GETSTEP EXEC PGM=IKJEFT01,COND=(4,LT)
//SYSEXEC DD DSN=TMAP006.BAT.SRCLIB,DISP=SHR
//ISFIN DD DSN=TMAP006.BAT.ISFIN,DISP=(NEW,CATLG),UNIT=3390,
// VOL=SER=SYSNEW,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920),
// SPACE=(TRK,(30,30))
//ISFOUT DD DSN=TMAP006.BAT.ISFOUT,DISP=(NEW,CATLG),UNIT=3390,
// VOL=SER=SYSNEW,
// DCB=(RECFM=FBA,LRECL=301,BLKSIZE=27993),
// SPACE=(CYL,(30,30))
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
REXXGETS
/*
//SYSEXEC DD DSN=TMAP006.BAT.SRCLIB,DISP=SHR
//ISFIN DD DSN=TMAP006.BAT.ISFIN,DISP=(NEW,CATLG),UNIT=3390,
// VOL=SER=SYSNEW,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920),
// SPACE=(TRK,(30,30))
//ISFOUT DD DSN=TMAP006.BAT.ISFOUT,DISP=(NEW,CATLG),UNIT=3390,
// VOL=SER=SYSNEW,
// DCB=(RECFM=FBA,LRECL=301,BLKSIZE=27993),
// SPACE=(CYL,(30,30))
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
REXXGETS
/*