how can we pass parameters from JCL to cobol
subprogram...my requirement is i should not get data from
mainprogram but i need it from JCL directly
Answer Posted / abhijit saha
You can do it using SYSIN parameter in JCl and ACCEPT in
COBOL-
JCL using SYSIN
//STEP01 EXEC PGM=CBLPRGM
//STEPLIB DD DSN=SOMETIME.DEMO.LOADLIB,DISP=SHR
//SYSIN DD *
This is a single parameter from STEP01 and SYSIN
/*
Cobol Pgm which uses this JCl
DATA DIVISION.
WORKING-STORAGE SECTION.
..........................
01 SYSIN-PARAMETER pic X(80) value SPACES.
PROCEDURE DIVISION.
..........................
ACCEPT SYSIN-PARAMETER from SYSIN
| Is This Answer Correct ? | 25 Yes | 2 No |
Post New Answer View All Answers
What are steplib and joblib? What for they are used?
What do we mean by 'Virtual storage' for a dataset and for a JOBSTEP ? What is the significance of the following statement for a programmer 'Virtual storage results in program addresses being independent of the addresses that actually exist in a computer' ?
Explain how can return codes be tested before execution of a job step?
what JCL Procedures?
which utility is used a dummy utility?
What are the jcl procedures?
When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?
how would you create a temporary dataset? And where will you use them?
Is condition checking possible in jcl?
Immediate Job opening for mainframe professionals in Keane Bangalore. Please find the below details: Organization: Keane India Location: Bangalore Skill: COBOL, JCL,VSAM,DB2,CICS,IMS,REXX,CLIST Exp: 1 to 4 years only Employment Type: Permenant Employee Note: If you have attended keane interview in past 6 months please ignore this job opening. Please respond to email id keanemfjob@gmail.com OR keanemfjob@yahoo.in with your latest resume and following details, We will contact you within 24 hours: Total IT Exp: Exp in Mainframe: Current CTC: Expected CTC: Notice Period:
what are JCLLIB and STEPLIB in JCL?
How do you run a COBOL batch program from a JCL? How do you run a COBOL/DB2 program?
Suppose there are 2 Input files Infile-1 and Infile-2. Both the Files contain Employee Records. You need to compare both the files and Write the Common Records in third file named Outfile. How can we do this using File-Aid?
State the uses of syspring, sysin, sort fields, sum fields and dummy.
What is the purpose of dd?