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 to submit a job from cobol

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

New User


Joined: 23 Feb 2007
Posts: 3
Location: mumbai

PostPosted: Tue Apr 03, 2007 12:28 pm    Post subject: How to submit a job from cobol
Reply with quote

hi,

i want full code for submiting a job using cobol program pls send me code.


thanku.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 03, 2007 12:38 pm    Post subject:
Reply with quote

Quote:
i want full code for submiting a job using cobol program pls send me code.

And how much are you paying for the supply of code.

The cynic in me says that this may be a HOMEWORK question. But, I may be wrong.

All you need to do is to write the JCL code to a specified file in your program, and in the JCL allocate that filename to the INTRDR using the appropriate sysout class for that device.
Back to top
View user's profile Send private message
Manju-Pacha

New User


Joined: 21 Mar 2007
Posts: 7
Location: Bangalore

PostPosted: Tue Apr 03, 2007 5:57 pm    Post subject:
Reply with quote

Format for the JCL:

Job card
EXEC stmt for ur program
followed by DD statement as given below
//ddname dd sysout=(*,intrdr)


In your cobol program, u need to have a file corresponding to the ddname and write the contents of the Job which u need to execute frm the program to this file using MOVE statements.
Once the JCL for the COBOL program is executed, the Job contents that you are moved to ddname will be read by Internal reader and job will get submitted.

Manju
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Apr 03, 2007 9:29 pm    Post subject:
Reply with quote

Another method is to use the TSO command SUBMIT from within COBOL.

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

New User


Joined: 18 Dec 2006
Posts: 13
Location: usa

PostPosted: Thu Apr 05, 2007 1:40 am    Post subject: Re: How to submit a job from cobol
Reply with quote

You could use Internal reader like Manju gave you or create

01 submit-jcl-line1 pic x(80)
01 submit-jcl-line2 pic x(80)

etccc

01 SUBMIT-JCL49.
05 FILLER PIC X(31) VALUE
' THIS REQUEST WAS CREATED ON'.
05 SUBMIT-JCL49-DATE PIC X(16).
05 FILLER PIC X(03) VALUE
'AT '.
05 SUBMIT-JCL49-TIME PIC X(30).

write submit line 1 thru 49 or however many you have to a file. then copy the file to internal reader.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Apr 05, 2007 1:50 am    Post subject:
Reply with quote

Hello,

No need to copy the file - just assign the DD statement your program writes as output to the internal reader.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Apr 05, 2007 5:30 am    Post subject:
Reply with quote

Or you can do a search on "intrdr" and get 7 pages of hits.
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 XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
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


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