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
 

 

Dynamically creation of JCL statements

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

New User


Joined: 17 Sep 2008
Posts: 5
Location: Trivandrum

PostPosted: Thu Apr 23, 2009 8:33 pm    Post subject: Dynamically creation of JCL statements
Reply with quote

Hi All,

I am facing a problem.

My requirement is such that, in first step of a JOB i'm calling a PROC and that PROC is creating JCL statements dynamically for the next step where another PROC has been called.

These Dynamically created JCL statements are stored in a Member of a PDS and using Include statement i'm trying to Embed the JCL statements.

But it seems it is not embedding the JCL statements.

Is it possible to use the same member of a PDS in the second step which you are creating in the first step??

If it is not possible then please give me a solution.

Remember using two jobs is not an option.
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Apr 23, 2009 8:51 pm    Post subject:
Reply with quote

JCL is expanded and includes are done before you job begins executing!

You would have to the create include then submit another job to use it.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Thu Apr 23, 2009 8:57 pm    Post subject:
Reply with quote

Quote:

Is it possible to use the same member of a PDS in the second step which you are creating in the first step??
No, this is not possible. JCL is read into JES, where the converter/interpreter deciphers the commands, expands the procedures, resolves data set references, and so forth. So you're asking to change JCL that has already been through this process. You cannot do this in a single job, period.

REDESIGN YOUR PROCESS!
Back to top
View user's profile Send private message
mtaylor

Active User


Joined: 20 Feb 2009
Posts: 108
Location: Kansas City

PostPosted: Thu Apr 23, 2009 11:49 pm    Post subject:
Reply with quote

An alternative (as Craq indicated): it's possible to dynamically generate JCL and then submit the job to run the JCL you just generated using an 'internal reader' (see the JCL Ref manual for details).
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Thu Apr 23, 2009 11:57 pm    Post subject:
Reply with quote

Quote:
Remember using two jobs is not an option.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Apr 24, 2009 12:02 am    Post subject:
Reply with quote

Quote:
My requirement is such that, in first step of a JOB i'm calling a PROC and that PROC is creating JCL statements dynamically for the next step where another PROC has been called.

Remember using two jobs is not an option.


One of these requirements will have to change.
Back to top
View user's profile Send private message
Saugata.Mukherjee

New User


Joined: 17 Sep 2008
Posts: 5
Location: Trivandrum

PostPosted: Fri Apr 24, 2009 9:32 am    Post subject:
Reply with quote

Thank you all, i got my Answer crystal clear. icon_smile.gif

I have to change my approach it seems icon_rolleyes.gif
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 how to DYNAMICALLY write sort cond to... mohamedmubee COBOL Programming 13 Fri Aug 26, 2016 11:46 pm
No new posts PL/I: opening file w/ dynamically det... Sam Dodgers PL/I & Assembler 6 Wed Jul 27, 2016 4:05 pm
No new posts ISPF Tables Creation newsysprg TSO/ISPF 6 Wed Jul 13, 2016 2:21 pm
No new posts Symbolic Parameters in SYSIN DD state... madishpa DFSORT/ICETOOL 3 Mon Jun 27, 2016 6:23 pm
No new posts How to detect file creation event? vasanthz All Other Mainframe Topics 5 Fri May 20, 2016 1:33 am


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