Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Restart step which is in IF condition

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Bharath Nadipally

New User


Joined: 24 Jun 2008
Posts: 22
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

Bharath Nadipally

New User


Joined: 24 Jun 2008
Posts: 22
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: 8593
Location: Back in jolly old England

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: 22
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: 8593
Location: Back in jolly old England

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: 1703
Location: Australia

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 Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

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: 1703
Location: Australia

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: 22
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: 22
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: 1703
Location: Australia

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
Currently Banned

New User


Joined: 20 Mar 2008
Posts: 54
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: 22
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: 22
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: 1703
Location: Australia

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
P.RAJESH
Currently Banned

New User


Joined: 20 Mar 2008
Posts: 54
Location: chennai

PostPosted: Mon Jul 14, 2008 10:29 am    Post subject:
Reply with quote

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

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Mon Jul 14, 2008 11:16 am    Post subject:
Reply with quote

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

New User


Joined: 20 Mar 2008
Posts: 54
Location: chennai

PostPosted: Tue Jul 15, 2008 9:31 am    Post subject:
Reply with quote

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

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Jul 15, 2008 9:49 am    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jul 15, 2008 12:02 pm    Post subject:
Reply with quote

Looks like that old peach of an argument - do I use IF/THEN/ELSE or COND= for ease of functionality ..........
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm
No new posts INCLUDE condition questions van bui DFSORT/ICETOOL 1 Thu Jun 30, 2016 9:52 am
No new posts 2 vsam file compare and update a fiel... ABINAYATHULASI DFSORT/ICETOOL 6 Sun May 29, 2016 11:15 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us