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
 

 

How can a cobol program can run a jcl?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
rsm_deepak

New User


Joined: 06 Apr 2005
Posts: 31
Location: visakhapatnam

PostPosted: Tue Aug 01, 2006 12:56 pm    Post subject: How can a cobol program can run a jcl?
Reply with quote

I just want to know "To write a cobol pgm that run a jcl"....
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Aug 01, 2006 4:51 pm    Post subject:
Reply with quote

1. Use dynamic allocation to allocate a file to INTRDR. Write the JCL lines into this file, and then put the EOJ sign.

2. Allocate a member; Write the JCL lines into this member; Use TSO's SUBMIT to submit that member.

O.
Back to top
View user's profile Send private message
vijayakumar.yellala

New User


Joined: 19 Apr 2006
Posts: 63
Location: Chennai

PostPosted: Wed Aug 02, 2006 12:38 pm    Post subject:
Reply with quote

Hello,

can u please elaborate this....
Back to top
View user's profile Send private message
crrindia

Active User


Joined: 02 Jul 2005
Posts: 124
Location: Gurgaon

PostPosted: Wed Aug 02, 2006 1:49 pm    Post subject:
Reply with quote

Hi Can you please provide us a sample code for this.

Thanks!
Rathna.
Back to top
View user's profile Send private message
syntelraj
Warnings : 1

New User


Joined: 28 Jul 2006
Posts: 10
Location: Pune

PostPosted: Thu Aug 03, 2006 2:21 pm    Post subject: Re: How can a cobol program can run a jcl?
Reply with quote

You have to simply write the all the JCL staments into SYSOUT or output file in both the cases the output file or SYSOUT will be INTRDR i.'e internal reader.
if you are using the SYSOUT then write the staments using DISPLAY statment or if you are using as a file of 80 character length then use WRITE statement to write the JCL statements into INTRDR.

In RUNJCL code the following statement. ( either ).
//SYSOUT DD SYSOUT=(A,INTRDR) use DISPLAY statement
or
//OUTJOB DD SYSOUT=(A,INTRDR) use WRITE statement.

Hope I have answered your question.
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 Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm


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