View previous topic :: View next topic
|
Author |
Message |
suvarna
New User
Joined: 24 Aug 2005 Posts: 13
|
|
|
|
Is it possible to loop in JCL?
That is i want to insert around 20 DD DSN='file name', DISP=SHR for each file name.This is for the purpose of merging all these files to a single report file.
Now I am manually inserting each of these steps. If I have these file names in a seperate file is it possible by some means to insert DD DSN='file name', DISP=SHR for each of these files and then do a merge for these files? |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
As you describe your problem I suppose that you want to append your files to an output, is true?
My advise is to connect/concatenate your input as show in the JCL User's Guide at the link below:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/IEA5B506/4.2.1.4?DT=19971021190515
This advise has one mainly reason: if you append data(with disposition MOD in ouptut) you must create first a dataset with correct space not released and so you may have two(but only one of that) problem: first is that space is not enough; the second is that unnecessary space, at the end of your work is not released.
If you want to persevere with MOD disposition you must to know that JCL can't loop but can only restart and to do what you need you can use: or a restart or a proc instream or catalogued.
In every case I suggest you to search in this forum before posting because this argument is aleady treated. |
|
Back to top |
|
|
Prandip
New User
Joined: 04 Mar 2005 Posts: 84 Location: In my tiny cubicle ...
|
|
|
|
If the dataset names are listed in another dataset, why not just use an INCLUDE statement to use the list:
Example: the PDS 'MY.PARMLIB(LIST)' contains the list of datasets for concatenation:
//SYSUT1 DD DISP=SHR,DSN=MY.DSN1
// DD DISP=SHR,DSN=MY.DSN2
....
// DD DISP=SHR,DSN=MY.DSN20
Then, use this member in your job:
Code: |
//MYJOB JOB (acctg,....)
//*
// JCLLIB ORDER=MY.PARMLIB
//*
//STEPXXXX EXEC PGM=IEBGENER
// INCLUDE MEMBER=LIST
//SYSUT2 DD DSN=MY.NEW.COMB.DSN,DISP=(MOD,CATLG,DELETE),...
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*
|
|
|
Back to top |
|
|
ajayvamsi
New User
Joined: 21 Jul 2005 Posts: 56 Location: Hyderabad
|
|
|
|
Hi Prandip,
u r right u can specify thru INCLUDE statment and the path of that member can be specified the JCLLIB ...thanks |
|
Back to top |
|
|
|