How to pass data from COBOL to JCL

How to pass data from COBOL to JCL Is it possible to pass data from COBOL to JCL? This is an interview question I read somewhere “; ; ; ; #2 Passing data from COBOL to JCL

Well, COBOL can present/pass data to be used later in the job. . .

You would need to clarify what you mean by “passing data to JCL”.

(Reply to #2) #3 I too have the same question!

I too have the same question! I need to pass back a x(50)  Variable value. How can we do it.

(Reply to #3) #4 pass back a x(50) variable value

You need to explain what you mean by “pass back” . . .

If some code is going to determine some value to provide to some subsequent step(s) a simple way to do this is to write the data to a file and read it when it is needed.

dd

#5 Better , u can try ACCEPT

Better , u can try ACCEPT clause

(Reply to #5) #6 Accept will not work for this . . .

ACCEPT brings data INTO a program – not the other way (as was requested).

#7 is it possible to pass data from COBOL to JCL?

The easiest way would be to write it to a file then you can do with it what you please. Using the Linkage section is another option, but if you are doing such a thing I suspect you have a design flaw in what you are trying to accomplish.

(Reply to #7) #8 passing data from COBOL to JCL

“Using the Linkage section is another option”

Ah, no it isn’t. Using the Linkage Section has nothing to do with JCL . . .

Log in or register to post comments