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
 
Submitting JCL using COBOL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sudheer_kumar

New User


Joined: 27 Dec 2005
Posts: 16

PostPosted: Mon Apr 10, 2006 4:44 pm    Post subject: Submitting JCL using COBOL
Reply with quote

How to submit JCL via a Cobol program?

Regards,
Sudheer
Back to top
View user's profile Send private message

vidhyanarayanan

New User


Joined: 23 Dec 2005
Posts: 52

PostPosted: Mon Apr 10, 2006 5:09 pm    Post subject:
Reply with quote

Hi Sudheer,

You can submit the JCL thro COBOL program using the concept called
INTERNAL READER. if you want more details, let me know.



Regards,
vidhya
Back to top
View user's profile Send private message
kamran

New User


Joined: 01 May 2005
Posts: 55

PostPosted: Mon Apr 10, 2006 5:20 pm    Post subject: Re: Submitting JCL using COBOL
Reply with quote

Hi,
Also I haven't done it yet in cobol but I think the logic is not different to others like rexx!
Anyhow for submitting a jcl via every program you must allocate a jes2 file with the bellow specification:
//anyname DD SYSOUT=(class,INTRDR)
the class can be any defined class in your system.
Certainly you are familiar with procedures to be done to write some records in any file in cobol.All the thing you need is to define some records as bellow in working storage section:
01 jcl-recs.
05 jcl-line-1 pic x'80' value 'something!'
05 jcl-line-2 pic x'80' value 'something!'
...
...
a select file in file-control and a FD in file section and ...
like an ordinary file opening for output, writing jcl-lines and closing it and the difference is just in attrebute of allocated file.

In CICS you can use spoolopen spoolclose spoolwrite instructions.
Back to top
View user's profile Send private message
vidhyanarayanan

New User


Joined: 23 Dec 2005
Posts: 52

PostPosted: Mon Apr 10, 2006 6:17 pm    Post subject:
Reply with quote

In the procedure division,
code like this....

move '// a jcl statement ' to outrec
write outrec.
.
.
. just try this for creating a ps via cobol. u ll understand easily then.

In ur run jcl,
// s1 exec pgm= pgm name
// dd1 dd sysout =(*,intrdr)

Hope this ll help u....

regards,
vidhya
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 -> JCL & VSAM 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