View previous topic :: View next topic
|
Author |
Message |
sdaruna
New User
Joined: 11 Jan 2010 Posts: 13 Location: india
|
|
|
|
Hi,
I have 15 files in which there will be a word as 'D2011'.
How can i rename all of them once.
just like the option C ALL, do we have any solution for this.?
I have just had a thought of it. Don't know, if there is a solution.
Kindly let me know, if there is any way to do this.
Please provide me your suggestions. |
|
Back to top |
|
|
Dsingh29
Active User
Joined: 16 Dec 2008 Posts: 132 Location: IBM
|
|
|
|
Hi There,
You can you IDCAMS ALTER command:
Code: |
//STEP01 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
ALTER OLD.NAME -
NEWNAME(NEW.NAME) |
Write as many Alter statements as you need. All DS names would be changed at once. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Dave - question is about changing the contents of a Data-set, it's not about changing (ALTER) the name of the DSN itself. That's why they say, terminology is important in IT.
sdaruna - I don't recall any of such command, which can be used on command line, after listing all those 15 DSNs in ISPF 3.4 . You might try with SORT FINDREP. To do that, concatnate all the DSNs to SORTIN and write as many output files as many you want. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
Quote: |
How to rename a word in all PS file names. |
as usual around here bad wording reigns ,
a dataset rename was my first guess also |
|
Back to top |
|
|
sdaruna
New User
Joined: 11 Jan 2010 Posts: 13 Location: india
|
|
|
|
Hi All,
Sorry for the confusion. I am sorry for my bad communication skills.
Let me explain this with examples. Say i have four files (irrespective of PS or PDS)
1 - ABC.SRIN.X1
2 - ABC.SRIN.X2
3 - DEF.SRIN.X3. AND So on.
how can i rename the word SRIN to SRINU at one go..
Actually convention renaming will be ok. but if we have files in 100s and we might need to rename the month names some times..
Is there any better way to do this.?
Let me know, if if there are any confusions in my question. |
|
Back to top |
|
|
sdaruna
New User
Joined: 11 Jan 2010 Posts: 13 Location: india
|
|
|
|
I read my post again.. its pathetic.. my above reply will tell you, what exactly i am expecting.. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
bad wording again ...
rename a word means just nothing
do You want to rename the datasetd or what ? |
|
Back to top |
|
|
sdaruna
New User
Joined: 11 Jan 2010 Posts: 13 Location: india
|
|
|
|
Yes. I want to rename the datasets
intial
ABC.SRIN.X1
ABC.SRIN.X2
DEF.SRIN.X3
I want to rename them as
ABC.SRINU.X1
ABC.SRINU.X2
DEF.SRINU.X3 |
|
Back to top |
|
|
Dsingh29
Active User
Joined: 16 Dec 2008 Posts: 132 Location: IBM
|
|
|
|
Do you want to rename a file name, yes or no ?
Quote: |
I read my post again.. its pathetic.. my above reply will tell you, what exactly i am expecting. |
It still doesnt solve your dilemma
did you tried above solution ? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Unless I'm mistaken, TS has Data-sets which follow the naming-convention as:
ABC.SRIN.**
In all of them, at some position in their contents, there is "SRIN" and it should be changed to "SRINU" using some ISPF command. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
Quote: |
It still doesnt solve your dilemma |
thanks &deity that' s his dilemma not ours
depending on the zOS level You might, repeat might, do it in one shot
otherwise You will have to write a <script> to do it ( REXX is the best option ) |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Best confusing thread of the Week! Grin! |
|
Back to top |
|
|
sdaruna
New User
Joined: 11 Jan 2010 Posts: 13 Location: india
|
|
|
|
So, whats confusing in this now.?
I can give you one more example.
I have 100 files which will be ending with DEL90.
like,
A.B.DEL90
C.D.DEL90,
X.Y.Z.DEL90 etc.
As per the process, those files will not be available after 90 days(Say thats the sigificance of using DEL90).
I need those files for some more time. So i want to replace DEL90 with DEL120 in the names of the files. to make them alive for 120 days.
Assume that, DEL90 exists in the end of the file name only. |
|
Back to top |
|
|
sdaruna
New User
Joined: 11 Jan 2010 Posts: 13 Location: india
|
|
|
|
"With all due respect to you genius"
Guys, i am a rookie. Please be kind, if i created any confusion.
Just think this problem in your own way. and provide me some details if you got this kind of situation any where any time.
let it be not related to my problem by some extent.. what ever the inputs you provide, that will be helpful for this young lad.. Please be kind towards my errors in this thread. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
renaming a dataset just because the expiration date changed calls for...
immediate termination or better extermination of You storage support group
ok the need to rename a dataset,
the reason You have given for the rename lowers dramatically the benevolence factor
and the willingness to provide help
sometimes to keep <Your> mouth shut is better
again read my previous reply ! |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
Quote: |
It still doesnt solve your dilemma |
But is this a dilemma, a predicament, a quandary, or a conundrum?
Isn't that what's really important? |
|
Back to top |
|
|
sdaruna
New User
Joined: 11 Jan 2010 Posts: 13 Location: india
|
|
|
|
its learning purpose. the example on DEL90 is just for understanding purpose.
I was just thinking, why concentration shift towards these all.
Enrico, I understood what you mentioned
Can you provide me bit of clarification.? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
Quote: |
its learning purpose. the example on DEL90 is just for understanding purpose. |
well the example was poorly chosen
to make the most out of the questions You ask and forecast the comments You might receive
it would be wise for You to read and meditate on
how to ask questions the smart way
here catb.org/~esr/faqs/smart-questions.html
or .. for a more PC language
here support.microsoft.com/kb/555375 |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Quote: |
"With all due respect to you genius"
Guys, i am a rookie. Please be kind, if i created any confusion.
Just think this problem in your own way. and provide me some details if you got this kind of situation any where any time.
let it be not related to my problem by some extent.. what ever the inputs you provide, that will be helpful for this young lad.. Please be kind towards my errors in this thread. |
Wondering why sdaruna isnt warned |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
I' ve seen much worser sins
not worth the click |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Of course it all depends on the setup by the storage management team.
Renaming a dataset may or may not change the MGMTCLAS of the dataset, so spending all of this time finding out about something that may not work is a waste of everyones time.
Go talk to your storage management people and tell them what you want, and why you want it and see what they say.
If your storage people are any good they, like me, would liase with the security people to stop users from doing this another way. In cases where security would not help, I used to run anomolie reports and find out if people had been sneaky and just delete their datasets anyway |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
welcome back Expat ! |
|
Back to top |
|
|
|