Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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
No new posts Linkage editor is part of COBOL, z/OS... ankit.jain COBOL Programming 4 Fri Apr 20, 2018 4:17 pm
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts Call COBOL or PLI with a click from w... vaibhav gs All Other Mainframe Topics 1 Mon Apr 16, 2018 7:29 pm
No new posts COBOL MVS options BiswajitDG COBOL Programming 8 Fri Apr 06, 2018 12:35 am
No new posts batch cobol/db2 paragraph fall thru a... alois eisshofer COBOL Programming 5 Wed Mar 14, 2018 12:21 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us