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
 

 

Is there any function to replace a particular string in REXx

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

New User


Joined: 20 Feb 2007
Posts: 9
Location: Bangalore

PostPosted: Mon Mar 26, 2007 6:36 pm    Post subject: Is there any function to replace a particular string in REXx
Reply with quote

I want to replace &HLQ. and &STATE. in string

string = '&HLQ..SQ.&STATE..3030.DEBIT'

How will I do that. Is there any function in rexx to do that.

Jobin.
Back to top
View user's profile Send private message

cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Mon Mar 26, 2007 6:52 pm    Post subject: Re: Is there any function to replace a particular string in
Reply with quote

You can used the TRANSLATE function.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Mar 26, 2007 6:54 pm    Post subject:
Reply with quote

You can use a combination of WORDPOS, OVERLAY and DELWORD.

O.
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: Mon Mar 26, 2007 7:07 pm    Post subject:
Reply with quote

ISPF EDIT macro.
Back to top
View user's profile Send private message
jobin

New User


Joined: 20 Feb 2007
Posts: 9
Location: Bangalore

PostPosted: Tue Mar 27, 2007 10:47 am    Post subject:
Reply with quote

I created ISPF Edit Macro but got &HLQ. is not being changed.

/*_____REXX_____*/
CHG= 'HLQ.'
I = JOBIN
"ISREDIT MACRO"
ADDRESS ISREDIT
"HEX ON"
"C ALL "CHG" "I""
"HEX OFF"
"SAVE"
"END"
RETURN

this macro works fine But when I change CHG=&HLQ. then it doesn't work. Return code is 0. I heard that '&' has special significance in ISPF.
But if CHG=&, then also the macro work. Changes takes place.

One more question. When ever I call this macro I need to pass values to CHG and I. How will I do that. I don't know the format. I am currently calling this macro by following:

ADDRESS ISPEXEC
"EDIT DATASET('"INPMEM"') MACRO(MACRO)"
Back to top
View user's profile Send private message
pankajsoni

New User


Joined: 21 Jun 2006
Posts: 9
Location: Zurich

PostPosted: Wed Apr 04, 2007 12:42 pm    Post subject:
Reply with quote

Hi,

You can use PARM to pass the values.

"EDIT DATASET('"INPMEM"') MACRO(MACRO) PARM("VAR")"


Regards,
Soni
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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm


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