did you notice your first expression is missing the dot on vnull??
SET V vtexttofix = (SRPL(.vtexttofix,.vlf,vnull, 1)) SET V vtexttofix = (SRPL(.vexttofix,.vcr,.vnull,1)) Dennis McGrath [email protected] [email protected] On Sat, Sep 17, 2011 at 9:18 PM, Mike Byerley <[email protected]> wrote: > Use an empty string instead of null.. > > SET V vtexttofix = (SRPL(.vtexttofix,.vlf,'',1)) > SET V vtexttofix = (SRPL(.vexttofix,.vcr,.'',1)) > > and since it is a single character you can do: > > SET V vtexttofix = (SRPL(.vtexttofix,.vlf,'',0)) > SET V vtexttofix = (SRPL(.vexttofix,.vcr,.'',0)) > > And you should update your syntax to: > > set var > instead of > set v > > RStyle will appreciate it too... > > > > > ----- Original Message ----- > From: "Michael J. Sinclair" <[email protected]> > To: "RBASE-L Mailing List" <[email protected]> > Sent: Saturday, September 17, 2011 6:47 PM > Subject: [RBASE-L] - Getting rid of LF or CR in a variable > > > Hi All, > > Is there a way to remove LF (linefeed) and CR (carriage return) from a > variable? > I tried this... > > SET V vlf = (CHAR(10)) > SET V vcr = (CHAR(13)) > SET V vnull = NULL > > SET V vtexttofix = (SRPL(.vtexttofix,.vlf,vnull,1)) > SET V vtexttofix = (SRPL(.vexttofix,.vcr,.vnull,1)) > > But when I try that, my vtexttofix ends up being a blank. > > How do I do it? > > Mike > > >

