How do you submit JCL via a Cobol program?

Answer Posted / bala

Jcl:
JOB: //STEP1 EXEC PGM=MAINPM
//DD1 DD DSN=MUTHU.TEST,DISP=SHR
//JCLDD DD SYSOUT=(*,INTRDR)

Cobol:
PROGRAM:MAINPGM
SELECT JCLFILE ASSIGN TO JCLDD…. (Environment Division)
FD JCLFILE.
01 JCL-REC PIC X(80). (File Section)
OPEN OUTPUT JCLFILE. (Open in output and write JCL statements)
MOVE ‘//TESTJOB JOB 1111’ TO JCLREC.
MOVE ‘//STEP01 EXEC PGM=IEFBR14’ TO JCLREC.
CLOSE JCLFILE (TESTJOB will be submitted automatically)

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the function of the dd dcb keyword?

717


Matching Logic in Jcl not in cobol.Could any one please answer this question

3686


I want to JCL sort for Non-COMP and COMP-3 fields SORT FIELDS=(1,5,A,6,11,A,12,11,A,19,1,A,20,1,A),FORMAT=BI,EQUALS Length of comp bytes is 11 bytes which start at 6byte and 12 byte considering 11 bytes in comp-3 is 6 bytes. Can anyone tell if the above sort work SORT FIELDS=(1,5,A,6,6,A,12,6,A,19,1,A,20,1,A),FORMAT=BI,EQUALS does not works OK

1494


how to do automated restart when a job abends?

858


Is it possible to define dd statements as you want?

656






Explain the job statement in jcl?

661


How to pass the parameter in parm using linkage section ? (syntax)?

661


In sms datasets, what is the function of the dd mgmtclas keyword?

869


What do you know about jcl?

658


We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?

1776


Name the parameters which can be used to limit the number of records written to a sysout dataset?

662


What are steplib and joblib?

731


what is “Cond= even” and “Cond=only”?

756


When output dataset space is required, what quantity categories are used?

845


Brief description of inline procedure of jcl.

695