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
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
Which division and paragraphs are mandatory for a COBOL program?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.
How are the next sentence and continue different from each other?
how do you reference the variable block file formats from cobol programs
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
Explain what you understand by passing by value.
Write a program to explain size error.
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
What is comp-1 and comp-2?
What are literals?
What are the different rules for performing sort operation?