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
 

 

Override for "IF" statemnt from JCL

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

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Tue Mar 23, 2010 3:53 pm    Post subject: Override for "IF" statemnt from JCL
Reply with quote

Hi ,

I have the following step in a Proc

//IF02 IF (RC LE 4 AND ABEND=FALSE) THEN

execute some steps

//els ELSE
execute some steps

//ends ENDIF


Lets say my Jcl i XXX and my Proc name is YYY

Can i overrid my If statement from the jcl to say
IF (RC LE 8 AND ABEND=FALSE) THEN

Please Advice .
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Mar 23, 2010 4:06 pm    Post subject:
Reply with quote

What is wrong with trying it yourself and then asking if you have problems.
Back to top
View user's profile Send private message
cvishu

Active User


Joined: 31 Jul 2007
Posts: 136
Location: india

PostPosted: Tue Mar 23, 2010 4:17 pm    Post subject:
Reply with quote

i Actually tried a few

ex : Jobname.Stepname new condition

Procname.Stepname new condition


Nothing worked


i know how to override CONDS and DSNs , but this i am not sure how to do
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Mar 23, 2010 4:53 pm    Post subject:
Reply with quote

Not sure that you can override IF/THEN/ELSE if it is in a PROC
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 Mar 23, 2010 9:05 pm    Post subject:
Reply with quote

Hello,

Quote:
Not sure that you can override IF/THEN/ELSE if it is in a PROC
As far as i know, this cannot be overridden. . .
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Mar 23, 2010 9:06 pm    Post subject:
Reply with quote

Which is why I NEVER use them within a PROC.

This is probably yet another case of bad planning / lack of testing.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 662
Location: Pennsylvania

PostPosted: Tue Mar 23, 2010 9:48 pm    Post subject:
Reply with quote

What I have done to make this work in a PROC is make the condition on the IF statement a Symbolic.

The default is set in the Proc, and it can be overriden from the Job. This works really nice. It just requires you plan ahead.

Here is an example (just a snippet):
Code:

//DPPROC   PROC CA7CARD='',
//           CHKVAL='EQ 0'
......
//IFCRD      IF CHKCARD.RC &CHKVAL THEN
.....



To Override from Job to bypass step:
Code:

//CHKBND5    EXEC DPPROC,
//           CA7CARD='021',
//           CHKVAL='LT 0'
Back to top
View user's profile Send private message
mtaylor

Active User


Joined: 20 Feb 2009
Posts: 108
Location: Kansas City

PostPosted: Wed Mar 24, 2010 6:00 pm    Post subject:
Reply with quote

I couldn't remember if I included this in the JCL parser I wrote but symbolic replacement in IF statement is supported with the following caveat (JCL Ref 17-9). This is from the 390 version, I find it much more informative than the ZOS version (apparently someone decided to edit out or obfuscate a lot of useful information in the ZOS version of the JCL Reference).

Quote:
You can specify symbolic parameters on IF/THEN/ELSE/ENDIF statements
provided that they resolve to one of the supported relational-expression
keywords listed in the preceding topic (that is, RC, ABEND, ...). Any other
symbolic parameters, even if accepted by the system, are not intended or
supported.
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 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
No new posts Can DFSPARM override SORTKEYS paramet... ashek15 DB2 2 Tue Jan 31, 2017 11:36 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


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