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: 49
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: 49
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 Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm


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