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
 

 

How to check the value of a symbolic parameter in jcl

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

New User


Joined: 12 Nov 2007
Posts: 4
Location: Mumbai

PostPosted: Tue Nov 13, 2007 12:20 pm    Post subject: How to check the value of a symbolic parameter in jcl
Reply with quote

Hi All,

I have a requirement in which I have to check the value of a symbolic parameter in a proc. I am not able to do that using if statement.

In the proc I am using the check as
// if &BCP = 'O03' Then
// ...............
// End if

This if statement is failing saying operand BCP is not proper and can not use relational operator here..I didnt not find any example where in we are using if statement for checking any variable other than keywords like RC ,MAXCC or ABEND

Can anyone help me in this - I am kind of stuck here icon_sad.gif
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Tue Nov 13, 2007 12:27 pm    Post subject:
Reply with quote

JCL IF is not designed to verify the user values.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue Nov 13, 2007 12:47 pm    Post subject: Reply to: How to check the value of a symbolic parameter in
Reply with quote

The VALUE of the variable would have to be checked programatically:

//PSXX EXEC PGM=PGMX,PARM='&BCP'
Back to top
View user's profile Send private message
ekamra_routray

New User


Joined: 12 Nov 2007
Posts: 4
Location: Mumbai

PostPosted: Tue Nov 13, 2007 12:57 pm    Post subject:
Reply with quote

Thanks for the reply.. Is there any work around to achieve this instead of using if ?
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Tue Nov 13, 2007 1:00 pm    Post subject:
Reply with quote

Quote:
Is there any work around to achieve this instead of using if ?


May be if you psot your requirement clearly...... we may show you some way.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Tue Nov 13, 2007 1:02 pm    Post subject: Reply to: How to check the value of a symbolic parameter in
Reply with quote

Quote:
Is there any work around to achieve this instead of using if ?


it depends on how You submit the JOB..

if it is submitted thru a scheduler, the scheduler will usually take care of passing the right parameters ...

if it a job submitted by the user then...

if it is a straight submit via ISPF edit, You must trust the submitter

if it is submitted thru a user developed ISPF application,
then it is the application responsibility to check for the correctness of the paramters
Back to top
View user's profile Send private message
ekamra_routray

New User


Joined: 12 Nov 2007
Posts: 4
Location: Mumbai

PostPosted: Tue Nov 13, 2007 1:31 pm    Post subject: Reply to: How to check the value of a symbolic parameter in
Reply with quote

We have a requirement to check the symbolic parameter and do some processing based on the value of the symbolic parameter..If I can check the value of this parameter some how in the JCL the processing would be easier..Otherwise we have to change the processing right from the place from where this symbolic variable is getting populated which will involve lot of changes.Just trying to get a work around for this without writing a program as we do not have top change the program each time the processing change.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Tue Nov 13, 2007 1:35 pm    Post subject: Reply to: How to check the value of a symbolic parameter in
Reply with quote

You cannot achieve what You want at no charge !

the simplest way without writing a program, is ....
Write and submit different JOBS

Otherwise You have to write a program to check the parameter,
set a return code, rewrite the jcl logic based on cond codes
Back to top
View user's profile Send private message
ekamra_routray

New User


Joined: 12 Nov 2007
Posts: 4
Location: Mumbai

PostPosted: Tue Nov 13, 2007 3:11 pm    Post subject: Reply to: How to check the value of a symbolic parameter in
Reply with quote

Thanks a lot for the reply..Just wandering can we call eztrieve pgm with parameter to achieve this.This way we call still do it inside the JCL
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


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

PostPosted: Tue Nov 13, 2007 7:02 pm    Post subject: Re: Reply to: How to check the value of a symbolic parameter
Reply with quote

ekamra_routray wrote:
Thanks a lot for the reply..Just wandering can we call eztrieve pgm with parameter to achieve this.This way we call still do it inside the JCL


If you look at it that way then write a COBOL or ASM program and you could still do it inside the JCL.
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 DDNAME parameter mistah kurtz JCL & VSAM 6 Mon Dec 19, 2016 4:41 pm
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am


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