RE: [RBASE-L] - Text file that retains trailing blank space

2018-02-22 Thread Stephen Markson
>From R:Base Help: "The recommended table data type for large text files is 
>VARCHAR."


Regards,

Stephen Markson
The Pharmacy Examining Board of Canada
416.979.2431 x251

-Original Message-
From: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] On Behalf Of 
James W. Kim, CPA, MBA
Sent: February-21-18 6:32 PM
To: rbase-l@googlegroups.com
Subject: Re: [RBASE-L] - Text file that retains trailing blank space

Smart idea.  It's a kind of paradigm shift to create the entire file including 
CR/LF in a VARCHAR variable. I will run some simulations to see if it will give 
me reliable output and how big the file can be.

Thanks,
James


On 2/21/2018 11:02 AM, Stephen Markson wrote:
> Forgot to mention, if using the technique below, you can use CHAR(32) for 
> spaces since each line ends with the end of line character(s).
>
>
> Regards,
>
> Stephen Markson
> The Pharmacy Examining Board of Canada
> 416.979.2431 x251
>
> -Original Message-
> From: Stephen Markson
> Sent: February-21-18 10:58 AM
> To: rbase-l@googlegroups.com
> Subject: RE: [RBASE-L] - Text file that retains trailing blank space
>
> Another approach is to put the data into a varchar variable and then write 
> the variable to a file.
>
> SET V vDataFile VARCHAR=NULL
> SET V vLine TEXT=NULL
> .
> .
> .
> 
> SET V vLine=
> SET V vDataFile=(.vDataFile+.vLine+CHAR(13))
> 
> OUTPUT 
> WRITE .vDataFile
> OUTPUT SCREEN
>
> You can add "+CHAR(10)" after CHAR(13) above if you need CR+LF at the end of 
> each line.
>
>
> Regards,
>
> Stephen Markson
> The Pharmacy Examining Board of Canada
> 416.979.2431 x251
>
> -Original Message-
> From: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] On 
> Behalf Of James W. Kim, CPA, MBA
> Sent: February-20-18 1:25 PM
> To: rbase-l@googlegroups.com
> Subject: Re: [RBASE-L] - Text file that retains trailing blank space
>
> Thank you Stephen and others for the suggestions.  Most of systems I work 
> with does not allow extended ASCII characters, so CHAR(160) would not work.
>
> I have been submitting formatted text files to various federal and state 
> authorities for years.  Some systems, such as EFTPS, are tolerant and simple 
> SFIL and SPUT functions work well.  However, Social Security Admin EFW2 and 
> IRS FIRE systems require fixed length files (512 and 750 characters long)  
> that are sparsely populated with actual data, accompanied by great deal of 
> blank spaces.
>
> For blank spaces, I have been using CHAR(32) which worked fine up to 
> R:Base X Build: 10.0.1.20225.  However, newer updates tend to trim the
> CHAR(32) hard spaces and I had to keep one of computers at build
> 10.0.1.20225 for the purpose of creating these upload files.  I just tried 
> CHAR(00) as suggested by Razzak and the null spaces seem to stick.  So, I am 
> hopeful and will upload some test files.
>
> Thanks again,
> James
>
>
> On 2/20/2018 9:04 AM, Stephen Markson wrote:
>> Hi James,
>>
>> Can you insert CHAR(160) as the 512th character? This will keep the 
>> preceding spaces and will show up as a blank. I don't know though whether 
>> the program that takes the file as input will tolerate that.
>>
>> Regards,
>>
>> Stephen Markson
>> The Pharmacy Examining Board of Canada
>> 416.979.2431 x251
>>
>> -Original Message-
>> From: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] On 
>> Behalf Of James W. Kim, CPA, MBA
>> Sent: February-19-18 4:26 PM
>> To: rbase-l@googlegroups.com
>> Subject: [RBASE-L] - Text file that retains trailing blank space
>>
>> Need some help with creating text file that retains blank spaces at the end 
>> of each row.
>>
>> I often need to create text files with fixed row length such as 512 
>> or
>> 750 characters in a row. When there are no data value near the right end of 
>> each row, the unused spaces need to be filled with blank spaces.
>>
>> The following is an example of how such text file would be built. The 
>> example creates a row that has "FLOOR 7" at 274th space in a row that has 
>> 512 characters.  With some previous versions of R:Base, the trailing spaces 
>> is retained after insertion of data using SPUT function and line feed 
>> (CR/LF) would show up at 513th position.
>>
>> However, the current version would remove the trailing space when data is 
>> inserted using SPUT function and the (CR/LF) moves up to 281st position.
>>
>> Is there anyway I can for

Re: [RBASE-L] - Text file that retains trailing blank space

2018-02-21 Thread James W. Kim, CPA, MBA
Smart idea.  It's a kind of paradigm shift to create the entire file 
including CR/LF in a VARCHAR variable. I will run some simulations to 
see if it will give me reliable output and how big the file can be.


Thanks,
James


On 2/21/2018 11:02 AM, Stephen Markson wrote:

