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

How to Invoke a job from a main job?


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prasanth_urs

New User


Joined: 04 Dec 2006
Posts: 44
Location: Pune,India

PostPosted: Tue Mar 13, 2007 11:07 am
Reply with quote

Can anyone of you please provide solution for this issue??

I have to invoke a job from a main job.

Is it possible?? if so, Please provide the syntax or an example?

Also please tell me whether any parameters (like the filenames) can be passed while invoking the job from the main job?
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Tue Mar 13, 2007 11:16 am
Reply with quote

Search on the forum with
IEBGENER or sysout = (*,INTRDR)
You will get that. This is disscussed many times already.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Tue Mar 13, 2007 11:28 am
Reply with quote

Hi There,


You can add the following step in ur main jcl

//SUB01 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DSN=Name of the dataset that contain jcl,DISP=SHR
//SYSUT2 DD SYSOUT=(A,INTRDR),DCB=(LRECL=80,BLKSIZE=80)
//
Back to top
View user's profile Send private message
prasanth_urs

New User


Joined: 04 Dec 2006
Posts: 44
Location: Pune,India

PostPosted: Tue Mar 13, 2007 11:33 am
Reply with quote

Thanks Ekta,

But the other query is still on.

If i have to pass a file from the main Jcl to the invoking jcl then what is to be done??
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Mar 13, 2007 5:44 pm
Reply with quote

Then your main job is going to have to both create and submit the subsequent job. JCL doesn't take "parameters" pased from another job.

You may want to look into using the INCLUDE and SET parameters as a possible way to define a dataset name.
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Invoke stored procedure via batch JCL. DB2 2
No new posts Invoke IMS transaction from .NET IMS DB/DC 1
No new posts JCL to invoke Python in z/OS JCL & VSAM 20
This topic is locked: you cannot edit posts or make replies. Invoke REXX thru JCL to expand the co... CLIST & REXX 2
No new posts ICE039A H INSUFFICIENT MAIN STORAGE -... DFSORT/ICETOOL 3
Search our Forums:

Back to Top