Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Help on IDCAMS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Help on IDCAMS
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: 8593
Location: Back in jolly old England

PostPosted: Fri Apr 18, 2008 11:36 am    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Apr 18, 2008 11:56 am    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Apr 18, 2008 1:56 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Fri Apr 18, 2008 3:12 pm    Post subject: Reply to: Help on IDCAMS
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts VSAM RLS=NRI while doing IDCAMS sheersh JCL & VSAM 1 Tue Mar 07, 2017 1:55 pm
No new posts IDCAMS ALTER REMOVEVOLS for open CICS... Pete Wilson JCL & VSAM 2 Wed Sep 10, 2014 7:04 pm
No new posts IDCAMS to DFSORT/ICETOOL magesh23586 DFSORT/ICETOOL 10 Wed Oct 30, 2013 11:28 am
No new posts VSAM file with variable record length... tuxama JCL & VSAM 8 Mon Jun 17, 2013 4:47 pm
No new posts Error while deleting a DATASET using ... tamminenisidhartha JCL & VSAM 10 Sun Mar 24, 2013 1:31 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us