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
In COBOL programming, what is PERFORM? What is VARYING?
what is amode(24), amode(31), rmode(24) and rmode(any)?
What are different data types in cobol?
explain sorting techniques in cobol program?
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
Why occurs cannot be used in 01 level in COBOL?
What is the difference between comp and comp-3?
What the difference is between continue and next sentence?
How do you define a variable of comp-1 and comp-2?
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
Name some of the examples of COBOl 11?
What is a report item?
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
What is the Purpose of POINTER Phrase in STRING command in COBOL?
What is the difference between external and global variables in COBOL?