Forgot to mention, if using the technique below, you can use CHAR(32) for 
spaces since each line ends with the end of line character(s).


Regards,

Stephen Markson
The Pharmacy Examining Board of Canada
416.979.2431 x251

-Original Message-
From: Stephen Markson
Sent: February-21-18 10:58 AM
To: rbase-l@googlegroups.com
Subject: RE: [RBASE-L] - Text file that retains trailing blank space

Another approach is to put the data into a varchar variable and then write the 
variable to a file.

SET V vDataFile VARCHAR=NULL
SET V vLine TEXT=NULL
.
.
.

SET V vLine=
SET V vDataFile=(.vDataFile+.vLine+CHAR(13))

OUTPUT 
WRITE .vDataFile
OUTPUT SCREEN

You can add "+CHAR(10)" after CHAR(13) above if you need CR+LF at the end of 
each line.


Regards,

Stephen Markson
The Pharmacy Examining Board of Canada
416.979.2431 x251

-Original Message-
From: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] On Behalf Of 
James W. Kim, CPA, MBA
Sent: February-20-18 1:25 PM
To: rbase-l@googlegroups.com
Subject: Re: [RBASE-L] - Text file that retains trailing blank space

Thank you Stephen and others for the suggestions.  Most of systems I work with 
does not allow extended ASCII characters, so CHAR(160) would not work.

I have been submitting formatted text files to various federal and state 
authorities for years.  Some systems, such as EFTPS, are tolerant and simple 
SFIL and SPUT functions work well.  However, Social Security Admin EFW2 and IRS 
FIRE systems require fixed length files (512 and 750 characters long)  that are 
sparsely populated with actual data, accompanied by great deal of blank spaces.

For blank spaces, I have been using CHAR(32) which worked fine up to R:Base X 
Build: 10.0.1.20225.  However, newer updates tend to trim the
CHAR(32) hard spaces and I had to keep one of computers at build
10.0.1.20225 for the purpose of creating these upload files.  I just tried 
CHAR(00) as suggested by Razzak and the null spaces seem to stick.  So, I am 
hopeful and will upload some test files.

Thanks again,
James


On 2/20/2018 9:04 AM, Stephen Markson wrote:

Hi James,

Can you insert CHAR(160) as the 512th character? This will keep the preceding 
spaces and will show up as a blank. I don't know though whether the program 
that takes the file as input will tolerate that.

Regards,

Stephen Markson
The Pharmacy Examining Board of Canada
416.979.2431 x251

-Original Message-
From: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] On
Behalf Of James W. Kim, CPA, MBA
Sent: February-19-18 4:26 PM
To: rbase-l@googlegroups.com
Subject: [RBASE-L] - Text file that retains trailing blank space

Need some help with creating text file that retains blank spaces at the end of 
each row.

I often need to create text files with fixed row length such as 512 or
750 characters in a row. When there are no data value near the right end of 
each row, the unused spaces need to be filled with blank spaces.

The following is an example of how such text file would be built. The example creates a 
row that has "FLOOR 7" at 274th space in a row that has 512 characters.  With 
some previous versions of R:Base, the trailing spaces is retained after insertion of data 
using SPUT function and line feed (CR/LF) would show up at 513th position.

However, the current version would remove the trailing space when data is 
inserted using SPUT function and the (CR/LF) moves up to 281st position.

Is there anyway I can force the retention of trailing spaces so that CR/LF 
always shows up at 513th position?

Thanks in advance,

James



-- create text variable with blank spaces SET VAR vRow TEXT = NULL SET
VAR vRow = (SFIL((CHAR(32)),512))
-- use SPUT function to fill in data
SET VAR vRow = (SPUT(.vRow, 'start', 1)) SET VAR vRow = (SPUT(.vRow,
'Floor 7', 274))

-- write the variable to a text file
OUTPUT sample.txt append
WRITE .vRow USING
''
OUTPUT SCREEN



--
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

RE: [RBASE-L] - Text file that retains trailing blank space

2018-02-21 Thread Stephen Markson
Forgot to mention, if using the technique below, you can use CHAR(32) for 
spaces since each line ends with the end of line character(s).


Regards,

Stephen Markson
The Pharmacy Examining Board of Canada
416.979.2431 x251

-Original Message-
From: Stephen Markson 
Sent: February-21-18 10:58 AM
To: rbase-l@googlegroups.com
Subject: RE: [RBASE-L] - Text file that retains trailing blank space

Another approach is to put the data into a varchar variable and then write the 
variable to a file.

SET V vDataFile VARCHAR=NULL
SET V vLine TEXT=NULL
.
.
.

SET V vLine=
SET V vDataFile=(.vDataFile+.vLine+CHAR(13))

OUTPUT 
WRITE .vDataFile
OUTPUT SCREEN

You can add "+CHAR(10)" after CHAR(13) above if you need CR+LF at the end of 
each line.


Regards,

Stephen Markson
The Pharmacy Examining Board of Canada
416.979.2431 x251

