View previous topic :: View next topic |
Author |
Message |
ravii_cbe Beginner
Joined: 28 Mar 2003 Posts: 6 Topics: 5 Location: Chennai
|
Posted: Wed May 28, 2003 6:32 am Post subject: How to write embedded JCL in a cobol program? |
|
|
Can you reply me a sample Cobol program to embedded the JCL (i.e how write a Cobol program to generate the JCL) _________________ Thanks & Regards
M. RaviShankar |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Wed May 28, 2003 7:42 am Post subject: |
|
|
Ravi,
Code: |
FD OUTPUT-FILE
RECORD CONTAINS 80 CHARACTERS
LABEL RECORDS ARE OMITTED
DATA RECORD IS OUTPUT-REC.
01 OUTPUT-REC PIC X(80)
01 JCL-STATEMENT-AREA.
05 JCL1.
10 FILLER PIC X(18) VALUE
'//JOBNAME JOB 0,'''.
10 FILLER PIC X(07) VALUE 'NOTIFY'.
10 JCL-JOBNAME PIC X(08) VALUE SPACES.
10 FILLER PIC X(45) VALUE
''',MSGCLASS=Y,CLASS=D '.
10 FILLER PIC X(02) VALUE SPACES.
.....N NUMBER OF JCL STATEMENTS.
01 INTRDR-STATEMENT PIC X(80) VALUE SPACES.
01 W-SUB PIC 9(3) value + 0.
PROCEDURE DIVISION.
PERFORM VARYING W-SUB FROM 1 BY 1 UNTIL W-SUB > N
MOVE JCL-STATEMENT(W-SUB) TO INTRDR-STATEMENT
WRITE OUTPUT-REC FROM INTRDR-STATEMENT
END-PERFORM.
|
Hope this helps...
cheers
kolusu |
|
Back to top |
|
|
CaptBill Beginner
Joined: 02 Dec 2002 Posts: 100 Topics: 2 Location: Pasadena, California, USA
|
Posted: Wed May 28, 2003 12:46 pm Post subject: |
|
|
And when you write the JCL out and want to have the created JCL run a job, be sure to use the INTRDR parm on the output dataset. |
|
Back to top |
|
|
glingaraj Beginner
Joined: 17 Sep 2003 Posts: 1 Topics: 0
|
Posted: Mon Sep 29, 2003 3:11 am Post subject: |
|
|
|
|
Back to top |
|
|
k_sharma Beginner
Joined: 14 Aug 2003 Posts: 10 Topics: 3 Location: Dallas, US
|
Posted: Mon Sep 29, 2003 5:45 am Post subject: |
|
|
Hi
I think we have to give following in JCL also.
AB DD SYSOUT=(*,INTRDR)
Where AB is file name used in the above COBOL program.
Cheers
K Sharma |
|
Back to top |
|
|
|
|