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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm

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