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
 

 

"Not Equal To" condition in JCL 'IF'

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

New User


Joined: 01 Feb 2006
Posts: 46
Location: India

PostPosted: Thu Feb 18, 2010 12:58 am    Post subject: "Not Equal To" condition in JCL 'IF'
Reply with quote

Hi All,

My parameter "PARAMA" would contain a string value during some runs of JCL.

I have to skip steps if the parameter value is space.

I am trying to execute

IF &PARAMA NE ''
GOTO STEP005

But NE is not accepted by JCL.

Can anybody help?

Thanks in advance.

Regards,
Muruganandham k
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: Thu Feb 18, 2010 1:05 am    Post subject:
Reply with quote

The following keywords are the only keywords supported by IBM and recommended for use in relational-expressions. Any other keywords, even if accepted by the system, are not intended or supported keywords.
Keyword Use
RC
indicates a return code
ABEND
indicates an abend condition occurred
┬ČABEND
indicates no abend condition occurred
ABENDCC
indicates a system or user completion code
RUN
indicates that the specified step started execution
┬ČRUN
indicates that the specified step did not start execution
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Feb 18, 2010 1:07 am    Post subject:
Reply with quote

deleted -- I type to slow.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Feb 18, 2010 1:08 am    Post subject: Reply to: "Not Equal To" condition in JCL 'IF'
Reply with quote

I have experimented with the following but, it's an undocumented "feature" which could be fixed by IBM at anytime -

Code:

//VARS SET VALUE1=1,VALUE2=0
// IF  &VALUE1=&VALUE2

What happens is VALUE1 resolves as 1 and VALUE2 resolves as 0 and in this example, the IF check would be false.

Code:

// IF  1=0

Otherwise, I can't resolve what you want to do because I've only experimented with numbers and equal-to conditions and I don't believe GOTO's are valid either.

Bill
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: Thu Feb 18, 2010 1:28 am    Post subject:
Reply with quote

Hello,

You could create a new "first step" that looks at the parm and sets the Return Code accordingly.

Then the remainder of the job simply uses the RC that was set. . .
Back to top
View user's profile Send private message
mrgnndhmk

New User


Joined: 01 Feb 2006
Posts: 46
Location: India

PostPosted: Thu Feb 18, 2010 2:39 am    Post subject:
Reply with quote

Thanks for the suggestions.

In my shop, I can use the following

|IF &ECHECK EQ ''

<JCL STEPS>

|ENDIF

But I have to set ECHECK before the job card

|SET &ECHECK=&&PARAMA

where &&PARAMA is a Scheduler variable.

Now I am able to achieve what I wanted, though not using NE condition.
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 Amount field is getting corrupted whe... thesumitk SYNCSORT 5 Tue Oct 18, 2016 8:20 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm
No new posts Multi row fetch - "for read only... Nileshkul DB2 3 Sun Aug 14, 2016 12:52 am


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