Passing a variable parm from JCL to a cobol/db2 program
Answer Posted / tejaratbours
hi.
i need help
i need Passing a variable parm from JCL to a cobol/db2
program
I'm trying to write a batch cobol/db2 pgm wich receive in
linkage section some paremeters
I succeeded to pass a static string of characters but what
I need is variable parameters (INPUT )
//DDB5A59 JOB CLASS=A,MSGCLASS=R,MSGLEVEL=(1,1),NOTIFY=xxxx
// REGION=0M
// SET INPUT=MYNAME <=====
//PH01S01 EXEC PGM=IKJEFT01,DYNAMNBR=20,COND=(4,LT)
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DBSN)
RUN PROGRAM(COBPROG) PLAN(NACPLN) -
PARMS('INPUT') -
LIB('MYDB.TRNSCTN.LOADLIB')
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//INFILE DD DSN=MYDB(&INPUT),DISP=SHR
//ERRLST DD SYSOUT=P,DCB=RECFM=F,FCB=L56
The program (cobprog) is that when I run the job ,if PARMS
('&INPUT') returns :&INPUT and
if PARMS(&INPUT) returns :null
i need "myname" to the cobol/db2 program and name of the
member (DSN=MYDB(&INPUT),DISP=SHR)
Do you think helpe me?
Thanks
| Is This Answer Correct ? | 3 Yes | 5 No |
Post New Answer View All Answers
if we want to use a gdg which is already created by some job, then how to use the reference of the last generation in a jcl?
Explain the function of dd disp parameter?
Where & How Do You Code Identifier In Jcl?
Explain the function of the dd dcb keyword?
How gdg are concatenated?
How jcl is used for testing batch programs?
what operation is performed by job statement?
How is the record format of an output dataset specified?
What is jcl in mainframe?
What parameter directs the output of the job log dataset?
hello friends ,i have exam in Hsbc,pls any on send me placement papers and technical questions on mainframes,thank u
Suppose I have five jobs to do. But I want to hold one?
How to run cobol program using jcl?
Where can program checkpoints be stored for use in a restart?
How can the attributes of one sms dataset be copied to another dataset?