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


Please Help Members By Posting Answers For Below Questions

which parameter is use to declare the name of dataset in dd statement?

971


Explain how can a stopped job be started again?

855


What is the function of dd disp parameter?

848


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

881


what is a jcl?

870


IIN APITUDE THEY GAVE ONLY 10 QUESTIONS.. THEY ARE SIMPLE ONE FROM NUMBER SERIES,BOATS,TIME & DISTANCE,PROFIT &LOSS,FIND OUT THE NUMBER ? 9 25 4 36 81 64 49 AND surveillance SPELLINGS E.T.C

1896


What is the function of dd name parameter with a 2 part structure; audit.report?

945


a dd statement has 2 types of parameters. Name them?

867


What are the parameter we cannot use in procedure? How many instream we can write in single jcl?

774


how you can access an uncataloged dataset in a JCL?

866


How can the attributes of one sms dataset be copied to another dataset?

1109


What are the parameter we cannot use in procedure?

819


what sort card you will use to copy the data from one dataset to another dataset?

947


A chkpt is the parameter coded for multi-volume qsam datasets in a dd statement. When a chkpt is coded as chkpt=eov, a checkpoint is written to the dataset specified in the sysckeov statement at the end of each volume of the input/output multi-volume dataset. State whether true or false?

977


What are the difference between jcl and jes?

1283