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
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am


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