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
 

 

Condition Parameter

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Condition Parameter
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: 1452
Location: Chicago, IL

PostPosted: Mon Jun 20, 2005 7:05 pm    Post subject: Re: Condition
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    Post subject:
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: 241
Location: Cincinnati OH USA

PostPosted: Tue Jun 21, 2005 6:24 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Tue Jun 21, 2005 7:00 pm    Post subject: Re: Condition Parameter
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    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
No new posts Joinkeys with condition scdinesh DFSORT/ICETOOL 10 Tue Feb 14, 2017 12:20 am
No new posts Can DFSPARM override SORTKEYS paramet... ashek15 DB2 2 Tue Jan 31, 2017 11:36 pm
No new posts DDNAME parameter mistah kurtz JCL & VSAM 6 Mon Dec 19, 2016 4:41 pm
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am


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