Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Submit a job from a COBOL pgm.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Submit a job from a COBOL pgm.
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    Post subject: Re: Submit a JCL from a COBOL pgm.
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    Post subject: Re: Submit a JCL from a COBOL pgm.
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts COBOL Programming Sandpit? jodrisco COBOL Programming 6 Wed Apr 12, 2017 3:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us