View previous topic :: View next topic
|
Author |
Message |
jobin
New User
Joined: 20 Feb 2007 Posts: 9 Location: Bangalore
|
|
|
|
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 |
|
|
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
You can used the TRANSLATE function. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You can use a combination of WORDPOS, OVERLAY and DELWORD.
O. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
ISPF EDIT macro. |
|
Back to top |
|
|
jobin
New User
Joined: 20 Feb 2007 Posts: 9 Location: Bangalore
|
|
|
|
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 |
|
|
pankajsoni
New User
Joined: 21 Jun 2006 Posts: 9 Location: Zurich
|
|
|
|
Hi,
You can use PARM to pass the values.
"EDIT DATASET('"INPMEM"') MACRO(MACRO) PARM("VAR")"
Regards,
Soni |
|
Back to top |
|
|
|