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
Which statement is used to identify the private libraries in job?
What is job control language?
For what purpose steplib and joblib are used ?
have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records... run a loop from record one to 10 evaluate i/3 if comes even then skip else write to output file
Explain the function of a dd statement?
how to compare two datasets without using superce because output is limited to 133 bytes
List in order the hierarchical levels of jcl?
Mention the types of job control statements?
What is Cataloged Procedures?
what sort card you will use to copy the data from one dataset to another dataset?
Where & How Do You Code Identifier In Jcl?
what is DD statement is used in JCL?
What is 'mounting' of volumes ? Is there anything that a programmer can do in it ? How to find currently mounted volume ?
Explain the function of job statement in jcl?
What is the difference between run mode and addressing mode?