Bill:
My code is like this:
SELECT ( LJS(SGET(policy_no,12,1),50) + LJS(tmpUniqueText,50) + LJS(ssn,9) +
LJS(firstname,50) +
............... )=1500 FROM tmpMIB
I tried putting in a (LJS(' ',675)) at the end and that did not retain the
space. I tried (char(32)) and that didn't save. I tried a (RJS(
CHAR(255),675) and that did work except it put a visible character there that I
could see in 3 different word processors.
Karen
-----Original Message-----
From: Bill Downall <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Sun, Jan 4, 2015 2:35 pm
Subject: [RBASE-L] - Re: Fixed field file
Karen,
Are you selecting one very long expression, or many columns with =w after each
for the width?
Can you just make the last this you select be a space with a width of 675?
Select +
Col1=15, col2=34, (' ')=675 +
From table
Bill
(sent from Android mobile)
On Jan 4, 2015 3:15 PM, "Karen Tellef" <[email protected]> wrote:
I need to create a file with fixed field lengths. Rather than doing SFIL/SPUT
I did a "select" statement and it works great and is easy to code, except...
I need to have 675 blank spaces at the end of each line and I can't figure out
how to do that using a "select" statement. Has anyone done that, or do I need
to use SFIL/SPUT. According to my notes, if I use SFIL/SPUT I'll have to use
a cursor and then do something like this (and thanks to whoever originally
posted this code and I saved it):
--Add CarriageReturn/LineFeed charaters to theline
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 ownCRLF
WRITE .vDataLine CONTINUE
Karen