Passing a variable parm from JCL to a cobol/db2 program



Passing a variable parm from JCL to a cobol/db2 program..

Answer / 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

More JCL Interview Questions

In job processing, what happens in conversion stage?

0 Answers  


Can anyone tell me the syntax for printing two files at two different destinations in a single step?

3 Answers  


What are the maximum and minimum sizes of any CONTROL AREA (VSAM datasets) ?

2 Answers   Patni,


How to execute 2nd and 4th steps among 5 steps in jcl proc?

0 Answers  


There are 5 steps in a Job. How to bypass the first step by making use of only COND Parameter and not using any Restart and IF/THEN/ELSE parameter?

11 Answers   IBM,


which utility is used to run a cobol-db2 program?

0 Answers   IBM,


a input file contains 1000 records, how to move the first 500 record into one out put file and how to move to second 500 records to anothere output file

6 Answers   ITC Infotech,


i have step1,step2,step3 from where can i start coding cond parameter ?

2 Answers   Verizon,


Explain about File Tailoring

1 Answers  


hi iam learning mainframes,can anybody tell me how to check JCL errors.(after submiting the JCL we have check in spool or is there any other method)

8 Answers  


Explain the function of //jcllib statement?

0 Answers  


Explain about LMGET�read a logical record from a data set

1 Answers  


Categories