IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Copy multiple (dynamic) PS files to another PS file.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prash_infy

New User


Joined: 31 Aug 2006
Posts: 20

PostPosted: Tue Jan 19, 2010 10:03 pm
Reply with quote

I have a requirement of copying multiple files which are created dynamically by a REXX code to another PS file.

Example

ABC.XYZ.File1
ABC.XYZ.File2
ABC.XYZ.File3
ABC.XYZ.File4
and so on.

Is there a way or utility to Copy ABC.XYZ.* files (number of input files may vary) to another PS files.

Thank You!
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jan 19, 2010 10:23 pm
Reply with quote

Hello,

As each file is created in the rexx code, also create "copy jcl" for that file. When the rexx code completes, submit the created jcl to copy the files (this would be one JOB with a separate step for each file to be copied).
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jan 19, 2010 10:28 pm
Reply with quote

or concatenated?
Back to top
View user's profile Send private message
prash_infy

New User


Joined: 31 Aug 2006
Posts: 20

PostPosted: Tue Jan 19, 2010 10:48 pm
Reply with quote

Can we use wild card for copying the files?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Jan 19, 2010 10:54 pm
Reply with quote

it depends!
if You had been more specific/clear on what You want to do You might have gotten better replies!

like for example...
one to one copy, copy/append/concatenate/sort to a single file, ...

without anything more to work on I would second Dick Sherrer' s motion,
since You are already using rexx to generate the names, expand the script also to create the copy
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jan 19, 2010 10:55 pm
Reply with quote

Hello,

Only if you have some product installed that supports "wildcards" - you need to ask your local support what is available on your system.

JCL will not support this. . .
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Tue Jan 19, 2010 11:49 pm
Reply with quote

See ISPF services LMDLIST and LMCOPY. That should be enough to throw this together in about 15-20 lines of Rexx code.
Back to top
View user's profile Send private message
prash_infy

New User


Joined: 31 Aug 2006
Posts: 20

PostPosted: Wed Jan 20, 2010 12:23 am
Reply with quote

Hi enrico-sorichetti,

I have multiple files which are created in a REXX code which many vary depending upon the input. Like if input has 1 record 1 output file will be created and so on.

Requirement is to copy all the files

ABC.XYZ.File1
ABC.XYZ.File2
ABC.XYZ.File3
ABC.XYZ.File4
and so on.

to one PS file say ABC.XYZ.FINAL

Thanks for all the suggestions!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top