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
 

 

Need help - Automating JCL run

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

New User


Joined: 03 Jan 2006
Posts: 13
Location: Bangalore india

PostPosted: Thu Jun 29, 2006 4:46 am    Post subject: Need help - Automating JCL run
Reply with quote

Hi all,

Need your help again.

I have a JCL which takes an INPUT file, executes a program and generates an OUTPUT file (through some logic) and an EXTRACT file.

Now, i have about 100 INPUT files for which i want to run the same job.

I mean for Files INPUT1, INPUT2 to INPUT100 i want OUTPUT1, OUTPUT2 to OUTPUT100 and till EXTRACT100.

Could i define these input, output and extract PS names in some dataset and change the JCL to pick it dynamically, one by one and run.

Please suggest how? a sample code will be of great help.

Another step would be to track errors. If the job aborts in between how will i find out which file it was procesing when it abended?

Thanks,
Puneet
Back to top
View user's profile Send private message

superk

Moderator Team Head


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

PostPosted: Thu Jun 29, 2006 5:19 am    Post subject: Re: Need help - Automating JCL run
Reply with quote

I would think that you would either:

A. Write a program that reads the control file (with the input/out/extract dataset names), and then builds one 100-step job with all of the proper dataset allocations, and then submits it.

B. Have the job (JOBA) read the control file and build the JCL for the next job (JOBB), filling in the proper dataset allocations, then submitting JOBB. JOBB would run and, if successful, remove the one line from the control file, and submit JOBA. This process would continue until either: a. there are no more entries in the conrol file or b. one of the JOBB jobs abends.

C. Have the program that creates the output and extract datasets use a dynamic allocation routine for the DD names as specified by the control
file.

D. Run a TSO Batch job to do all of this with CLIST or REXX and do the same basic process as C.
Back to top
View user's profile Send private message
puneet478

New User


Joined: 03 Jan 2006
Posts: 13
Location: Bangalore india

PostPosted: Thu Jun 29, 2006 5:44 am    Post subject: Re: Need help - Automating JCL run
Reply with quote

Hi Superk,

Thank you very much for the quick reply.

I found method B most convenient to me. I know how to submit a JCL from within another JCL (submitting JOBB from JOBA) but i am not quite sure on creating a dynamic JCL (JOBB) from JOBA.

Could you please provide some more details on this?

Thanks & Regards,
Puneet
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Fri Jun 30, 2006 1:39 am    Post subject: Re: Need help - Automating JCL run
Reply with quote

I don't really understand the question. You can use anything you want to that is capable of writing 80-byte, Fixed-Block records sequentially.

However, I've got a better idea.

Create a PDS with one member that contains the required DD statements for the run:

Code:

'MY.PDS(FILEDD)'

//INPUT   DD DSN=INPUT.DATASET1,DISP=SHR
//OUTPUT  DD DSN=OUTPUT.DATASET1,DISP=(,CATLG,DELETE),...
//EXTRACT DD DSN=EXTRACT.DATASET1,DISP=(,CATLG,DELETE),...


and then just INCLUDE the member where you need to know the dataset names:

Code:

//JOBSTEP EXEC MYPROG
// INCLUDE FILEDD
//....


At the end of the job, update the contents in 'MY.PDS(FILEDD)' with the next set of dataset names, and then resubmit the job.
Back to top
View user's profile Send private message
puneet478

New User


Joined: 03 Jan 2006
Posts: 13
Location: Bangalore india

PostPosted: Fri Jun 30, 2006 4:23 am    Post subject: Re: Need help - Automating JCL run
Reply with quote

Hi Superk,

Sounds good. though the Data Set will be updated with new DDs but still i will have to submit the job again manually, right!

As i can not again come back to previous step of JOBB (step 1) to submit again JOBA. I dont think this looping works in JCL though i am sure.

Anyways, thanks a lot for your time and help. I will do it this way.

Regards,
Puneet
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 Automating the JCL rdr JCL & VSAM 11 Wed Mar 02, 2016 6:07 pm
No new posts Automating the job flows by using the... chandrupegasus All Other Mainframe Topics 10 Mon Jul 01, 2013 3:48 pm
No new posts Automating element generate on DLET f... Tebogo23 CA Products 1 Wed Sep 29, 2010 1:40 pm
No new posts Automating Newcopy thru Endevor Tebogo23 CICS 9 Tue Sep 14, 2010 4:33 pm
No new posts Automating a mainframe application ma... dick scherrer Testing & Performance analysis 8 Wed May 06, 2009 2:52 pm


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