Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
/* REXX */
/* Receive MAXRC out of SDSF
Parameter:
jobname - JobName of the submitted job
jobid - JobID of the submitted job
*/
arg jobname jobid
address TSO
if(jobname = "")
then do
return "XXMAXRC> JobId empty"
end
if(jobid = "")
then do
return "XXMAXRC> JobId empty"
end
maxrc = ""
/* write SDSF Commands to QUEUE */
queue "SET CONFIRM OFF"
queue "OWNER *"
queue "PREFIX *"
queue "H"
queue "SELECT "jobname jobid
queue "AFD REFRESH"
queue "FIND "jobname
queue "END"
queue ""
/* allocate in-/out-dataset */
"alloc dd(isfin) new reuse unit(vioda)",
"recfm(f,b) lrecl(80) blksize(27920) space(1) tracks"
"alloc dd(isfout) new reuse unit(vioda)",
"recfm(f,b,a) lrecl(301) blksize(27993) space(1) cyl"
/* write input-dataset from QUEUE */
"execio * diskw isfin (finis"
/* SDSF-Call */
PARM = "/ ++20,400"
address LINKPGM "SDSF PARM"
/* read isfout in out. */
"execio * diskr isfout (stem out. finis"
"free dd(isfin,isfout)"
do i=1 to out.0 by 1
if(pos(jobname,out.i) ^= 0 & pos(jobid,out.i) ^= 0)
then do
maxrc = substr(out.i,276)
leave
end
end
/* */
/* Alter ReturnCodes */
/* */
if(maxrc = "")
then do
maxrc = "XXMAXRC> JobId empty"
end
else do
/* Returncode = 'CC 0000' ===> 'R0000' */
if(left(maxrc,2) = "CC")
then maxrc = "R"!!SUBSTR(maxrc,4,4)
/* Returncode = 'ABENDU3501' ===> 'U3501' */
if(left(maxrc,6) = "ABENDU")
then maxrc = "U"!!SUBSTR(maxrc,7,4)
/* Returncode = 'ABEND S0C7' ===> 'S0C7 ' */
if(left(maxrc,7) = "ABEND S")
then maxrc = SUBSTR(maxrc,7,4)
/* other RCs (=HighRC) ===> 'X'RC */
/* z.B. */
/* Returncode = 'CANCEL' ===> 'XCANCEL' */
/* Returncode = 'JCL ERROR' ===> 'XJCL ERROR' */
if(left(maxrc,1) ^= "R" & left(maxrc,1) ^= "U" & left(maxrc,1) ^= "S")
then maxrc = 'X'!!maxrc
end
return maxrc