Thank you all for the clarification and suggested method to address my needs.  
I will definitely use it.  I really appreciate it.

Duey




Larry Lustig proposed something which I find to be the cleanest, simplest, and 
least error prone way to generate a data file

SET VAR vCRLF TEXT = (CHAR(13)+CHAR(10))
SET VAR vDataLine TEXT 
SET VAR vDataLength INT = 512
SET VAR vPastEnd INT = (.vDataLength+1)
SET VAR vTotalLength = (.vDataLength+2)
OUTPUT anyfile
SET VAR vLineNo INT = 1
WHILE vLineNo <= 10 THEN

   SET VAR vDataLine TEXT = NULL
   -- Build up the data line in any way you choose

   -- SPUT is the easiest way to insert specific data into the string at 
precise positions
   -- Most files of this type are fixed field data (each piece starts at a 
precise location in the line)
  Set var vDataLine = (SPUT(.vDataLine,.’SOME TEXT’,100))
 
   -- Repeat as necessary to insert all data in to the line.
  
   --Add CarriageReturn/LineFeed charaters to the line
  Set var vDataLine = (SPUT(.vDataLine,.vCRLF,.vPastEnd))

  --Make sure no trash data exists beyond CR/LF
  Set var vDataLine = (SGET(.vDataLine,..vTotalLength,1))

  --Write the line, telling RBASE not to add its own CRLF
 WRITE .vDataLine  CONTINUE

 SET VAR vLineNo = (.vLineNo + 1)
ENDW
OUTPUT SCREEN

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Lawrence Lustig
Sent: Monday, March 09, 2009 8:48 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Stripping "blanks" off the end of file lines


<< 
Can you expand a little bit further on the hard space?  What it
is?  What the difference is between a hard and soft space?  


When I see a file with CHAR(255) it produces this character (ÿ)
when I view the file.  Is that expected?  Will the IRS computers accept this as
a space?
>>


A hard space is any upper range (above ASCII 127) character that appears like a 
standard space character.  Because R:Base, and many other programs, will trim 
"white space" (spaces, tabs) from the end of strings, using a hard space 
character can help you format strings for display that rely on having a certain 
number of characters in them.  The exact physical representation of these 
characters depends on what font and character set your system is set to use — 
so what appears to you as a space may appear to another user as some odd 
looking character.

However, a hard space is NEVER the same thing as a space character, and will 
not be treated as a space character by parsing software that consumes your 
data.  Therefore, it's not appropriate when trying to format a file that will 
be parsed electronically.  Doing this is only asking for trouble because while 
the file will not process correctly it may well appear correct to visual 
inspection until someone figures out that there are non-standard white space 
characters used in the encoding.
--
Larry



Reply via email to