G'day Mike,

You could try using a report - I think Razzak has a FTE article on how to do
this.  Alternatively, you could use the IFEQ function to set the value to an
unusual ASCII number like CHAR(0255) and then do a SRPL to replace these
with a space before writing the line.

Regards
Clive Williams
Warragamba NSW
Australia

----- Original Message ----- 
From: "Ramsour Mike" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, November 08, 2003 6:36 AM
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