View previous topic :: View next topic
|
Author |
Message |
kudamala
New User
Joined: 12 Sep 2008 Posts: 51 Location: Bangalore
|
|
|
|
Hi
I have some problem in passing parameter value from jcl to program.
My requirement is; I have a cobol-DB2 program that fetches data from DB2 table based on the vendor name. I should get the vendor name from JCL. We have one JCL where we set the vendor name, and call the proc. as follows:
//xyz JOB jobcard details
// JCLLIB ORDER=(XYS.ABC.DEF)
// SET HLQ=DEV
// SET PRE=T
// SET LVL=D
// SET VEN=ABCD
//JOBLIB DD DSN=DEV.PGM.LOAD,DISP=SHR
// INCLUDE MEMBER=XXX1111
In include member XXX1111
// SET CONTROL=XYZ1234
//STEP010 EXEC PGM=IKJEFT1B,
// PARM='UTL00000 PGM=DUPLICAT,HLQ=&HLQ,LVL=&LVL,PRE=&PRE',
// DYNAMNBR=20,
// COND=(0,NE)
// INCLUDE MEMBER=UTL01CI1
//STEP020 EXEC PGM=IKJEFT1B,
// DYNAMNBR=20,
// COND=(0,NE)
//FS DD DSN=&HLQ..XYZ.EXTRACT.&VEN..TEMP,
// DISP=(,CATLG,DELETE),
// SPACE=(TRK,(150,75),RLSE),
// LRECL=95,
// RECFM=FB
//SYSOUT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=U
//SYSTSIN DD DSN=&HLQ..DUPL.PARMLIB(XYZ1234),
// DISP=SHR
The control card XYZ1234 is as follows:
DSN SYSTEM(DB2&PRE) RETRY(2)
RUN PLAN(&LVL.EUMN0) PROGRAM(EUM403P1) -
LIBRARY('&HLQ..PGM.LOAD') -
PARMS('&VEN')
END
Could any body help, what is the problem in this JCL parm?
when I display the vendor name it shows &VEN instead of ABCD
Thanks in advance
Ravi |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Are the other symbolic parameters being substituted correctly? Please show your expanded JCL as it appears in JESJCL or whatever it's called. |
|
Back to top |
|
|
mallik4u
New User
Joined: 17 Sep 2008 Posts: 75 Location: bangalore
|
|
|
|
Hi Ravi,
Have you tried with removing single quotes in PARMS?
I am thinking that since you mentioned the &VEN in single quotes system might be considering it as a string
Regards,
Mallik |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
why would you expect the contents of &HLQ..DUPL.PARMLIB(XYZ1234) to undergo substitution? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
your sysin contains the following:
Code: |
DSN SYSTEM(DB2&PRE) RETRY(2)
RUN PLAN(&LVL.EUMN0) PROGRAM(EUM403P1) -
LIBRARY('&HLQ..PGM.LOAD') -
PARMS('&VEN')
|
I would break the above into several members of the parmlib, and then use the symbolic as the member name for a concatenated sysin:
Code: |
//SYSTSIN DD DSN=&HLQ..DUPL.PARMLIB(&pre.sys),
// DISP=SHR
this would contain
DSN SYSTEM(DB2T) RETRY(2)
// DD DSN=&HLQ..DUPL.PARMLIB(&lvl.plan),
// DISP=SHR
this would contain
RUN PLAN(DEUMN0) PROGRAM(EUM403P1) -
// DD DSN=&HLQ..DUPL.PARMLIB(&hlq.lib),
// DISP=SHR
this would contain
LIBRARY('DEV.PGM.LOAD') -
// DD DSN=&HLQ..DUPL.PARMLIB(&ven.parm),
// DISP=SHR
this would contain
PARMS('ABCD')
//SYSTSIN DD DSN=&HLQ..DUPL.PARMLIB(END),
// DISP=SHR
this would contain
END
|
in effect, you would have to generate a hardcode parm
for each potential symbolic,
then use the symbolic to create the member name.
by the way, not sure if PARMS is the correct spelling, could be just PARM, but I am not going to look it up. |
|
Back to top |
|
|
kudamala
New User
Joined: 12 Sep 2008 Posts: 51 Location: Bangalore
|
|
|
|
Thanks to all.
I have just removed the COND parameter, it is working now.
once again thanks to Ibmmainframes.com and its members for helping time to time
Regards
Ravi |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
"...not sure if PARMS is the correct spelling, could be just PARM..."
It USED to be PARMS but last time I used it, PARM is acceptable also. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
I don't see how removing the COND parameter fixed your problem. Could you show us your working JCL for the benefit of others? |
|
Back to top |
|
|
|