IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Submit a job from a COBOL pgm.


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Roshan_kr

New User


Joined: 13 Mar 2005
Posts: 2
Location: India

PostPosted: Mon May 16, 2005 8:55 am
Reply with quote

I want to submit a job from a COBOL pgm.Could some one help me out?
Back to top
View user's profile Send private message
vrch

New User


Joined: 21 Mar 2005
Posts: 20

PostPosted: Mon May 16, 2005 1:09 pm
Reply with quote

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
Back to top
View user's profile Send private message
i413678
Currently Banned

Active User


Joined: 19 Feb 2005
Posts: 112
Location: chennai

PostPosted: Mon May 16, 2005 5:12 pm
Reply with quote

Hi All,

Adding to above reply.

INTRDR : whatever the statements written in internal reader will be submitted.

to be more cleare the statements used in display statement will be written to INTRDR as SYSOUT is directing to INTRDR and all the statements are submitted.

any issues please let me know.

pavan
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top