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: 431
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time

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: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 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: 641
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 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: 431
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post