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
 
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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm

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