Discussion Locked

Access Job Name within a Cobol Program

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
On an IBM Mainframe running MVS, is there a way that I can dynamically determine the job name under which my COBOL program is running from within the COBOL program itself.

1 reply

by amosgreg

I assume this is Batch.
The Only way I can think of is to create a parm in the JCL. Read the PArm and as long as the parm was set to the Job name you could access it for identification. Thiws means the parm needs to be instream in each job since the program would need ot include I/O to obtain the PARM information and would be needed in all instances of the job.

As for querying MVS dynamically, I don't believe this can be done from within the program.

This discussion is closed to new replies.