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 SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am


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