View previous topic :: View next topic
|
Author |
Message |
ekamra_routray
New User
Joined: 12 Nov 2007 Posts: 4 Location: Mumbai
|
|
|
|
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 |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
JCL IF is not designed to verify the user values. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
The VALUE of the variable would have to be checked programatically:
//PSXX EXEC PGM=PGMX,PARM='&BCP' |
|
Back to top |
|
|
ekamra_routray
New User
Joined: 12 Nov 2007 Posts: 4 Location: Mumbai
|
|
|
|
Thanks for the reply.. Is there any work around to achieve this instead of using if ? |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
ekamra_routray
New User
Joined: 12 Nov 2007 Posts: 4 Location: Mumbai
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
ekamra_routray
New User
Joined: 12 Nov 2007 Posts: 4 Location: Mumbai
|
|
|
|
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 |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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 |
|
|
|