View previous topic :: View next topic
|
Author |
Message |
chattogokul
New User
Joined: 03 May 2005 Posts: 16
|
|
|
|
Hi all,
Let's say there are 2 steps in my JCL.
First Step is for backing a file up to some other destination PS.
Second Step is for deleting the source file after successful backing up of the file.
The Condition here is STEP2 should not execute unless and untill the successful execution of preceding step ie., STEP1.
Can anybody please tell me what are the possible condition can we code.
Plz clarify this..
Thanking You. |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Code: |
//STEP1 EXEC PGM=IEBGENER >> Dataset Back-up
//*
//*
//STEP2 EXEC PGM=<<FILE DELETING>>,COND=(0,NE,STEP1)
//*
//* |
Regards,
Priyesh. |
|
Back to top |
|
|
chattogokul
New User
Joined: 03 May 2005 Posts: 16
|
|
|
|
Hi Priyesh,
Thank You, |
|
Back to top |
|
|
martijn
New User
Joined: 09 Mar 2006 Posts: 14 Location: The Netherlands
|
|
|
|
hi,
In addition, can I just add:-
- Instead of (0,NE,<stepname>), you can also code (0,NE), in which case every previous step is checked.
- If the step you want to check runs a PROC, you have to code:
(0,NE,<stepname>.<procstepname>).
- You can also code COND=(0,NE) on the job-card! in which case every step will check all previous steps! |
|
Back to top |
|
|
pspreddy
New User
Joined: 14 Mar 2006 Posts: 24 Location: Chicago
|
|
|
|
Also you can direct the job to abend if the backup is not successful and if you do not want a return code of 0 unless on successful backup.
Ex Code below
//CCHK1000 EXEC PGM=CHECKSTP,
// COND=(0,EQ,FRSJS030.FRS55010),
// PARM='ABND=4000,MSG=*NON-ZERO RETURN CODE IN PRIOR STEP*'
//CA11NR DD DUMMY
//STEPLIB DD DSN=ISO.LINKLIB,DISP=SHR
or
// IF RC > 0 THEN
//CCHK1000 EXEC PGM=CHECKSTP,
// PARM='ABND=4000,MSG=*NON-ZERO COND CODE IN PRIOR STEP*'
//CA11NR DD DUMMY
//STEPLIB DD DSN=ISO.LINKLIB,DISP=SHR
// ENDIF |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Any reason why you don't handle both tasks in a single job step (i.e. an IDCAMS REPRO/DELETE). |
|
Back to top |
|
|
|