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
 

 

Replace Multiple Strings in Pds Memeber

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
saideepu

New User


Joined: 30 Jan 2013
Posts: 9
Location: india

PostPosted: Thu Feb 07, 2013 9:46 am    Post subject: Replace Multiple Strings in Pds Memeber
Reply with quote

Hi all,
I have a Question Regarding Rexx.
Could you suggest code/ideas for the following requirement.
The requirenment is as follows:
we have to Replace Multiple Strings which are in Pds Memeber with an
another string.
For Example:

Pds(Member1):

"Tso allocate ("DA") F(ADHR)
Filename("rtt.pds.mem1)"
In this case,
I have to replace this string ADHR with Assr.tso and
"vtt.pds.mem2)"
the output could be like:
"Tso allocate ("DA") F(Asssr.tso)
Filename("vtt.pds.mem2)"

Thanks
Back to top
View user's profile Send private message

Pandora-Box

Moderator


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

PostPosted: Thu Feb 07, 2013 9:56 am    Post subject:
Reply with quote

Why dont you try

CHANGE ALL

command

if it is needed for many members put the command in macro and execute it using ISPF services

Search forum for more examples
Back to top
View user's profile Send private message
saideepu

New User


Joined: 30 Jan 2013
Posts: 9
Location: india

PostPosted: Thu Feb 07, 2013 11:36 am    Post subject: Replace Multiple Strings which are in Pds Memeber
Reply with quote

Hi,

Am very New to the REXX..So ..if any one know code for this,please share me.

Thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Thu Feb 07, 2013 12:51 pm    Post subject: Reply to: Replace Multiple Strings in Pds Memeber
Reply with quote

why bother ... the statements as written are just plain wrong,
changing something will not make them right

Code:
"Tso allocate ("DA") F(ADHR) Filename("rtt.pds.mem1)"
"Tso allocate ("DA") F(Asssr.tso) Filename("vtt.pds.mem2)"


icon_eek.gif

start here for the basics
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/IKJ4BK90

not the latest one but more than enough for such basic concepts
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Thu Feb 07, 2013 1:01 pm    Post subject: Reply to: Replace Multiple Strings in Pds Memeber
Reply with quote

Quote:
if it is needed for many members put the command in macro and execute it using ISPF services


You will have to use TWO macros ...

a OUTER driver to <collect> the member list
and then the INNER macro to issue the edit commands

see here
http://www.ibmmainframes.com/viewtopic.php?t=25947&highlight=

it contains
the OUTER driver
and two INNER macros to UNNUM/RENUM

if You search the forum You should find also a PACK OFF snippet
http://www.ibmmainframes.com/viewtopic.php?t=45291&highlight=ispf+pack

write an inner macro with the CHANGE commands and Your are set to go

as soon as I ipl my system I will post a working snippet
Back to top
View user's profile Send private message
saideepu

New User


Joined: 30 Jan 2013
Posts: 9
Location: india

PostPosted: Thu Feb 07, 2013 2:47 pm    Post subject: Replace Multiple Strings which are in Pds Memeber
Reply with quote

Thanks for responding enrico

I could explain the req a little more in detail..

We are supposed to do changes in a pds Members(10),they have a common string as string1 and string2 which has to be replaced by another string string3.variable and string4.var..please explain the process of coding this.

Thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Thu Feb 07, 2013 3:25 pm    Post subject: Reply to: Replace Multiple Strings in Pds Memeber
Reply with quote

the requirement is clear enough
what is uncomfortable is the sloppiness of the example posted
and sloppiness lowers Your benevolence factor(*) icon_cool.gif

(*) willingness/good mood of people who will answer
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 268
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Thu Feb 07, 2013 6:59 pm    Post subject:
Reply with quote

As enrico already mentioned:
You will need two REXX macros - an outer one to get Member list and an inner one to do the edit.

Maybe you wanna take a look here

http://www.ibmmainframes.com/viewtopic.php?t=59645&highlight=
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Sort card to replace text using cross... Susanta SYNCSORT 32 Tue Sep 13, 2016 4:17 pm
No new posts Replace function abdulrafi COBOL Programming 13 Mon Sep 12, 2016 10:12 am
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
No new posts Execute multiple DB2 Load commands in... faizm DB2 4 Wed Aug 03, 2016 12:53 pm


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