Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Restart step which is in IF condition
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
Bharath Nadipally

New User


Joined: 24 Jun 2008
Posts: 20
Location: Hyderabad

PostPosted: Wed Jul 09, 2008 12:29 pm    Post subject: Restart step which is in IF condition
Reply with quote

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
View user's profile Send private message
References
Bharath Nadipally

New User


Joined: 24 Jun 2008
Posts: 20
Location: Hyderabad

PostPosted: Wed Jul 09, 2008 12:38 pm    Post subject: Re: Restart step which is in IF condition
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 3507
Location: Brussels once more ...

PostPosted: Wed Jul 09, 2008 2:01 pm    Post subject:
Reply with quote

Please post the output from the failed attempt.
Back to top
View user's profile Send private message
Bharath Nadipally

New User


Joined: 24 Jun 2008
Posts: 20
Location: Hyderabad

PostPosted: Wed Jul 09, 2008 2:49 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 3507
Location: Brussels once more ...

PostPosted: Wed Jul 09, 2008 3:05 pm    Post subject:
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 653

PostPosted: Wed Jul 09, 2008 4:03 pm    Post subject:
Reply with quote

Hi,

this question has been asked before

see link http://ibmmainframes.com/viewtopic.php?t=26541&highlight=nullify



Gerry
Back to top
View user's profile Send private message
Anuj D.

Global Moderator


Joined: 22 Apr 2006
Posts: 2156
Location: Phoenix, AZ

PostPosted: Wed Jul 09, 2008 6:41 pm    Post subject: Re: Restart step which is in IF condition
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 653

PostPosted: Thu Jul 10, 2008 8:11 am    Post subject:
Reply with quote

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
View user's profile Send private message
Bharath Nadipally

New User


Joined: 24 Jun 2008
Posts: 20
Location: Hyderabad

PostPosted: Thu Jul 10, 2008 11:15 am    Post subject:
Reply with quote

Hi Gerry,

Problem was solved. Thank you very much.
Back to top
View user's profile Send private message
Bharath Nadipally

New User


Joined: 24 Jun 2008
Posts: 20
Location: Hyderabad

PostPosted: Thu Jul 10, 2008 11:19 am    Post subject: Re: Restart step which is in IF condition
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 653

PostPosted: Thu Jul 10, 2008 11:58 am    Post subject:
Reply with quote

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
View user's profile Send private message
P.RAJESH

New User


Joined: 20 Mar 2008
Posts: 28
Location: chennai

PostPosted: Thu Jul 10, 2008 12:30 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bharath Nadipally

New User


Joined: 24 Jun 2008
Posts: 20
Location: Hyderabad

PostPosted: Thu Jul 10, 2008 4:52 pm    Post subject:
Reply with quote

Rajesh,

The same is suggested in below link which is given by Gerry.
http://ibmmainframes.com/viewtopic.php?t=26541&highlight=nullify
Back to top
View user's profile Send private message
Bharath Nadipally

New User


Joined: 24 Jun 2008
Posts: 20
Location: Hyderabad

PostPosted: Thu Jul 10, 2008 4:55 pm    Post subject:
Reply with quote

Gerry,

I have tried and it is possible. What rajesh has suggested was in the link given by you.

http://ibmmainframes.com/viewtopic.php?t=26541&highlight=nullify
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 653

PostPosted: Sat Jul 12, 2008 5:21 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 HoursGoto page 1, 2  Next
Page 1 of 2