-Original Message-
From: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] On Behalf Of 
James W. Kim, CPA, MBA
Sent: February-20-18 1:25 PM
To: rbase-l@googlegroups.com
Subject: Re: [RBASE-L] - Text file that retains trailing blank space

Thank you Stephen and others for the suggestions.  Most of systems I work with 
does not allow extended ASCII characters, so CHAR(160) would not work.

I have been submitting formatted text files to various federal and state 
authorities for years.  Some systems, such as EFTPS, are tolerant and simple 
SFIL and SPUT functions work well.  However, Social Security Admin EFW2 and IRS 
FIRE systems require fixed length files (512 and 750 characters long)  that are 
sparsely populated with actual data, accompanied by great deal of blank spaces.

For blank spaces, I have been using CHAR(32) which worked fine up to R:Base X 
Build: 10.0.1.20225.  However, newer updates tend to trim the
CHAR(32) hard spaces and I had to keep one of computers at build
10.0.1.20225 for the purpose of creating these upload files.  I just tried 
CHAR(00) as suggested by Razzak and the null spaces seem to stick.  So, I am 
hopeful and will upload some test files.

Thanks again,
James


On 2/20/2018 9:04 AM, Stephen Markson wrote:
> Hi James,
>
> Can you insert CHAR(160) as the 512th character? This will keep the preceding 
> spaces and will show up as a blank. I don't know though whether the program 
> that takes the file as input will tolerate that.
>
> Regards,
>
> Stephen Markson
> The Pharmacy Examining Board of Canada
> 416.979.2431 x251
>
> -Original Message-
> From: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] On 
> Behalf Of James W. Kim, CPA, MBA
> Sent: February-19-18 4:26 PM
> To: rbase-l@googlegroups.com
> Subject: [RBASE-L] - Text file that retains trailing blank space
>
> Need some help with creating text file that retains blank spaces at the end 
> of each row.
>
> I often need to create text files with fixed row length such as 512 or
> 750 characters in a row. When there are no data value near the right end of 
> each row, the unused spaces need to be filled with blank spaces.
>
> The following is an example of how such text file would be built. The example 
> creates a row that has "FLOOR 7" at 274th space in a row that has 512 
> characters.  With some previous versions of R:Base, the trailing spaces is 
> retained after insertion of data using SPUT function and line feed (CR/LF) 
> would show up at 513th position.
>
> However, the current version would remove the trailing space when data is 
> inserted using SPUT function and the (CR/LF) moves up to 281st position.
>
> Is there anyway I can force the retention of trailing spaces so that CR/LF 
> always shows up at 513th position?
>
> Thanks in advance,
>
> James
>
>
>
> -- create text variable with blank spaces SET VAR vRow TEXT = NULL SET 
> VAR vRow = (SFIL((CHAR(32)),512))
> -- use SPUT function to fill in data
> SET VAR vRow = (SPUT(.vRow, 'start', 1)) SET VAR vRow = (SPUT(.vRow, 
> 'Floor 7', 274))
>
> -- write the variable to a text file
> OUTPUT sample.txt append
> WRITE .vRow USING
> ''
> OUTPUT SCREEN
>
>

--
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 emai

RE: [RBASE-L] - Text file that retains trailing blank space

2018-02-21 Thread Stephen Markson
Another approach is to put the data into a varchar variable and then write the 
variable to a file.

SET V vDataFile VARCHAR=NULL
SET V vLine TEXT=NULL
.
.
.

SET V vLine=
SET V vDataFile=(.vDataFile+.vLine+CHAR(13))

OUTPUT 
WRITE .vDataFile
OUTPUT SCREEN

You can add "+CHAR(10)" after CHAR(13) above if you need CR+LF at the end of 
each line.


Regards,

Stephen Markson
The Pharmacy Examining Board of Canada
416.979.2431 x251

-Original Message-
From: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] On Behalf Of 
James W. Kim, CPA, MBA
Sent: February-20-18 1:25 PM
To: rbase-l@googlegroups.com
Subject: Re: [RBASE-L] - Text file that retains trailing blank space

Thank you Stephen and others for the suggestions.  Most of systems I work with 
does not allow extended ASCII characters, so CHAR(160) would not work.

I have been submitting formatted text files to various federal and state 
authorities for years.  Some systems, such as EFTPS, are tolerant and simple 
SFIL and SPUT functions work well.  However, Social Security Admin EFW2 and IRS 
FIRE systems require fixed length files (512 and 750 characters long)  that are 
sparsely populated with actual data, accompanied by great deal of blank spaces.

For blank spaces, I have been using CHAR(32) which worked fine up to R:Base X 
Build: 10.0.1.20225.  However, newer updates tend to trim the
CHAR(32) hard spaces and I had to keep one of computers at build
10.0.1.20225 for the purpose of creating these upload files.  I just tried 
CHAR(00) as suggested by Razzak and the null spaces seem to stick.  So, I am 
hopeful and will upload some test files.

Thanks again,
James


