MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

skipping a step in procedure

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
Milind
Beginner


Joined: 29 Dec 2004
Posts: 26
Topics: 20

PostPosted: Mon Jul 11, 2005 11:32 pm    Post subject: skipping a step in procedure Reply with quote

How to skip a PROC step with out altering it??

I have procedure named ABC as

//ABC PROC
//S1 ....
// .....

//S2 ....
..........
//S3....
.......
//S4....
.........

S1, S2, S3 AND S4 are four steps in this procedure.

When I call ABC as:
//s000 exec proc=abc
All the four steps inside it will be executed one by one.
I want to skip a perticular step in this procedure.
Is it possibel?

Thanks in advance.
Milind Deshmukh.
Back to top
View user's profile Send private message Send e-mail
Ram
Beginner


Joined: 12 Jan 2004
Posts: 53
Topics: 12

PostPosted: Tue Jul 12, 2005 1:00 am    Post subject: Reply with quote

Milind,

Try coding the restart parameter on the job card. Coding a restart parameter will start the execution from the mentioned step and will continue till the end. Hope this will solve the purpose.

Thanks,
Ram
Back to top
View user's profile Send private message
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 317
Topics: 50
Location: Germany

PostPosted: Tue Jul 12, 2005 2:36 am    Post subject: Reply with quote

Hi milind,

1) Code a simple Cobol / pl1 program,named CHECK for example which accepts on parameter, values RUN or NORUN an sets an returncode. If Parameter = RUN then returncode = 1, other = 0.

2) Before your 4 Steps insert 4 additional steps, calling the CHECK program.

Code:


//CHK$S01  EXEC PGM=CHECK,PARM='/&ST01'
//STEPLIB  DD DSN= .....
//SYSPRINT DD SYSOUT= ...

//CHK$S02  EXEC PGM=CHECK,PARM='/&ST02'
//STEPLIB  DD DSN= .....
//SYSPRINT DD SYSOUT= ...

//CHK$S03  EXEC PGM=CHECK,PARM='/&ST03'
//STEPLIB  DD DSN= .....
//SYSPRINT DD SYSOUT= ...

//CHK$S04  EXEC PGM=CHECK,PARM='/&ST04'
//STEPLIB  DD DSN= .....
//SYSPRINT DD SYSOUT= ...






3) For every step code as follwos:

Code:


IF CHK$S01.RUN AND CHK$S01.RC = 1 THEN

     your JCL for Step 01

ENDIF






4) Calling your procedure:

Code:


// EXEC MYPROC .....
//       ST01 = RUN,
//       ST02 = NORUN,
//       ST03 = RUN,
//       ST04 = RUN
//



For each step you are now able to set RUN or NORUN.



regards,
bauer
Back to top
View user's profile Send private message
gavini_vasu
Beginner


Joined: 28 Jun 2005
Posts: 2
Topics: 1

PostPosted: Thu Jul 21, 2005 2:17 am    Post subject: Reply with quote

Though it is an old post, here is what we use at our shop to skip steps.

Wherever the PROC is called just add COND.STEPXX=(0,EQ) like..

Code:

//STEP1 EXEC PROC1,
//          COND.STEP10=(0,EQ),
//          COND.STEP15=(0,EQ),
.
.



Regards,
Vasu
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Thu Jul 21, 2005 1:44 pm    Post subject: Reply with quote

I tend to use COND.STEP10=(0,LE) just in case a previous return code greater than zero is valid.
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group