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


Please Help Members By Posting Answers For Below Questions

write a jcl to execute a job by 7:00 am on jan 20,1986?

881


WORKING-STORAGE SECTION. 01 GROSS-PAY. 05 BASIC-PAY PIC 9(5). 05 ALLOWENCES PIC 9(3). PROCEDURE DIVISION. MOVE 1000 TO BASIC-PAY. MOVE 250 TO ALLOWENCES. DISPLAY GROSS-PAY. STOP RUN. 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VLAUE 123.45 after the statement MOVE W-A TO W-B what will be W-B's value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move

1069


Explain about LMFREE�free data set from its association with data ID

1294


What are the parameters that are used in creating a gdg?

949


Is it possible to code instream data in a PROC?

981


how can the same proc be re-used and called by many jobs?

1182


What is job control language?

806


Differentiate between addressing mode and run mode.

779


what is the purpose of coding notify parameter in job statement?

889


Explain the function of a dd statement?

871


is there any way to execute more than one proc in the same exec statement at the same time..?

2348


Explain the job statement in jcl?

850


what is use of disp parameter in dd statement?

841


Why block size is multiple of lrecl in jcl?

1125


What are s0c1, s0c4, s0c5, s0c7 and socb?

935