On 2/20/2018 9:04 AM, Stephen Markson wrote:
> Hi James,
>
> Can you insert CHAR(160) as the 512th character? This will keep the preceding 
> spaces and will show up as a blank. I don't know though whether the program 
> that takes the file as input will tolerate that.
>
> Regards,
>
> Stephen Markson
> The Pharmacy Examining Board of Canada
> 416.979.2431 x251
>
> -Original Message-
> From: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] On 
> Behalf Of James W. Kim, CPA, MBA
> Sent: February-19-18 4:26 PM
> To: rbase-l@googlegroups.com
> Subject: [RBASE-L] - Text file that retains trailing blank space
>
> Need some help with creating text file that retains blank spaces at the end 
> of each row.
>
> I often need to create text files with fixed row length such as 512 or
> 750 characters in a row. When there are no data value near the right end of 
> each row, the unused spaces need to be filled with blank spaces.
>
> The following is an example of how such text file would be built. The example 
> creates a row that has "FLOOR 7" at 274th space in a row that has 512 
> characters.  With some previous versions of R:Base, the trailing spaces is 
> retained after insertion of data using SPUT function and line feed (CR/LF) 
> would show up at 513th position.
>
> However, the current version would remove the trailing space when data is 
> inserted using SPUT function and the (CR/LF) moves up to 281st position.
>
> Is there anyway I can force the retention of trailing spaces so that CR/LF 
> always shows up at 513th position?
>
> Thanks in advance,
>
> James
>
>
>
> -- create text variable with blank spaces SET VAR vRow TEXT = NULL SET 
> VAR vRow = (SFIL((CHAR(32)),512))
> -- use SPUT function to fill in data
> SET VAR vRow = (SPUT(.vRow, 'start', 1)) SET VAR vRow = (SPUT(.vRow, 
> 'Floor 7', 274))
>
> -- write the variable to a text file
> OUTPUT sample.txt append
> WRITE .vRow USING
> ''
> OUTPUT SCREEN
>
>

--
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 rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [RBASE-L] - Text file that retains trailing blank space

2018-02-20 Thread A. Razzak Memon

James,

:)

As mentioned in my original reply, that's the 
same character (CHAR(00)) I use for all my government
and financial applications that deal with J/L 
entries, etc., where "trailing blank spaces" are

required.

Now you all know the secret of preserving 
"trailing blank spaces" for R:BASE text strings.


Very Best R:egards,

Razzak


At 02:37 PM 2/20/2018, James W. Kim, CPA, MBA wrote:


Razzak,

Just tried a test upload with over thousand 
entries.  CHAR(00) worked like a charm.  You R:ock!


Thanks,
James

On 2/20/2018 1:39 PM, A. Razzak Memon wrote:

James,

When I saw your request for help, I knew 
exactly what you were looking for, thus my response with
all details along with a sample text file. Yes, 
my R:Crystal Ball was working .


Have fun, and feel free to reach out to me if you have any questions.

Very Best R:egards,

Razzak


At 01:25 PM 2/20/2018, James W. Kim, CPA, MBA wrote:

For blank spaces, I have been using CHAR(32) 
which worked fine up to R:Base X Build: 10.0.1.20225.
However, newer updates tend to trim the 
CHAR(32) hard spaces and I had to keep one of computers
at build 10.0.1.20225 for the purpose of 
creating these upload files.  I just tried CHAR(00) as
suggested by Razzak and the null spaces seem 
to stick.  So, I am hopeful and will upload some test

files.

Thanks again,
James





--
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 rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [RBASE-L] - Text file that retains trailing blank space

2018-02-20 Thread James W. Kim, CPA, MBA

Razzak,

Just tried a test upload with over thousand entries.  CHAR(00) worked 
like a charm.  You R:ock!


Thanks,
James

On 2/20/2018 1:39 PM, A. Razzak Memon wrote:

James,

When I saw your request for help, I knew exactly what you were looking 
for, thus my response with
all details along with a sample text file. Yes, my R:Crystal Ball was 
working .


Have fun, and feel free to reach out to me if you have any questions.

Very Best R:egards,

Razzak


At 01:25 PM 2/20/2018, James W. Kim, CPA, MBA wrote:

For blank spaces, I have been using CHAR(32) which worked fine up to 
R:Base X Build: 10.0.1.20225.
However, newer updates tend to trim the CHAR(32) hard spaces and I 
had to keep one of computers
at build 10.0.1.20225 for the purpose of creating these upload 
files.  I just tried CHAR(00) as
suggested by Razzak and the null spaces seem to stick.  So, I am 
hopeful and will upload some test

files.

Thanks again,
James






--
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 rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [RBASE-L] - Text file that retains trailing blank space

2018-02-20 Thread A. Razzak Memon

James,

When I saw your request for help, I knew exactly what you were 
looking for, thus my response with
all details along with a sample text file. Yes, my R:Crystal Ball was 
working .


Have fun, and feel free to reach out to me if you have any questions.

Very Best R:egards,

Razzak


At 01:25 PM 2/20/2018, James W. Kim, CPA, MBA wrote:

