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

I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?

0 Answers  


Explain in DD statement what is the use of DCB parameter?

0 Answers  


Explain about ISPF/TSO Commands

0 Answers  


i have 10steps and i want run step3 and based on step3 i want execute step7,8,9,10?in jcl

1 Answers  


IF we are calling a PROC from Jcl...This Proc have 3 steps in it and we want to execute only the second step using the JCL, How to do it?? Please give the answer ASAP:)

8 Answers  






what is the general use of PARM? Give an explanation about the system defined parameters that could be passed through this PARM like XREF,LIST,LET,APOST,RENT etc..

3 Answers   Cognizant,


I have 60 steps in the JCL and want to Execute Only First from PROC by overriding in JCL ?

0 Answers  


Can an individual step be restricted from using all the jobs allowed cpu time?

0 Answers  


I am getting the file from Unix to Mainframes for every 15 minutes. The mainframe job get abended with bad records coming from unix. I recovered that by deleting the bad data. I need permenant solution how to fix the issue? The record is getting characters in in first 9 positions which it should not. Please provide me the solution how to skip the records if it finds the charcters in the first 9 positions. K

3 Answers  


How to delete AIX ? i) IEBGENER ii) IDCAMS iii) PURGE iv) All of the above

3 Answers   HSBC,


Suppose your program is reading a Sequential Vsam file. The file contains 10 records. How will you code the JCL to read only 2nd, 5th, 7th,and 10th record?

1 Answers   Thomson,


I have 15 flat files. each record in the files have the monthly salary for 12 months with the employee number. Now I want to concatenate the 15 files such that for the employee numbers that are common the o/p file should have only one record and the salaries should be concatenated to that record. How can we do it with JCL?

1 Answers  


Categories