View previous topic :: View next topic
|
Author |
Message |
Bharath Nadipally
New User
Joined: 24 Jun 2008 Posts: 22 Location: Hyderabad
|
|
|
|
I have job as below.
Code: |
//LSNBEMT JOB (54035,2140,00000,1111),'DOESNT EXIST PS',
// CLASS=A,MSGCLASS=H,NOTIFY=&SYSUID,MSGLEVEL=(1,1),
// RESTART=STEP02
//STEP01 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENTRIES('LSKT00.BLPLAN1.PS.TEST2')
/*
//IFBLK IF (STEP01.RC = 0) THEN
//*
//STEP02 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENTRIES('LSKT00.BLPLAN1.PS.TEST2')
/*
//STEP03 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENTRIES('LSKT00.BLPLAN1.PS.TEST2')
/*
//ENDIFBLK ENDIF
|
Here i am trying to restart job from STEP02 which is in IF block, but the step was not executed(may be because at the restart time STEP01 Return code may not be available.
Can anyone help me to restart this job from STEP02 by changing jobcard but without changing the job(using COND param) as it is a production job. |
|
Back to top |
|
|
Bharath Nadipally
New User
Joined: 24 Jun 2008 Posts: 22 Location: Hyderabad
|
|
|
|
small correction:
Below is the jobcard(It should not have any step other than calling proc as per client standards)
Code: |
//LSNBEMT JOB (54035,2140,00000,1111),'DOESNT EXIST PS',
// CLASS=A,MSGCLASS=H,NOTIFY=&SYSUID,MSGLEVEL=(1,1),
// RESTART=PROC.STEP02
// JCLLIB ORDER=LSNB00.LI.CNTL
//PROC EXEC IFPROC4
|
Below is the proc
Code: |
//IFPROC4 PROC IFPROC4
//STEP01 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENTRIES('LSKT00.BLPLAN1.PS.TEST2')
/*
//IFBLK IF (STEP01.RC = 0) THEN
//*
//STEP02 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENTRIES('LSKT00.BLPLAN1.PS.TEST2')
/*
//STEP03 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENTRIES('LSKT00.BLPLAN1.PS.TEST2')
/*
//ENDIFBLK ENDIF
|
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Please post the output from the failed attempt. |
|
Back to top |
|
|
Bharath Nadipally
New User
Joined: 24 Jun 2008 Posts: 22 Location: Hyderabad
|
|
|
|
expat,
below is the output for the JCL. STEP02 and STEP03 are being FLUSHed(not exected).
JOBNAME STEPNAME PGM NAME RC
LSNBEMT STEP01 IDCAMS 04
LSNBEMT STEP02 IDCAMS FLUSH
LSNBEMT STEP03 IDCAMS FLUSH |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Maybe they are not being executed because STEP01 has issued a RC04, and in this case they are NOT to be processed.
So where is the output from your restart - which is what I wanted to see. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi,
Bharath Nadipally wrote: |
Below is the proc |
Tried to simulate the condition in question, I got the below error..
Code: |
IN-STREAM DATA NOT ALLOWED IN PROC |
Don't You get this with the code shown..? |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
lets assume the PROC has no instream data, how do you restart STEP02 without altering the PROC ?
With normal restart, STEP02 & STEP03 just flush
Gerry |
|
Back to top |
|
|
Bharath Nadipally
New User
Joined: 24 Jun 2008 Posts: 22 Location: Hyderabad
|
|
|
|
Hi Gerry,
Problem was solved. Thank you very much. |
|
Back to top |
|
|
Bharath Nadipally
New User
Joined: 24 Jun 2008 Posts: 22 Location: Hyderabad
|
|
|
|
Hi anuj,
Actually I was running as a job in test library. But while moving to production, i have to have jobcard and proc as separate. so i have posted like that. Anyway, thank you for all your suggestions. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
my question still stands, can a restart be done when IF conditions are in a PROC without modyfying the PROC and actually executing the restarted step ?
Gerry |
|
Back to top |
|
|
P.RAJESH Currently Banned New User
Joined: 20 Mar 2008 Posts: 54 Location: chennai
|
|
|
|
hi,
i tried your requirement by changeing the your if condition
shown below
//IFBLK IF (STEP01.RC = 0) | (¬STEP01.RUN)
Try with also. |
|
Back to top |
|
|
Bharath Nadipally
New User
Joined: 24 Jun 2008 Posts: 22 Location: Hyderabad
|
|
Back to top |
|
|
Bharath Nadipally
New User
Joined: 24 Jun 2008 Posts: 22 Location: Hyderabad
|
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
maybe I'm missing something here, how do you override the PROC or are you suggesting to put //IFBLK IF (STEP01.RC = 0) | (¬STEP01.RUN)
permanetly in the PROC ?
Gerry |
|
Back to top |
|
|
P.RAJESH Currently Banned New User
Joined: 20 Mar 2008 Posts: 54 Location: chennai
|
|
|
|
hi,
I prefer to place the if condition in procedure premenentaly.
your quote : how do you override the PROC
I am not clear with the above sentence.
I feel happy if you describe with an exmaple ?
Please.... |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Rajesh,
let's start from scratch, hereunder is a PROC
Code: |
//A PROC
//*
//**********************************************************************
//*
//STEP01 EXEC PGM=IEFBR14
//*
//**********************************************************************
//*
//CHECK01 IF (STEP01.RC = 0) THEN
//*
//STEP02 EXEC PGM=IEBGENER
//*
//CHECK01 ENDIF
//*
//**********************************************************************
//CHECK02 IF (STEP02.RC = 0) THEN
//*
//STEP03 EXEC PGM=IEFBR14
//*
//CHECK02 ENDIF
//*
//**********************************************************************
//CHECK03 IF (STEP03.RC = 0) THEN
//*
//STEP0004 EXEC PGM=IEFBR14
//*
//CHECK03 ENDIF
//*
//**********************************************************************
|
Now are you saying I should set it up this way to enable restarts not to flush
Code: |
//A PROC
//*
//**********************************************************************
//*
//STEP01 EXEC PGM=IEFBR14
//*
//**********************************************************************
//*
//CHECK01 IF (STEP01.RC = 0) | (¬STEP01.RUN) THEN
//*
//STEP02 EXEC PGM=IEBGENER
//*
//CHECK01 ENDIF
//*
//**********************************************************************
//CHECK02 IF (STEP02.RC = 0) | (¬STEP02.RUN) THEN
//*
//STEP03 EXEC PGM=IEFBR14
//*
//CHECK02 ENDIF
//*
//**********************************************************************
//CHECK03 IF (STEP03.RC = 0) | (¬STEP03.RUN) THEN
//*
//STEP0004 EXEC PGM=IEFBR14
//*
//CHECK03 ENDIF
//*
//**********************************************************************
|
Gerry |
|
Back to top |
|
|
P.RAJESH Currently Banned New User
Joined: 20 Mar 2008 Posts: 54 Location: chennai
|
|
|
|
Hi Gerry,
Exactly that's what i am saying.....
To avoide restart problems of step if it is bounded under IF condition. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Rajesh,
well I'm afraid this is not a good option, what happens when STEP02 is restarted and fails, STEP03 flushes but STEP04 will now run.
Don't like this idea at all.
So back to my original question, can you override IF conditions in a PROC withou changing the PROC ?
Gerry |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Looks like that old peach of an argument - do I use IF/THEN/ELSE or COND= for ease of functionality .......... |
|
Back to top |
|
|
|