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
The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The disp in the JCL is SHR and the pgm opens the file in EXTEND mode. What happens ?
Hello Guys, I have 1+ Year Experience in MAINFRAME TESTING. After 1 Week I have an Interview With a Company on Mainframe Testing. Please Could You Guys Please Suggest me What Sections Should I prepare ?? ___Tell Me the Topic Or Appropriate Site & Links. ?? ---------------Thank You
Is their any set of rules for dd? Explain.
How do you access an uncatalogued dataset in a jcl?
how do you access an uncataloged dataset in a jcl?
What is the function of the steplib dd statement?
write a jcl to execute a job by 7:00 am on jan 20,1986?
how can you check if a file is empty using jcl?
What is the syntax of JCL statement?
Many jcl statements contain specific values designed to direct and control the execution of the statement. What are these fields called?
What is the use of disp parameter?
Differentiate between addressing mode and run mode.
What is the function of //cntl statement?
what JCL Procedures?
how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?