(SPUT(text,string,pos)) 

Puts string into text, starting at pos, returning a text string


Try SPUT.....



----- Original Message ----- 
From: "Ramsour Mike" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 07, 2003 2:36 PM
Subject: [RBASE-L] - Fixed field export with embedded spaces


> Greetings:
> 
> I need to create an ASCII fixed field formatted file (say that 3 times real
> fast).  I am using the LJS function but am having an issue with fields that
> are null.  This may have been discussed before but is there a way to embed
> space characters into a field when it is NULL?
> 
> For instance:  (LJS(IFNULL,<field>,'     ',<field>),5)) 
> 
> which is to say that if the field is null embed five spaces otherwise use
> the contents of the field.
> 
> I ended up doing a workaround that embedded XXXXX if the field was null and
> then I used R:Code to replace the XXXXX with 5 spaces in the output file.
> Not exactly elegant but it worked.  I've tried using the CHAR function, too,
> but that didn't work unless I'm missing something.
> 
> Any suggestions are greatly appreciated.
> 
> Incidentally, I tried the same technique in 7.0 and got the same results.
> 
> Thanks
> 
> Mike Ramsour
> Voice:  740-829-4340
> 
> Test:
> 
> SET VAR vspace TEXT = (SFIL(' ',10)) -- trying to create a text variable
> that has a length of 10 characters that are all spaces.  Also tried using
> CHAR(32)
> --
> SET VAR vlen INTEGER = (SLEN(.vspace) -- to test the length of vspace
> variable
> --
> SHOW VAR vlen gives a result of 0
> --
> SET VAR vspace TEXT = (SFIL(' ',10) + '9') -- trying to create a text
> variable that starts with 10 spaces and ends with a 9
> --
> SET VAR vlen INTEGER = (SLEN(.vspace) -- to test the length of vspace
> variable
> --
> SHOW VAR vlen gives a result of 11, i.e. 10 spaces plus 1 character
> --
> 
> 

Reply via email to