James: Try using the "hard space" character in place of the ASCII "soft space":

clear all var
set var vSpc     TEXT    = (char(160))
set var vfile    text    = ('test'+ format(.#date,'_YYYYMMDD')+ '.txt')
SET VAR vline01  TEXT    = (SFIL(.vSpc,50))
SET VAR vline02  TEXT    = (SFIL(.vSpc,50))
SET VAR vline03  TEXT    = (SFIL(.vSpc,50))
set var vline01          = (sput(.vline01, 'DATA',1))
set var vline02          = (sput(.vline02, 'DATA',45))
set var vline03          = (sput(.vline03, 'DATA',30))
set var vifexist integer = (chkfile(.vfile))
if vifexist = 1 then; delete .vfile; endif
output .vfile
WRITE .vline01 USING '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%' WRITE .vline02 USING '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%' WRITE .vline03 USING '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
output screen
launch .vfile
return

Ok, so that only gets you the front end. Will think about the back end. Maybe SKEEP or SKEEPI are worth a look.

Best Regards, Bruce

Bruce A. Chitiea
SafeSectors, Inc.
1142 S Diamond Bar Blvd # 442
Diamond Bar CA 91765-2203

[email protected]
(909) 238-9012 m


------ Original Message ------
From "James W. Kim, CPA, MBA" <[email protected]>
To [email protected]
Cc [email protected]
Date 11/3/2023 1:29:45 PM
Subject [RBASE-L] - creating text file with blank spaces in tact

I'm trying to generate a text file shaped like a rectangle, where each row is of equal length and includes blank spaces. My aim is to create a rectangle that consists of 3 rows, each with 50 columns. However, I'm encountering an issue where the blank spaces are being truncated in the resulting text file. Does anyone have a reliable method for crafting a rectangular text box that preserves all blank spaces without trimming them?

I am currently using version X.5 build 10.5.5.20615

-- create 50 x 3 block without truncating blank spaces
clear all var
set var vSpc     TEXT    = (char(32))
set var vfile    text    = ('test'+ format(.#date,'_YYYYMMDD')+ '.txt')
SET VAR vline01  TEXT    = (SFIL(.vSpc,50))
SET VAR vline02  TEXT    = (SFIL(.vSpc,50))
SET VAR vline03  TEXT    = (SFIL(.vSpc,50))
set var vline01          = (sput(.vline01, 'DATA',1))
set var vline02          = (sput(.vline02, 'DATA',45))
set var vline03          = (sput(.vline03, 'DATA',30))
set var vifexist integer = (chkfile(.vfile))
if vifexist = 1 then; delete .vfile; endif
output .vfile
WRITE .vline01 USING '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%' WRITE .vline02 USING '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%' WRITE .vline03 USING '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
output screen
launch .vfile
return

Thank you in advance,
James Kim

--
For group guidelines, visit http://www.rbase.com/support/usersgroup_guidelines.php
---
You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rbase-l/68b28448-66d3-4f60-92de-a2f6a65e865c%40KimCPA.com <https://groups.google.com/d/msgid/rbase-l/68b28448-66d3-4f60-92de-a2f6a65e865c%40KimCPA.com?utm_medium=email&utm_source=footer>.

--
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- You received this message because you are subscribed to the Google Groups "RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/em602f62ce-ca97-4774-864b-8dc06782ca5b%40ffc94789.com.

Reply via email to