Try this:

SET VAR vstylename = (SGET(.vstylename, 5, .vno)) 

Regards, Ken

----- Original Message -----
From: Dick Fey 
Date: Wednesday, October 28, 2009 7:28 pm
Subject: [RBASE-L] - SGET Statement
To: [email protected] (RBASE-L Mailing List)

> I am trying to strip the last 5 characters out of a string of 
> unknown 
> length.
> 
> Used the SLEN statement to get the length,
> 
> Then set a var to the count less 5
> 
> Apparently a SGET statement will not recognize a variable as the 
> second 
> argument.
> 
> SET VAR vstylename TEXT 'Happy Hour 1 12'
> SET VAR vcount INTEGER = (SLEN(.vstylename)) --works
> SET VAR vno INTEGER = (.vcount - 5) works
> SET VAR vstylename = (SGET(.vstylename, .vno, 1)) nope
> 
> Tried using an ampersand var, same results. I know this has got 
> to be easy.
> 
> Any other suggestions as to how to get there?
> 
> Thanks,
> 
> Dick Fey
> Carpet Broker Inc.
> 
> 
> 

Reply via email to