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 

Condtion Codes - Which Is Correct

 
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
Ganti
Beginner


Joined: 04 Dec 2002
Posts: 8
Topics: 3
Location: St.Louis, MO, USA

PostPosted: Mon Dec 22, 2003 10:31 am    Post subject: Condtion Codes - Which Is Correct Reply with quote

Hi,

There is a JCL with the following steps
.
.
//STEP1 EXEC PROC1
.
.
//STEP5 EXEC PGM=IEBGENER, COND=(4,LE,STEP1.STEP2)
.
.
The datacenter standard is to have a JCL execute only PROCs and hence we are required to convert the likes of STEP5 into a PROC and hence we will have the following-
JCL
.
.
//STEP5 EXEC PROC2

where PROC2 will be as follows:

//PROC2 PROC
//STEP1 EXEC PGM=IEBGENER, COND=(4,LE,STEP1.STEP2)

I dont think the above conversion is correct, because the condition code check should be at the step executing this PROC in the JCL as follows:

JCL-
//STEP5 EXEC PROC2, COND=(4,LE,STEP1.STEP2)

and
PROC
//PROC2 PROC
//STEP1 EXEC PGM=IEBGENER

When you do a JSCAN or JEM for the PROC with the COND code, it gives an error, whereas in the second case it does not.

Also, both of these execute well.

Would like to know which one of these would be better to implement.

Best regards
Ganti
_________________
Ganti
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Dec 22, 2003 10:58 am    Post subject: Reply with quote

Ganti,

I would definitely go with
Code:

//STEP5 EXEC PROC2, COND=(4,LE,STEP1.STEP2)


The above can be easily understood and be changed as and when needed.
Quote:

When you do a JSCAN or JEM for the PROC with the COND code, it gives an error, whereas in the second case it does not.



What is the error you are getting? I tried to simulate your question and I get a clean JCL check

Hope this helps...

cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ganti
Beginner


Joined: 04 Dec 2002
Posts: 8
Topics: 3
Location: St.Louis, MO, USA

PostPosted: Mon Dec 22, 2003 2:57 pm    Post subject: Reply with quote

Kolusu,

The error I get is that STEP1.STEP2 is not found, when I do a JEM on the PROC alone.
_________________
Ganti
Back to top
View user's profile Send private message
Mike
Beginner


Joined: 03 Dec 2002
Posts: 114
Topics: 0
Location: Sydney, Australia

PostPosted: Mon Dec 22, 2003 4:02 pm    Post subject: Reply with quote

Ganti,
If I understand correctly the reason that JEM/Jobscan gets an error is that it cannot know that the procedure is being invoked by a JOB that has other steps. If I remember correctly, in the abscence of a JOB (e.g. when scanning a procedure on it's own) it generates/assumes a JOB that simply invokes the procedure being scanned, basically circumventing the no JOB statement error. Thus you would expect to get the STEP1.STEP2 not found error. Really you should be scanning the JOB, as the procedure is only used if invoked by a JOB.
_________________
Regards,
Mike.
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