View previous topic :: View next topic
|
Author |
Message |
usharaniA
New User
Joined: 22 Jan 2008 Posts: 85 Location: India
|
|
|
|
Hi,
I want to set the Return code of a step when the JCL abends,
From the forum i found that it is not posiible to set the RC once it is executed.
But i want to pass a parm to a Rexx code if the JCL abends .
Can you please tell me how to do that .
For eg. if my Jcl is ,
Code: |
//STEP2 EXEC PGM=COBPGM1
//STEPLIB DD DISP=SHR,DSN=Userid.LOADLIBV.VALIDTR
//DD1 DD DISP=SHR,DSN=Userid.A1.PS
//DD2 DD DISP=SHR,DSN=Userid.TOOLS.VALIDTR.TEMP
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//TEST2 IF (ABEND | STEP2.RC > 8 | RC < 8) THEN |
If the Job abends should i use any SET statement and pass it to REXX code.
If so how to do that. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
use an if group only for the abend |
|
Back to top |
|
|
usharaniA
New User
Joined: 22 Jan 2008 Posts: 85 Location: India
|
|
|
|
can you please elaborate. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Can you please go to the JCL reference manual by using the "IBM Manuals" button at the top of any page, and read all about it. |
|
Back to top |
|
|
usharaniA
New User
Joined: 22 Jan 2008 Posts: 85 Location: India
|
|
|
|
can you please tell me how to code If... else... in the SYSIN statement,
Because its giving me the following error in the SPOOL.
Code: |
READY
IF (STEP2.ABEND | STEP2.RC > 8 | RC < 8) THEN
IKJ56500I COMMAND IF NOT FOUND
READY
ISPSTART CMD(%JUA2 08) NEWAPPL(BAT) |
My JCL SYSIN statement is:
Code: |
//SYSTSIN DD *
IF (STEP2.ABEND | STEP2.RC > 8 | RC < 8) THEN
ISPSTART CMD(%JUA2 08) NEWAPPL(BAT)
ELSE ISPSTART CMD(%JUA2 00) NEWAPPL(BAT)
ENDIF
/* |
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
expat wrote: |
Can you please go to the JCL reference manual by using the "IBM Manuals" button at the top of any page, and read all about it. |
These are JCL statements, not REXX or TSO ........................... |
|
Back to top |
|
|
usharaniA
New User
Joined: 22 Jan 2008 Posts: 85 Location: India
|
|
|
|
Sorry i got the ouput I coded as follows,
Code: |
//TEST2 IF (ABEND | STEP2.RC > 8 | RC < 8) THEN
//LASTSTEP EXEC PGM=IKJEFT01,COND=EVEN
//ISPPROF DD DSN=&&ISPPROF,DISP=(,PASS),
// UNIT=SYSDA,SPACE=(CYL,(1,1,10),RLSE),
// RECFM=FB,LRECL=80
//ISPPLIB DD DSN=ISP.SISPPENU,DISP=SHR
//ISPMLIB DD DSN=ISP.SISPMENU,DISP=SHR
//ISPSLIB DD DSN=ISP.SISPSENU,DISP=SHR
//ISPTLIB DD DSN=ISP.SISPTENU,DISP=SHR
//SYSEXEC DD DISP=SHR,DSN=U162936.TOOLS.VALIDTR.PDS
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
ISPSTART CMD(%JUA2 12) NEWAPPL(BAT)
/*
// ELSE
//LASTSTEP EXEC PGM=IKJEFT01,COND=EVEN
//ISPPROF DD DSN=&&ISPPROF,DISP=(,PASS),
// UNIT=SYSDA,SPACE=(CYL,(1,1,10),RLSE),
// RECFM=FB,LRECL=80
//ISPPLIB DD DSN=ISP.SISPPENU,DISP=SHR
//ISPMLIB DD DSN=ISP.SISPMENU,DISP=SHR
//ISPSLIB DD DSN=ISP.SISPSENU,DISP=SHR
//ISPTLIB DD DSN=ISP.SISPTENU,DISP=SHR
//SYSEXEC DD DISP=SHR,DSN=U162936.TOOLS.VALIDTR.PDS
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
ISPSTART CMD(%JUA2 0) NEWAPPL(BAT)
/*
//ENDTEST2 ENDIF |
|
|
Back to top |
|
|
|