IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Condition Parameter


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
withlovearif

New User


Joined: 21 Mar 2005
Posts: 16

PostPosted: Mon Jun 20, 2005 7:01 pm
Reply with quote

how this statement Executes

QAHDU500 EXEC PGM=FILEAID,REGION=8M,TIME=5,COND=(0,LT,QAHDU400)
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Mon Jun 20, 2005 7:05 pm
Reply with quote

The statement will be executed if QAHDU400 is greater than or equals to ZERO.

If you are checking for Return Code of that step, I think you need to write it like.

COND=(0,LT,QAHDU400.RC)

Forum any comment.

Regards,

Priyesh.
Back to top
View user's profile Send private message
sree_2503

New User


Joined: 22 May 2005
Posts: 12
Location: Chennai,India

PostPosted: Tue Jun 21, 2005 9:38 am
Reply with quote

I agree with Priyesh. Considering QAHDU400 to be the step name, one needs to mention the QAHDU400.RC to indicate the return code value that the step returns.

And unless any other RC is explicitly passed, the step QAHDU400 will throw a RC of 0 or 4 under normal execution. Now, for 0, the condition as mentioned in QAHDU500 step, will execute the step ...500 whereas for 4, ...500 will not be executed.

Hope this clears.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Tue Jun 21, 2005 6:24 pm
Reply with quote

Perhaps I'm wrong, but stepname.RC is not needed on the COND= parameter. I'm not sure it is even allowed. Can't find anything in the JCL references that mentions it.

It can be used in the IF/THEN/ELSE/ENDIF construct.

Dave
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Jun 21, 2005 7:00 pm
Reply with quote

Straight out of the JCL Reference Guide:
Code:

COND[.procstepname] = ((code,operator[,stepname][.procstepname])

Nowhere does it mention using .RC.
Back to top
View user's profile Send private message
ederrod

New User


Joined: 06 Jun 2005
Posts: 5
Location: Sao Paulo - Brazil

PostPosted: Tue Jun 21, 2005 11:08 pm
Reply with quote

Is there a negative cond (e.g. -1)? If not, the step will run from code 0000 to 9999, isn't it?
Back to top
View user's profile Send private message
David P

Active User


Joined: 11 Apr 2005
Posts: 106
Location: Cincinnati Ohio

PostPosted: Wed Jun 22, 2005 9:03 am
Reply with quote

Hi,
I believe the condition codes can not be negative as the range for condition codes is from 0 to 4095.

Please correct me if I am wrong.

thanks
David.
Back to top
View user's profile Send private message
sree_2503

New User


Joined: 22 May 2005
Posts: 12
Location: Chennai,India

PostPosted: Wed Jun 22, 2005 10:24 am
Reply with quote

Hi,

Yes, the condition codes cannot be negative. It ranges from 0-4095.

I checked out about the .RC usage in condition codes. No, I didnt find any explicit mention of .RC in the condition parameter anywhere. So, I was wrong.

Well, theres a lead -

If i want to include an Abender step ( step will will lead the job to abend) following a step which calls a proc then this will be like -

//STEP1 EXEC AABBCC,
//.............
//.............
//.............
//*--------------------------------------------
//*HERE COMES THE ABENDER STEP****
//*--------------------------------------------
//ABEND EXEC PGM=ABENDER,
// COND=(4,GE,STEP1.AABBCC01)
//*
//*------------------END----------------------

where AABBCC is the proc called by Step1 in my job, and AABBCC01 is, say, the first step of the proc AABBCC.

Now, if I want to include AND/OR both in my condition param based on the steps of the job as well as that of the proc, how would I club them by?

Any examples, anyone?

P.S - Sorry, for the rather long post - I oughta open a New topic, but considered the thread of the discussion similar... icon_smile.gif
Back to top
View user's profile Send private message
anuradha

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Thu Jun 23, 2005 5:05 pm
Reply with quote

Quote:
how this statement Executes

QAHDU500 EXEC PGM=FILEAID,REGION=8M,TIME=5,COND=(0,LT,QAHDU400)


Hi Arif,

COND parameter will be easier if we read that backwards. For example
If the COND stmt was COND=(8,GE,STEP2). read it as follows:

If 8 is greater than or equal to the condition code issued in STEP2, Dont execute the current step.

Coming to your question:

If 0 is less than condition code issued in QAHDU400 step dont execute QAHDU500 step..

Hope am not confusing you.

Please let me know if you have any further concerns.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Demand with DEADLINE TIME parameter CA Products 4
No new posts Option DYNALLOC second parameter. DFSORT/ICETOOL 11
No new posts Writing the output file name from a p... JCL & VSAM 7
No new posts Reference for COND parameter. JCL & VSAM 1
Search our Forums:

Back to Top