For blank spaces, I have been using CHAR(32) which worked fine up to 
R:Base X Build: 10.0.1.20225.
However, newer updates tend to trim the CHAR(32) hard spaces and I 
had to keep one of computers
at build 10.0.1.20225 for the purpose of creating these upload 
files.  I just tried CHAR(00) as
suggested by Razzak and the null spaces seem to stick.  So, I am 
hopeful and will upload some test

files.

Thanks again,
James




--
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 rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [RBASE-L] - Text file that retains trailing blank space

2018-02-20 Thread karentellef via RBASE-L
Not sure if this is still the case, but I thought char(32) was always a soft 
space.  I always used 255 as a hard space.  Glad to hear the 00 might work for 
you!

Karen

 

 

 

-Original Message-
From: James W. Kim, CPA, MBA <james@kimcpa.com>
To: rbase-l <rbase-l@googlegroups.com>
Sent: Tue, Feb 20, 2018 12:28 pm
Subject: Re: [RBASE-L] - Text file that retains trailing blank space

Thank you Stephen and others for the suggestions.  Most of systems I 
work with does not allow extended ASCII characters, so CHAR(160) would 
not work.

I have been submitting formatted text files to various federal and state 
authorities for years.  Some systems, such as EFTPS, are tolerant and 
simple SFIL and SPUT functions work well.  However, Social Security 
Admin EFW2 and IRS FIRE systems require fixed length files (512 and 750 
characters long)  that are sparsely populated with actual data, 
accompanied by great deal of blank spaces.

For blank spaces, I have been using CHAR(32) which worked fine up to 
R:Base X Build: 10.0.1.20225.  However, newer updates tend to trim the 
CHAR(32) hard spaces and I had to keep one of computers at build 
10.0.1.20225 for the purpose of creating these upload files.  I just 
tried CHAR(00) as suggested by Razzak and the null spaces seem to 
stick.  So, I am hopeful and will upload some test files.

Thanks again,
James


On 2/20/2018 9:04 AM, Stephen Markson wrote:
> Hi James,
>
> Can you insert CHAR(160) as the 512th character? This will keep the preceding 
> spaces and will show up as a blank. I don't know though whether the program 
> that takes the file as input will tolerate that.
>
> Regards,
>
> Stephen Markson
> The Pharmacy Examining Board of Canada
> 416.979.2431 x251
>
> -Original Message-
> From: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] On Behalf Of 
> James W. Kim, CPA, MBA
> Sent: February-19-18 4:26 PM
> To: rbase-l@googlegroups.com
> Subject: [RBASE-L] - Text file that retains trailing blank space
>
> Need some help with creating text file that retains blank spaces at the end 
> of each row.
>
> I often need to create text files with fixed row length such as 512 or
> 750 characters in a row. When there are no data value near the right end of 
> each row, the unused spaces need to be filled with blank spaces.
>
> The following is an example of how such text file would be built. The example 
> creates a row that has "FLOOR 7" at 274th space in a row that has 512 
> characters.  With some previous versions of R:Base, the trailing spaces is 
> retained after insertion of data using SPUT function and line feed (CR/LF) 
> would show up at 513th position.
>
> However, the current version would remove the trailing space when data is 
> inserted using SPUT function and the (CR/LF) moves up to 281st position.
>
> Is there anyway I can force the retention of trailing spaces so that CR/LF 
> always shows up at 513th position?
>
> Thanks in advance,
>
> James
>
>
>
> -- create text variable with blank spaces SET VAR vRow TEXT = NULL SET VAR 
> vRow = (SFIL((CHAR(32)),512))
> -- use SPUT function to fill in data
> SET VAR vRow = (SPUT(.vRow, 'start', 1)) SET VAR vRow = (SPUT(.vRow, 'Floor 
> 7', 274))
>
> -- write the variable to a text file
> OUTPUT sample.txt append
> WRITE .vRow USING
> ''
> OUTPUT SCREEN
>
>

-- 
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 rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [RBASE-L] - Text file that retains trailing blank space

2018-02-20 Thread James W. Kim, CPA, MBA
Thank you Stephen and others for the suggestions.  Most of systems I 
work with does not allow extended ASCII characters, so CHAR(160) would 
not work.


I have been submitting formatted text files to various federal and state 
authorities for years.  Some systems, such as EFTPS, are tolerant and 
simple SFIL and SPUT functions work well.  However, Social Security 
Admin EFW2 and IRS FIRE systems require fixed length files (512 and 750 
characters long)  that are sparsely populated with actual data, 
accompanied by great deal of blank spaces.


For blank spaces, I have been using CHAR(32) which worked fine up to 
R:Base X Build: 10.0.1.20225.  However, newer updates tend to trim the 
CHAR(32) hard spaces and I had to keep one of computers at build 
10.0.1.20225 for the purpose of creating these upload files.  I just 
tried CHAR(00) as suggested by Razzak and the null spaces seem to 
stick.  So, I am hopeful and will upload some test files.


Thanks again,
James


On 2/20/2018 9:04 AM, Stephen Markson wrote:

Hi James,

Can you insert CHAR(160) as the 512th character? This will keep the preceding 
spaces and will show up as a blank. I don't know though whether the program 
that takes the file as input will tolerate that.

Regards,

Stephen Markson
The Pharmacy Examining Board of Canada
416.979.2431 x251

-Original Message-
From: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] On Behalf Of 
James W. Kim, CPA, MBA
Sent: February-19-18 4:26 PM
To: rbase-l@googlegroups.com
Subject: [RBASE-L] - Text file that retains trailing blank space

Need some help with creating text file that retains blank spaces at the end of 
each row.

I often need to create text files with fixed row length such as 512 or
750 characters in a row. When there are no data value near the right end of 
each row, the unused spaces need to be filled with blank spaces.

The following is an example of how such text file would be built. The example creates a 
row that has "FLOOR 7" at 274th space in a row that has 512 characters.  With 
some previous versions of R:Base, the trailing spaces is retained after insertion of data 
using SPUT function and line feed (CR/LF) would show up at 513th position.

However, the current version would remove the trailing space when data is 
inserted using SPUT function and the (CR/LF) moves up to 281st position.

Is there anyway I can force the retention of trailing spaces so that CR/LF 
always shows up at 513th position?

Thanks in advance,

James



-- create text variable with blank spaces SET VAR vRow TEXT = NULL SET VAR vRow 
= (SFIL((CHAR(32)),512))
-- use SPUT function to fill in data
SET VAR vRow = (SPUT(.vRow, 'start', 1)) SET VAR vRow = (SPUT(.vRow, 'Floor 7', 
274))

-- write the variable to a text file
OUTPUT sample.txt append
WRITE .vRow USING
''
OUTPUT SCREEN




--
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 rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: [RBASE-L] - Text file that retains trailing blank space

2018-02-20 Thread Stephen Markson
Hi James,

Can you insert CHAR(160) as the 512th character? This will keep the preceding 
spaces and will show up as a blank. I don't know though whether the program 
that takes the file as input will tolerate that.

Regards,

Stephen Markson
The Pharmacy Examining Board of Canada
416.979.2431 x251

-Original Message-
From: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] On Behalf Of 
James W. Kim, CPA, MBA
Sent: February-19-18 4:26 PM
To: rbase-l@googlegroups.com
Subject: [RBASE-L] - Text file that retains trailing blank space

