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
 

 

Regarding Condition codes

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ksathishkumar83

New User


Joined: 21 Nov 2006
Posts: 50
Location: India

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

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

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: 50
Location: India

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: 2150
Location: At my coffee table

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

Active Member


Joined: 17 Aug 2007
Posts: 562
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

Active Member


Joined: 17 Aug 2007
Posts: 562
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: 50
Location: India

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

Active Member


Joined: 17 Aug 2007
Posts: 562
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 Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
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: 50
Location: India

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

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

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

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
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

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
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
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
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts INCLUDE condition questions van bui DFSORT/ICETOOL 1 Thu Jun 30, 2016 9:52 am
No new posts 2 vsam file compare and update a fiel... ABINAYATHULASI DFSORT/ICETOOL 6 Sun May 29, 2016 11:15 am
No new posts File matching using specific condition mf_karthik DFSORT/ICETOOL 3 Fri Nov 20, 2015 11:04 pm


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