View previous topic :: View next topic
|
Author |
Message |
withlovearif
New User
Joined: 21 Mar 2005 Posts: 16
|
|
|
|
how this statement Executes
QAHDU500 EXEC PGM=FILEAID,REGION=8M,TIME=5,COND=(0,LT,QAHDU400) |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
sree_2503
New User
Joined: 22 May 2005 Posts: 12 Location: Chennai,India
|
|
|
|
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 |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Straight out of the JCL Reference Guide:
Code: |
COND[.procstepname] = ((code,operator[,stepname][.procstepname])
|
Nowhere does it mention using .RC. |
|
Back to top |
|
|
ederrod
New User
Joined: 06 Jun 2005 Posts: 5 Location: Sao Paulo - Brazil
|
|
|
|
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 |
|
|
David P
Active User
Joined: 11 Apr 2005 Posts: 106 Location: Cincinnati Ohio
|
|
|
|
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 |
|
|
sree_2503
New User
Joined: 22 May 2005 Posts: 12 Location: Chennai,India
|
|
|
|
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... |
|
Back to top |
|
|
anuradha
Active User
Joined: 06 Jan 2004 Posts: 247 Location: Hyderabad
|
|
|
|
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 |
|
|
|