|
View previous topic :: View next topic
|
| Author |
Message |
puneet478
New User
Joined: 03 Jan 2006 Posts: 13 Location: Bangalore india
|
|
|
|
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 |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
 |
puneet478
New User
Joined: 03 Jan 2006 Posts: 13 Location: Bangalore india
|
|
|
|
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 |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
 |
puneet478
New User
Joined: 03 Jan 2006 Posts: 13 Location: Bangalore india
|
|
|
|
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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|