IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to check the value of a symbolic parameter in jcl


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 1436
Location: Bangalore,India

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

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

Global Moderator


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

PostPosted: Tue Nov 13, 2007 12:47 pm
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
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: 1436
Location: Bangalore,India

PostPosted: Tue Nov 13, 2007 1:00 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 13, 2007 1:02 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 13, 2007 1:35 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts How to check whether who renamed the ... JCL & VSAM 3
No new posts No ++JCLIN, APPLY CHECK job JCL & VSAM 1
Search our Forums:

Back to Top