View previous topic :: View next topic
|
Author |
Message |
nishantny
New User
Joined: 02 Oct 2007 Posts: 2 Location: KY, US
|
|
|
|
Hi,
I have multiple files daily with format AAAA.BBB.DTnnnn.THHMMSS.
These files are created using the MGET ftp command and copied from another host system.
Once the FTP step runs, I need to copy these files (maybe 1 or more) to another predefined dataset, so that I can process them further.
Can you please give me a guidline if REXX or anyother M/F utilities can be used (like copying the files XXXX.YYY.* to XXXX.YYY.COMBINED).
Any help will be greatly appreciated.
Regards,
Nishant |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I have to preface my reponse with my observation that your approach to this process leaves a lot to be desired. It's never a good practice to issue an MGET on a remote server and retrieve an unknown number of files. I think you're much better off building a series of GET statements first, then "getting" each file individually to the single output DD (with DISP=MOD specified, of course) and avoiding this whole mess to begin with.
That being said, sticking with a response for REXX, just use the TSO LISTCAT command to find all of the datasets cataloged to the high-level qualifier (in your example AAA.BBB). Then, build the TSO ALLOCATE statement(s) as you desire (either allocating each dataset one-at-a-time or concatenating them all together) and run the copy utility of your choice (IEBGENER/SORT/REPRO).
The post directly below this one has an example of using LISTCAT:
www.ibmmainframes.com/viewtopic.php?t=24879 |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Another method is to use the ISPF service LMDLIST.
O. |
|
Back to top |
|
|
nishantny
New User
Joined: 02 Oct 2007 Posts: 2 Location: KY, US
|
|
|
|
Kevin,
Thanks so much. I understand your point, but the problem is the process at the host (its another vendor outside) is difficult to change. I.e. they highly prefere creating files as per there standards ie. AAAA.BBB.date and time. But since I wont have that info , MGET is the only option, I suppose.
But thanks so much, I will try to implment as per your suggestion, and also the example you gave are very handy since I havent had much of REXX.
Thanks,
Nishant |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Just an FYI, you can do the same process in batch, or in just about any programming or scripting language you wish. You don't have to use REXX. |
|
Back to top |
|
|
|