Why would you use an ampersand var inside of the function?

In that context the variable is a VALUE and not a part of a command to be
parsed.

> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of Bill
> Downall
> Sent: Thursday, March 27, 2014 4:59 PM
> To: RBASE-L Mailing List
> Subject: [RBASE-L] - Re: Store procedure question
> 
> Jim,
> 
> Since your Macro variable &FxTXHqColumn is enclosed within parentheses
> and is therefore part of an "expression", you have probably confused
> the parser into not substituting the macro variable soon enough.
> 
> Just for giggles, see what happens if you put a space between the
> parenthesis and the ampersand.
> 
> I would also put CHAR(46) into parens, because that syntax could also
> stymie a parser. Or better yet, put it in a variable.
> 
> SET VAR vDot = (CHAR(46))
> 
> UPDATE &FxTXHqTable SET  +
> 
> &FxTXHqColumn = (SRPL( &FxTXHqColumn, .vDot, NULL, 0)) + WHERE
> &FxTXHqColumn CONTAINS .vDot)
> 
> 
> 
> If that doesn't help, let us know, and we'll escalate.
> 
> Bill
> 
> 
> On Thu, Mar 27, 2014 at 4:29 PM, James Bentley
> <[email protected]> wrote:
> 
> 
>       I am trying to modify one of my stored procedure to be more
> generalized.
>       The following is a part of the code
>       SET VAR FxTXHqTable=(.FxTXHqTableName)
>       SET VAR FxTXHqColumn=(.FxTXHqColName)
>       -- Remove period, comma and double space
>       UPDATE &FxTXHqTable SET
> &FxTXHqColumn=(SRPL(&FxTXHqColumn,CHAR(46),NULL,0)) WHERE &FxTXHqColumn
> CONTAINS CHAR(46)
>       UPDATE &FxTXHqTable SET
> &FxTXHqColumn=(SRPL(&FxTXHqColumn,CHAR(44),NULL,0)) WHERE &FxTXHqColumn
> CONTAINS CHAR(44)
>       UPDATE &FxTXHqTable SET &FxTXHqColumn=(SRPL(&FxTXHqColumn,'
> ',CHAR(32),0))
> 
> 
>       The stored-procedure has two arguments FxTXHqTableName TEXT (18)
> AND FxTXHqColName TEXT (18)
>       They represent a tablename and a column name.
>        The error message given is that left parenthesis can not be
> followed by '&'
>       this part of the syntax "(SRPL(&FxTXHqColumn" seems to be the
> problem
>       it works if I substitute the actual table name for example
> "MbrCurHMainAdrLine" which
>       is the value I am passing to the stored procedure. note the other
> parts of
> 
>       the abatement with the "&"  worked fine.
> 
>       The are some 50 lines of UPDATE commands in the procedure.
> 
>       Does any one have any suggestions as to how I can fix this
> problem.
> 
>       setting up the complete line and into a variable the esecuting
> the variable seems
>       to defeat the purpose of generalizing the stored procedure.
> 
> 
>       Jim Bentley,
>       American Celiac Society
>       1-504-737-3293
> 
> 
> 


Reply via email to