How can we pass data from cobol to JCl?

Answer Posted / rosi

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 ?    6 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Discuss about changing dataset name in proc.

737


What are all the divisions of a COBOL program?

639


What is the difference between binary search and sequential search?

608


Write a program that uses move corresponding.

645


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2030






please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

1924


System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

1559


Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning

651


How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

2687


What are various search techniques in cobol? Explain.

620


Difference between array and sub-script ?

1133


How you can read the file from bottom?

640


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1817


i need a small 3d program using inline and outline.

1614


What is Pic 9v99 Indicates in COBOL?

690