Cobol Question:
Download Questions PDF

How do you code COBOL to access a parameter that has been defined in JCL? And do you code the PARM parameter on the EXEC line in JCL?

Answer:

Using JCL with sysin. //sysin dd *here u code the parameters (value) to pass in to Cobol program /* and in program you use accept variable name (one accept will read one row)/.another way. 2) in jcl using parm statement ex: in exec statement parm=’john’,'david’ in Cobol pgm u have to code linkage section in that for first value you code length variable and variable name say, abc pic x(4).it will take john inside to read next value u have to code another variable in the same way above mentioned.

Download Cobol Interview Questions And Answers PDF

Previous QuestionNext Question
Why do we code S9 (4) comp. Inspite of knowing comp-3 will occupy less space ?What do you feel makes a good program?