How do you run a COBOL batch program from a JCL? How do you run a COBOL/DB2 program?
Answer / 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 |
If I defined space as TRK(10,10) for the one file and lrecl = 4K then tell me how many record will vsam file will contain. will it 1,2,3,4,5 or how many,
I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPRO 3 WIPRO 2 WIPRO 9 TCS 4 TCS 6 TCS 3 i want the record of every company with highest code How can i do that?
Explain the purpose of the dd keylen parameter?
how to execute the last 5 steps in jcl
Can we browse or edit the GDG dataset if it is a tape entry?
What dd statement is used to supply the name of a dataset?
Can we use DISP=SHR in output file in JCL
How would I code JCL to copy a gdg data set G001v00 and create a gdg Data set G001v01
Using DELETE what type of file can you delete? a)SEQUENTIAL FILE B)INDEXED FILE C) D) Some options were there..i cant remember
Why 16 is used in calculating the DPRTY ? as, DPRTY = (num1, num2), THEN, DPRTY = 16* num1 + num2
Can you execute a PROC from another PROC?
Why include statement is used in a jcl?