IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is there any function to replace a particular string in REXx


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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
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: 2358
Location: Israel

PostPosted: Mon Mar 26, 2007 6:54 pm
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: 8797
Location: Welsh Wales

PostPosted: Mon Mar 26, 2007 7:07 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top