View previous topic :: View next topic
|
Author |
Message |
meenakshi_forum Warnings : 1 Active User
Joined: 27 May 2008 Posts: 121 Location: India
|
|
|
|
I have to use the same PROC say PROC45 from 2 different JCLs say JC1 and JC2.
There is a symbolic parameter in PROC say TST,
the value in TST should be different when executed from different JCLs.
How should be the code in PROC--
PROC45 PROC
TST=TST,
OR
PROC45 PROC
TST=1,
when this is executed from different JCL, like
IN JC1--
EXEC PROC45, TST=1
IN JC2-
EXEC PROC45, TST=2.
Please let me know
I feel the first code for proc is right, please correct if iam wrong.
Thanks. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
You are not right nor wrong, You are just making wrong assumptions
the values to be assigned to the parameters of a procedure are to be chosen
according to the documentation
if Your procedure has been written with a formal parameter named TST,
when You invoke Your proc You should write something in the line ...
Code: |
//S EXEC PROC=yourproc,TST=tst_value |
the value to be used for the tst_value depends only on the way yourproc was written |
|
Back to top |
|
|
meenakshi_forum Warnings : 1 Active User
Joined: 27 May 2008 Posts: 121 Location: India
|
|
|
|
Example--
//SNDR015N PROC PROD=PROD,
// TRT=113N,
// PLR=PLR1
//step10 exec pgm=sdfg10
//INDBA6 DD DISP=SHR,
DSN=&PROD..FNG.KJGT1.SNDR&TRT..MKG
****************
********************************* Top of Data ************
//MNDR018N JOB (0000,0000),' Data valid',
// CLASS=5,PRTY=10,MSGCLASS=A
//*
// EXEC SNDR015N,TRT=113N
******************************** Bottom of Data **********
********************************* Top of Data ************
//MNDR019N JOB (0000,0000),' Data valid',
// CLASS=5,PRTY=10,MSGCLASS=A
//*
// EXEC SNDR015N,TRT=213N
******************************** Bottom of Data **********
My requirement is when both the jobs are executed then they should pass different values to PROC, so that in the file the value of TRT changes for different run.
Please check my PROC, what shall i give there for TRT?
Thanks. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
In the PROC, you could specify some default value.
As you have provided a value in both EXEC statements, the value "in the PROC" will never be used, so the coded value will not matter. |
|
Back to top |
|
|
meenakshi_forum Warnings : 1 Active User
Joined: 27 May 2008 Posts: 121 Location: India
|
|
|
|
Thank you. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
meenakshi,
you might want to omit the TST default value from the PROC so it never gets run with the wrong value by accident. This way it must always be in the execution JCL. |
|
Back to top |
|
|
|