Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1542
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: 10327
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: 10327
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: 10327
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: 287
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 ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us