Need some help with creating text file that retains blank spaces at the end of 
each row.

I often need to create text files with fixed row length such as 512 or
750 characters in a row. When there are no data value near the right end of 
each row, the unused spaces need to be filled with blank spaces.

The following is an example of how such text file would be built. The example 
creates a row that has "FLOOR 7" at 274th space in a row that has 512 
characters.  With some previous versions of R:Base, the trailing spaces is 
retained after insertion of data using SPUT function and line feed (CR/LF) 
would show up at 513th position.

However, the current version would remove the trailing space when data is 
inserted using SPUT function and the (CR/LF) moves up to 281st position.

Is there anyway I can force the retention of trailing spaces so that CR/LF 
always shows up at 513th position?

Thanks in advance,

James



-- create text variable with blank spaces SET VAR vRow TEXT = NULL SET VAR vRow 
= (SFIL((CHAR(32)),512))
-- use SPUT function to fill in data
SET VAR vRow = (SPUT(.vRow, 'start', 1)) SET VAR vRow = (SPUT(.vRow, 'Floor 7', 
274))

-- write the variable to a text file
OUTPUT sample.txt append
WRITE .vRow USING
''
OUTPUT SCREEN


-- 
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 rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: [RBASE-L] - Text file that retains trailing blank space

2018-02-19 Thread Tony IJntema
Personal I am using reports for this kind of functionality.
There is an option Print to Text File and there you are able to create complex 
TXT files and so on.

Tony


-Oorspronkelijk bericht-
Van: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] Namens James W. 
Kim, CPA, MBA
Verzonden: maandag 19 februari 2018 22:26
Aan: rbase-l@googlegroups.com
Onderwerp: [RBASE-L] - Text file that retains trailing blank space

Need some help with creating text file that retains blank spaces at the end of 
each row.

I often need to create text files with fixed row length such as 512 or 750 
characters in a row. When there are no data value near the right end of each 
row, the unused spaces need to be filled with blank spaces.

The following is an example of how such text file would be built. The example 
creates a row that has "FLOOR 7" at 274th space in a row that has 512 
characters.  With some previous versions of R:Base, the trailing spaces is 
retained after insertion of data using SPUT function and line feed (CR/LF) 
would show up at 513th position.

However, the current version would remove the trailing space when data is 
inserted using SPUT function and the (CR/LF) moves up to 281st position.

Is there anyway I can force the retention of trailing spaces so that CR/LF 
always shows up at 513th position?

Thanks in advance,

James



-- create text variable with blank spaces SET VAR vRow TEXT = NULL SET VAR vRow 
= (SFIL((CHAR(32)),512))
-- use SPUT function to fill in data
SET VAR vRow = (SPUT(.vRow, 'start', 1)) SET VAR vRow = (SPUT(.vRow, 'Floor 7', 
274))

