View previous topic :: View next topic
|
Author |
Message |
Andy85
New User
Joined: 25 Dec 2008 Posts: 35 Location: India
|
|
|
|
Hi all,
I have a requirement in which there is a job having 3 steps. Steps 2 and 3 of the job should always execute. However, if a particular input file is empty then step1 should not execute else it should execute. I was planning to use file empty condition check of SORT which can set RC4 if file is empty. However the problem is that the COND in my last step is (1,LT). Hence if the input file is empty then last step also would not run.
Please suggest something. Instead of checking file as the criteria for execution of step001, can we check some user defined variable to know whether to execute step1 or not.
Thanks in advance.
Following is the JCL with empty file condition check at first:
Code: |
//**********************************************************************
//* IF FILE EMPTY THEN SET RC=4 SO THAT STEP001 DOES NOT EXECUTE *
//**********************************************************************
//STEP01A EXEC PGM=SORT,PARM='NULLOUT=RC4'
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=HLQ.TRIAL.LOGSSS,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
//*
//STEP001 EXEC PGM=ICETOOL,COND=(4,LE)
//..........
//STEP002 EXEC PGM=SORT,PARM='DYNALLOC=SYSDA'
//..........
//STEP003 EXEC PGM=SORT,PARM='DYNALLOC=SYSDA',COND=(1,LT)
//..........
|
|
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
why the condition on STEP003 ? STEP002 has no condition and is happy to run.
Gerry |
|
Back to top |
|
|
Andy85
New User
Joined: 25 Dec 2008 Posts: 35 Location: India
|
|
|
|
Step003 is dependent on step002. So if step002 has any RC greater than zero then stpe003 should not run. Hence the condition on step003. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
the code
Code: |
COND=(0,LT,STEP002) |
Gerry |
|
Back to top |
|
|
|