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
 

 

How to rename a word in all PS file names.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
sdaruna

New User


Joined: 11 Jan 2010
Posts: 13
Location: india

PostPosted: Tue Sep 27, 2011 11:40 am    Post subject: How to rename a word in all PS file names.
Reply with quote

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

Dsingh29

Active User


Joined: 16 Dec 2008
Posts: 132
Location: IBM

PostPosted: Tue Sep 27, 2011 12:02 pm    Post subject: Reply to: How to rename a word in all PS file names.
Reply with quote

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

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Oct 05, 2011 3:21 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Oct 05, 2011 3:43 pm    Post subject: Reply to: How to rename a word in all PS file names.
Reply with quote

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

New User


Joined: 11 Jan 2010
Posts: 13
Location: india

PostPosted: Wed Oct 05, 2011 3:58 pm    Post subject: Reply to: How to rename a word in all PS file names.
Reply with quote

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

New User


Joined: 11 Jan 2010
Posts: 13
Location: india

PostPosted: Wed Oct 05, 2011 4:04 pm    Post subject: Reply to: How to rename a word in all PS file names.
Reply with quote

I read my post again.. its pathetic.. my above reply will tell you, what exactly i am expecting..
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Oct 05, 2011 4:09 pm    Post subject: Reply to: How to rename a word in all PS file names.
Reply with quote

bad wording again ...
rename a word means just nothing

do You want to rename the datasetd or what ?
Back to top
View user's profile Send private message
sdaruna

New User


Joined: 11 Jan 2010
Posts: 13
Location: india

PostPosted: Wed Oct 05, 2011 4:16 pm    Post subject: Reply to: How to rename a word in all PS file names.
Reply with quote

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

Active User


Joined: 16 Dec 2008
Posts: 132
Location: IBM

PostPosted: Wed Oct 05, 2011 4:16 pm    Post subject:
Reply with quote

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 icon_rolleyes.gif



did you tried above solution ?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Oct 05, 2011 4:18 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Oct 05, 2011 4:22 pm    Post subject: Reply to: How to rename a word in all PS file names.
Reply with quote

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

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Oct 05, 2011 5:22 pm    Post subject:
Reply with quote

Best confusing thread of the Week! Grin!
Back to top
View user's profile Send private message
sdaruna

New User


Joined: 11 Jan 2010
Posts: 13
Location: india

PostPosted: Wed Oct 05, 2011 5:34 pm    Post subject: Reply to: How to rename a word in all PS file names.
Reply with quote

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

New User


Joined: 11 Jan 2010
Posts: 13
Location: india

PostPosted: Wed Oct 05, 2011 5:45 pm    Post subject: Reply to: How to rename a word in all PS file names.
Reply with 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.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Oct 05, 2011 5:49 pm    Post subject: Reply to: How to rename a word in all PS file names.
Reply with quote

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 icon_biggrin.gif

again read my previous reply !
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 961
Location: Richmond, Virginia

PostPosted: Wed Oct 05, 2011 5:59 pm    Post subject:
Reply with quote

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

New User


Joined: 11 Jan 2010
Posts: 13
Location: india

PostPosted: Wed Oct 05, 2011 7:39 pm    Post subject: Reply to: How to rename a word in all PS file names.
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Oct 05, 2011 8:34 pm    Post subject: Reply to: How to rename a word in all PS file names.
Reply with quote

Quote:
its learning purpose. the example on DEL90 is just for understanding purpose.


well the example was poorly chosen icon_evil.gif

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 http://catb.org/~esr/faqs/smart-questions.html
or .. for a more PC language
here http://support.microsoft.com/kb/555375
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Wed Oct 05, 2011 11:43 pm    Post subject:
Reply with quote

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 icon_biggrin.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Oct 05, 2011 11:51 pm    Post subject: Reply to: How to rename a word in all PS file names.
Reply with quote

I' ve seen much worser sins
not worth the click icon_wink.gif
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 -> TSO/ISPF All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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