-- write the variable to a text file
OUTPUT sample.txt append
WRITE .vRow USING
''
OUTPUT SCREEN


-- 
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 rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: [RBASE-L] - Text file that retains trailing blank space

2018-02-19 Thread Claudine Robbins
I'm intrigued.  I use something similar to create a notepad text file which I 
write to the user's desktop for them to use as a virtual "sticker" to keep up 
with a list of items to check off.  I have trouble making it look good, the 
spacing is all over the place...

'COX--020118120001   02/01/18$50.00'
'ENERGYSERVICECOMPANY-1-01011811 01/01/18
$100.00'
 

Claudine

-Original Message-
From: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] On Behalf Of 
A. Razzak Memon
Sent: Monday, February 19, 2018 7:07 PM
To: rbase-l@googlegroups.com
Subject: Re: [RBASE-L] - Text file that retains trailing blank space

James,

Funny you should ask ...

One of my financial and tax collection agency clients was required to submit 
the delinquent tax collection file for their GL package that required pretty 
much the same file format that you are required to use on your end.

In addition to using the SFIL and SPUT commands to create the string, the key 
is to use the correct ASCII Symbol Character (CHAR(00)) for creating a blank 
line that should keep the trailing (BLANK) spaces.

Using the sample RRBYW19 database, I have mocked up the actual procedure to 
create a text file to illustrate the use of SFIL and SPUT commands and 
maintaining the trailing spaces.

See attached RRBYW19_FixedFieldFile.txt file.

In this sample each line is 80 characters long.

Using the MS Notepad, you will notice the trailing spaces.

Note:

If you need to open this file using the R:BASE Editor, make sure to enable the 
setting for [x] Keep Trailing Spaces. Otherwise, you will not be able to see 
any trailing spaces.

If that is what you are looking for and need a sample application to illustrate 
the use of SFIL and SPUT to create Fixed Field File, feel free to reach out to 
me.

Very Best R:egards,

Razzak


At 04:26 PM 2/19/2018, James W. Kim, CPA, MBA wrote:

>Need some help with creating text file that retains blank spaces at the 
>end of each row.
>
>I often need to create text files with fixed row length such as 512 or 
>750 characters in a row. When there are no data value near the right 
>end of each row, the unused spaces need to be filled with blank spaces.
>
>The following is an example of how such text file would be built. 
>The example creates a
>row that has "FLOOR 7" at 274th space in a row that has 512 characters. 
>With some previous versions of R:Base, the trailing spaces is retained 
>after insertion of data using SPUT function and line feed (CR/LF) would 
>show up at 513th position.
>
>However, the current version would remove the trailing space when data 
>is inserted using SPUT function and the (CR/LF) moves up to 281st 
>position.
>
>Is there anyway I can force the retention of trailing spaces so that 
>CR/LF always shows up at 513th position?

--
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 rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: [RBASE-L] - Text file that retains trailing blank space

2018-02-19 Thread Buddy Walker

James

  I have a file that contains the use of SFIL and SPUT. I used this to provide 
a class listing to a health insurance company. It's about 11 years old but I 
think it should still work.

Buddy

-Original Message-
From: rbase-l@googlegroups.com [mailto:rbase-l@googlegroups.com] On Behalf Of 
James W. Kim, CPA, MBA
Sent: Monday, February 19, 2018 4:26 PM
To: rbase-l@googlegroups.com
Subject: [RBASE-L] - Text file that retains trailing blank space

Need some help with creating text file that retains blank spaces at the end of 
each row.

I often need to create text files with fixed row length such as 512 or
750 characters in a row. When there are no data value near the right end of 
each row, the unused spaces need to be filled with blank spaces.

The following is an example of how such text file would be built. The example 
creates a row that has "FLOOR 7" at 274th space in a row that has 512 
characters.  With some previous versions of R:Base, the trailing spaces is 
retained after insertion of data using SPUT function and line feed (CR/LF) 
would show up at 513th position.

However, the current version would remove the trailing space when data is 
inserted using SPUT function and the (CR/LF) moves up to 281st position.

Is there anyway I can force the retention of trailing spaces so that CR/LF 
always shows up at 513th position?

Thanks in advance,

James



-- create text variable with blank spaces SET VAR vRow TEXT = NULL SET VAR vRow 
= (SFIL((CHAR(32)),512))
-- use SPUT function to fill in data
SET VAR vRow = (SPUT(.vRow, 'start', 1)) SET VAR vRow = (SPUT(.vRow, 'Floor 7', 
274))

-- write the variable to a text file
OUTPUT sample.txt append
WRITE .vRow USING
''
OUTPUT SCREEN


-- 
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 rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [RBASE-L] - Text file that retains trailing blank space

2018-02-19 Thread A. Razzak Memon

James,

Funny you should ask ...

One of my financial and tax collection agency clients was required to 
submit the delinquent
tax collection file for their GL package that required pretty much 
the same file format

that you are required to use on your end.

