View previous topic :: View next topic
|
Author |
Message |
cvadlamudi
New User
Joined: 19 Apr 2007 Posts: 68 Location: India
|
|
|
|
Hi,
Please let me know, how to restart the below job at step IEB02 which is in the if condition. I dont want to alter the steps by removing the IF condition. Is it possible to restart by changing the job card with restart parameter.
Code: |
//USERIDAA JOB CLASS=X,MSGCLASS=X
//*
//*----------------------------------------------------------------------------
//IEB01 EXEC PGM=IEBGENER
//SYSUT1 DD *
001
/*
//SYSUT2 DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*----------------------------------------------------------------------------
//CHK01 IF IEB01.RC=0 THEN
//IEB02 EXEC PGM=IEBGENER
//SYSUT1 DD *
001
/*
//SYSUT2 DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
// ENDIF
//*----------------------------------------------------------------------------
//CHK02 IF IEB02.RC=0 THEN
//IEB03 EXEC PGM=IEBGENER
//SYSUT1 DD *
001
/*
//SYSUT2 DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
// ENDIF |
---------------------
Thanks
Mouli |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
You have to remove the IF/ENDIF, or you'll have to change step IEB01 (you could just dummy it out with a PGM=IEFBR14). |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
How I do it is code the IF statement like this:
Code: |
//CHK01 IF ((IEB01.RC=0) OR
// (IEB01.RUN EQ FALSE)) THEN
//IEB02 EXEC PGM=IEBGENER
//SYSUT1 DD *
001
/*
//SYSUT2 DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
// ENDIF
|
I do this any time I think I may want to restart within an IF statement. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
I always code my JCL so that I do not have to restart within an IF statement. You just have to plan your JCL and test it. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
Code: |
//CHK01 IF ((IEB01.RC=0) OR
// (IEB01.RUN EQ FALSE)) THEN
//IEB02 EXEC PGM=IEBGENER
//SYSUT1 DD *
001
/*
//SYSUT2 DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
// ENDIF
|
So what happens when IEB01 flushes ? IEB02 will run, is that really what you want ?
I prefer Nic's approach.
Gerry |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Quote: |
So what happens when IEB01 flushes ? IEB02 will run, is that really what you want ?
|
How exactly is the first step of the job going to 'flush'?
It may run with a bad return code (if will fail then).
If it doesn't run, then yes, that is what he wants in this case.
If by planning your, jcl you accomplish the same result, then we now have two ways of doing this. Works for me. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi daveporcelan,
yes you are right in this particular example.
So what happens when IEB02 flushes, IEB03 will run if the same concept is used
Code: |
//CHK01 IF ((IEB02.RC=0) OR
// (IEB02.RUN EQ FALSE)) THEN
|
Gerry |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Hi gcicchet,
Quote: |
So what happens when IEB02 flushes, IEB03 will run if the same concept is used |
It depends on the requirement. He may want to do this or may not.
One case in our environment where we do this is:
Code: |
//STEP1 PGM=DB2 UNLOAD of 200 Tables
//TEST1 IF ((STEP1.LE=4) OR
// (STEP1.RUN EQ FALSE)) THEN
//STEP2 PGM=DB2 LOAD of 200 Tables
//ENDTEST1 ENDIF
|
Sometimes we get a failure during the load process. We correct the issue and restart where we left off.
I am sure there are other ways, but this is our way of planning our jcl to accomplish the requirement. I think it is a good approach. |
|
Back to top |
|
|
|