adspace
How do you run a COBOL batch program from a JCL? How do you run a COBOL/DB2 program?
Answer Posted / Praveen Mishra
To run a COBOL batch program using the JCL, you can create a job card with appropriate specifications such as input and output datasets, library lists, and other required options. Here is an example of a simple JCL for running a COBOL program:nn```JCLn //JOB NAME.n JOB (YOUR_JOB_NAME), n 'YOUR_CLASS', n DD DISK (n DD DSN=YOUR_DATASET, n DISP=SHR, n UNIT=SYSDA,n SPACE=(CYL,1) n ), n EXEC PGM=YOUR_COBOL_COMPILERn SYSPRT DD SYSOUT=*n SYSIN DD DSN=YOUR_COBOL_SOURCE,n DISP=SHR, n UNIT=SYSDA,n SPACE=(CYL,1)n STEPLIB DD DSN=YOUR_LIBNAME,DISP=(NEW,CATLG),SPACE=(CYL,1)n /END-JCL"nReplace (YOUR_JOB_NAME), (YOUR_DATASET), (YOUR_CLASS), and (YOUR_COBOL_COMPILER) with the appropriate names for your specific job, dataset, class, and compiler.nnTo run a COBOL/DB2 program, you can modify the EXEC PGM line to point to the DB2 processor instead of the COBOL compiler.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category