View previous topic :: View next topic
|
Author |
Message |
vijayasimha
New User
Joined: 27 Jun 2005 Posts: 6 Location: india
|
|
|
|
Hi All,
IDCAMS: Is it possible to do the following using IDCAMS. If yes how. If no are there any other options to do this.
a. Copy given set of files(non empty only) into a new set after renaming them.
b. The old set of files should be deleted.
c. The last qualifier for the new files names will be in another file which has to be given as an input to renaming step.
For example:
Old set:
TTPP.P.TRN11701.CLJKKKG6
TTPP.P.TRN11702.CLJKKKG6
TTPP.P.TRN11703.CLJKKKG6
TTPP.P.TRN11704.CLJKKKG6
TTPP.P.TRN11705.CLJKKKG6
File which has the last qualifiers(created dynamically in a batch program)
FSJKKKX1
FSJKKKX2
FSJKKKX3
FSJKL0YC
FSJKL2OG
The old set of file names should be renamed to New set of file names as below
TTPP.P.TRN11701.FSJKKKX1
TTPP.P.TRN11702.FSJKKKX2
TTPP.P.TRN11703.FSJKKKX3
TTPP.P.TRN11704.FSJKL0YC
TTPP.P.TRN11705.FSJKL2PG
After the renaming is successful the old set of files should be deleted.
Let me know if you have any questions.
PS: I am not comfortable using Rexx to do this |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Why not just rename the files rather than copy them into files with the new name.
As for IDCAMS being able to generate the new names, afraid not. |
|
Back to top |
|
|
vijayasimha
New User
Joined: 27 Jun 2005 Posts: 6 Location: india
|
|
|
|
yes that can also be done but i have to have the extention of the new file with a new name which is dynamically generated by the cobol program.
Old set:
TTPP.P.TRN11701.CLJKKKG6
File which has the last qualifiers(created dynamically in a batch program)
FSJKKKX1
The old set of file names should be renamed to New set of file names as below
TTPP.P.TRN11701.FSJKKKX1
how can i achieve this??
Are you asking me to consider sort utility for this ??? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Looks like a REXX or other utility to solve this one. |
|
Back to top |
|
|
vijayasimha
New User
Joined: 27 Jun 2005 Posts: 6 Location: india
|
|
|
|
yes REXX can solve this issue but i donot want to use it. i want to achieve this using the mainframe utilities... is there any way to do it ??
if yes please let me know
thanks |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
So, you want to copy the datasets to new datasets with different names, new names derived from the ssecond file ?
You then want to delete the original files.
Maybe it might it easier for me to understand your requirement by knowing why the files must be renamed. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
My thought?
I think it would help you if you were to first write the JCL that does what you want to do. That might help you to establish the process flow and see how you might want to accomplish the replacement of the last nodes.
As far as I can tell, if you don't want to use REXX, you can use just about anything else you want. |
|
Back to top |
|
|
|