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

Help on IDCAMS


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

New User


Joined: 27 Jun 2005
Posts: 6
Location: india

PostPosted: Fri Apr 18, 2008 11:19 am
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 18, 2008 11:36 am
Reply with quote

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
View user's profile Send private message
vijayasimha

New User


Joined: 27 Jun 2005
Posts: 6
Location: india

PostPosted: Fri Apr 18, 2008 11:53 am
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 18, 2008 11:56 am
Reply with quote

Looks like a REXX or other utility to solve this one.
Back to top
View user's profile Send private message
vijayasimha

New User


Joined: 27 Jun 2005
Posts: 6
Location: india

PostPosted: Fri Apr 18, 2008 12:09 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 18, 2008 1:56 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Apr 18, 2008 3:12 pm
Reply with quote

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
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 IDCAMS listcat service using cobol JCL & VSAM 1
No new posts IDCAMS & LISTCAT with ddnames JCL & VSAM 1
No new posts Capture DSN names through SORT / IDCAMS DFSORT/ICETOOL 8
No new posts IDCAMS RENAMING VSAM FILE ALONG WITH ... JCL & VSAM 12
No new posts IDCAMS Allocate & Repro JCL & VSAM 9
Search our Forums:

Back to Top