In addition to using the SFIL and SPUT commands to create the string, 
the key is to use
the correct ASCII Symbol Character (CHAR(00)) for creating a blank 
line that should keep

the trailing (BLANK) spaces.

Using the sample RRBYW19 database, I have mocked up the actual 
procedure to create a text
file to illustrate the use of SFIL and SPUT commands and maintaining 
the trailing spaces.


See attached RRBYW19_FixedFieldFile.txt file.

In this sample each line is 80 characters long.

Using the MS Notepad, you will notice the trailing spaces.

Note:

If you need to open this file using the R:BASE Editor, make sure to 
enable the setting for
[x] Keep Trailing Spaces. Otherwise, you will not be able to see any 
trailing spaces.


If that is what you are looking for and need a sample application to 
illustrate the use of

SFIL and SPUT to create Fixed Field File, feel free to reach out to me.

Very Best R:egards,

Razzak


At 04:26 PM 2/19/2018, James W. Kim, CPA, MBA wrote:

Need some help with creating text file that retains blank spaces at 
the end of each row.


I often need to create text files with fixed row length such as 512 
or 750 characters in
a row. When there are no data value near the right end of each row, 
the unused spaces

need to be filled with blank spaces.

The following is an example of how such text file would be built. 
The example creates a
row that has "FLOOR 7" at 274th space in a row that has 512 
characters. With some previous
versions of R:Base, the trailing spaces is retained after insertion 
of data using SPUT

function and line feed (CR/LF) would show up at 513th position.

However, the current version would remove the trailing space when 
data is inserted using

SPUT function and the (CR/LF) moves up to 281st position.

Is there anyway I can force the retention of trailing spaces so that 
CR/LF always shows

up at 513th position?


--
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 rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
1001121 Bytes & Words170428 1915796CREDIT
1002127 RAM Data Systems, Inc.170428 1520963CREDIT
1003124 Barton and Associates170428 0097700CREDIT
1004121 Bytes & Words170428 0182415CREDIT
1005109 Compdat Computer Consulting170428 1762511CREDIT
1006116 Compumasters Computer Supply170428 0336028CREDIT
1007112 Computer Medical Ctr.170428 0766318CREDIT
1008103 Computer Mountain Inc.,170517 0453638CREDIT
1009100 Computer Warehouse - II170518 0806467CREDIT
1010106 Computer Warehouse - I170520 0234674CREDIT
1011117 Data Solutions170528 0604850CREDIT
1012115 Datacrafters Infosystems170529 0629889CREDIT
1013104 Industrial Concepts Inc.170628 0488496CREDIT
1014126 Johnson Technologies170629 0205217CREDIT
1015120 Lanufacturers Discount Computers170711 0185579CREDIT
1016122 Microcomputer Distribution170712 0427012CREDIT
1017122 Microcomputer Distribution170728 0463948CREDIT
1018101 Microtech University - I170729 0185579CREDIT
1019111 Microtech University - II170803 0206199CREDIT
1020107 Midtown Computer Co.170812 0302425CREDIT
1021125 MIS by Design170814 0151213CREDIT
1022119 Modular Software, Inc.170826 0528262CREDIT
1023108 Nordan Distributors, Inc.170827 0615651CREDIT
1024114 Olympic Sales170827 1173371CREDIT
1025114 Olympic Sales170827 0352012CREDIT
1026114 Olympic Sales170827 0631362CREDIT
1027118 Open Systems I/O170902 0260749CREDIT
1028105 PC Consultation And Design170903 1030995CREDIT
1029105 PC Consultation And Design170911 0302425CREDIT
1030110 Softech Database Design170928 1209701CREDIT
1031127 RAM Data Systems, 

[RBASE-L] - Text file that retains trailing blank space

2018-02-19 Thread James W. Kim, CPA, MBA
Need some help with creating text file that retains blank spaces at the 
end of each row.


I often need to create text files with fixed row length such as 512 or 
750 characters in a row. When there are no data value near the right end 
of each row, the unused spaces need to be filled with blank spaces.


The following is an example of how such text file would be built. The 
example creates a row that has "FLOOR 7" at 274th space in a row that 
has 512 characters.  With some previous versions of R:Base, the trailing 
spaces is retained after insertion of data using SPUT function and line 
feed (CR/LF) would show up at 513th position.


However, the current version would remove the trailing space when data 
is inserted using SPUT function and the (CR/LF) moves up to 281st position.


Is there anyway I can force the retention of trailing spaces so that 
CR/LF always shows up at 513th position?


Thanks in advance,

James



-- create text variable with blank spaces
SET VAR vRow TEXT = NULL
SET VAR vRow = (SFIL((CHAR(32)),512))
-- use SPUT function to fill in data
SET VAR vRow = (SPUT(.vRow, 'start', 1))
SET VAR vRow = (SPUT(.vRow, 'Floor 7', 274))

-- write the variable to a text file
OUTPUT sample.txt append
WRITE .vRow USING 
''

OUTPUT SCREEN


--
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 rbase-l+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.