IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to submit a job from cobol


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Apr 03, 2007 12:38 pm
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
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: 2358
Location: Israel

PostPosted: Tue Apr 03, 2007 9:29 pm
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
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

Moderator Emeritus


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

PostPosted: Thu Apr 05, 2007 1:50 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top