A macro edit change doesn't work



IBM's Command List programming language & Restructured Extended Executor

A macro edit change doesn't work

Postby samb01 » Thu Mar 10, 2011 3:15 pm

Hello,

this my rexx


  "ISPEXEC VGET (PREFIXB PREFIXC)"                         
 ADDRESS ISREDIT;                                           
 "MACRO";                                                   
 "CURSOR = .ZFIRST 1";                                     
 PREFIX1 = '&ALIAS$$'                                       
 PREFIX2 = 'UVAL'PREFIXC'.'PREFIXB''                       
 "SCAN OFF"                                                 
 "CHANGE '"PREFIX1"' ''"PREFIX2"'' ALL"                     
 "END"                                                     




and i have the fllowing message


>O>   "CHANGE '&ALIAS$$"                           
>L>   "' "                                         
>O>   "CHANGE '&ALIAS$$' "                         
>V>   "UVAL"                                       
>O>   "CHANGE '&ALIAS$$' UVAL"                     
>L>   ""                                           
>O>   "CHANGE '&ALIAS$$' UVAL"                     
>V>   "CO"                                         
>O>   "CHANGE '&ALIAS$$' UVALCO"                   
>L>   "."                                           
>O>   "CHANGE '&ALIAS$$' UVALCO."                   
>V>   "COPSEQ"                                     
>O>   "CHANGE '&ALIAS$$' UVALCO.COPSEQ"             
>L>   " ALL"                                       
>O>   "CHANGE '&ALIAS$$' UVALCO.COPSEQ ALL"         
+++ RC(28) +++                                     
*-* "END"                                           
>L>   "END"                                         
+++ RC(28) +++



Thanks for your help
samb01
 
Posts: 236
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 0 time
Been thanked: 0 time

Re: A macro edit change doesn't work

 

Re: A macro edit change doesn't work

Postby NicC » Thu Mar 10, 2011 3:22 pm

So what does a return code of 28 for the CHNGE command say?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: A macro edit change doesn't work

Postby prino » Thu Mar 10, 2011 5:21 pm

I guess, but cannot verify this now, that the problem is the '&' in your change string.

Try changing

"isredit c '"from"' '"to"' all"

into

fromh = c2x(from)
toh   = c2x(to)
"isredit c x'"fromh"' x'"toh"' all"
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 536
Joined: Wed Mar 11, 2009 12:22 am
Location: Oostende, Belgium
Has thanked: 3 times
Been thanked: 21 times

Re: A macro edit change doesn't work

Postby samb01 » Thu Mar 10, 2011 7:09 pm

Thank you prino, ti works now. :D
samb01
 
Posts: 236
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 0 time
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post