Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Regarding Condition codes

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
ksathishkumar83

New User


Joined: 21 Nov 2006
Posts: 46
Location: chennai

PostPosted: Fri Aug 08, 2008 9:46 pm    Post subject: Regarding Condition codes
Reply with quote

Hi,

I need to execute step3 depending on the Return codes of previous two steps step1 and step2.

step3--should not execute when both step1 and step2 return code is 4.
when any one of the step has a return code other than 4,step3
should run.

Please provide me the condition code needed for this.
Back to top
View user's profile Send private message
References
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 1222
Location: At my desk

PostPosted: Fri Aug 08, 2008 10:22 pm    Post subject:
Reply with quote

Have you looked at the COND Syntax?
Back to top
View user's profile Send private message
ksathishkumar83

New User


Joined: 21 Nov 2006
Posts: 46
Location: chennai

PostPosted: Fri Aug 08, 2008 10:27 pm    Post subject:
Reply with quote

Hi,

I have tried and able to get the solution.

i want to code the condition like below

// If step1.rc not equal to 4 OR Step2.rc not equal e
//step3 exec
//.....
// endif
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 1222
Location: At my desk

PostPosted: Fri Aug 08, 2008 11:28 pm    Post subject:
Reply with quote

Take a look at Examples of IF/THEN/ELSE/ENDIF Statement Construct and Using the IF/THEN/ELSE/ENDIF Statement Construct and post back with your best guess......
Back to top
View user's profile Send private message
Bill Dennis

Senior Member


Joined: 17 Aug 2007
Posts: 333
Location: Iowa, USA

PostPosted: Fri Aug 08, 2008 11:47 pm    Post subject:
Reply with quote

You first said BOTH steps must be CC=4 to run step3. Your sample code says OR.

Which do you want?
Back to top
View user's profile Send private message
Bill Dennis

Senior Member


Joined: 17 Aug 2007
Posts: 333
Location: Iowa, USA

PostPosted: Fri Aug 08, 2008 11:49 pm    Post subject:
Reply with quote

Bill Dennis wrote:
You first said BOTH steps must be CC=4 to run step3. Your sample code says OR.

Which do you want?
Oops. I was backwards. You said "BOTH steps must be CC=4 to skip step3". Is it OR or AND?
Back to top
View user's profile Send private message
ksathishkumar83

New User


Joined: 21 Nov 2006
Posts: 46
Location: chennai

PostPosted: Sat Aug 09, 2008 12:15 am    Post subject:
Reply with quote

I said step3 should not run only when both steps step1 and step2's return codes are 4.

my sample code is
// If step1.rc not equal to 4 OR Step2.rc not equal 4
//step3 exec
//.....
// endif

when step1 rc=4 and step2 rc=0
If step1.rc not equal to 4 OR Step2.rc not equal 4
step 3 will exexute

when step1 and step2 both rc=4
If step1.rc not equal to 4 OR Step2.rc not equal 4
both these condition will be false,so step3 will not execute
Back to top
View user's profile Send private message
Bill Dennis

Senior Member


Joined: 17 Aug 2007
Posts: 333
Location: Iowa, USA

PostPosted: Sat Aug 09, 2008 3:04 am    Post subject:
Reply with quote

You have almost coded the solution yourself.
Code:
//        IF (STEP1.RC ^= 4 OR STEP2.RC ^= 4) THEN     
//STEP03  EXEC PGM=xxxxx                             
//        ENDIF                                             
Back to top
View user's profile Send private message
Anuj D.

Global Moderator


Joined: 22 Apr 2006
Posts: 2352
Location: Mumbai, India

PostPosted: Mon Aug 11, 2008 11:11 am    Post subject:
Reply with quote

Bill Dennis wrote:
You have almost coded the solution yourself.
With the exp. level & exposure you own You guys are supportive enough. Thanks for being here... icon_smile.gif
Back to top
View user's profile Send private message
ksathishkumar83

New User


Joined: 21 Nov 2006
Posts: 46
Location: chennai

PostPosted: Tue Aug 12, 2008 12:07 am    Post subject:
Reply with quote

Hi,

when i tried the below code,i am getting Error that ^-should not be used with IF.
// IF (STEP1.RC ^= 4 OR STEP2.RC ^= 4) THEN
//STEP03 EXEC PGM=xxxxx
// ENDIF
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 9192
Location: 221 B Baker St

PostPosted: Tue Aug 12, 2008 12:29 am    Post subject:
Reply with quote

Hello,

I believe the jcl checker may be looking for x'5F' rather than x'B0'. . .

Code:
 ¬  ^
 544B
 F000


If i remember, you could use NOT instead of the not symbol.
Back to top
View user's profile Send private message
Terry Heinze

Active User


Joined: 14 Jul 2008
Posts: 258
Location: Richfield, MN, USA

PostPosted: Tue Aug 12, 2008 1:56 am    Post subject:
Reply with quote

Try NE instead of ^=.
Back to top
View user's profile Send private message
Terry Heinze

Active User


Joined: 14 Jul 2008
Posts: 258
Location: Richfield, MN, USA

PostPosted: Tue Aug 12, 2008 1:58 am    Post subject:
Reply with quote

... or look it up in the JCL manual.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1