vrch
New User
Joined: 21 Mar 2005 Posts: 20
|
|
|
|
Hello Roshan,
To write a jcl in cobol progam u have to use display verb in cobol for all the statements of jcl.Here i am giving a sample jcl in cobol for creating a dataset.
IDENTIFICATION DIVISION.
PROGRAM-ID. DSDATE.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
PROCEDURE DIVISION.
DISPLAY '//KIRAN1CD JOB (0400,XXX),''KIRAN CH'',CLASS=B,'
DISPLAY '// MSGLEVEL=1,1),NOTIFY=MGPB16,REGION=4M,'
DISPLAY '// MSGCLASS=X'
DISPLAY '//GENER01 EXEC PGM=IEBGENER'
DISPLAY '//SYSIN DD DUMMY'
DISPLAY '//SYSPRINT DD SYSOUT=*'
DISPLAY '//SYSUT1 DD SN=aaa.bbb.ccc,DISP=SHR'
DISPLAY '// DISP=(NEW,CATLG,DELETE),'
DISPLAY '// SPACE=(TRK,(9,3,1),RLSE),'
DISPLAY '// UNIT=DISK'
DISPLAY '//'.
000-EXIT.
STOP RUN.
Then you compile this program as usual as u compile a cobol program and then run the program using run jcl by adding the following statement in u r run jcl program.
//SYSOUT DD SYSOUT=(*,INTRDR)
In this way u can compile and run any jcl using cobol.
Let me know whether u can or not?
Thanks,
Vrch |
|