RE: [RBASE-L] - Text file that retains trailing blank space
>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
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
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
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
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
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
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
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
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
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
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
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
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
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. 1001 121 Bytes & Words 170428 1915796 CREDIT 1002 127 RAM Data Systems, Inc.170428 1520963 CREDIT 1003 124 Barton and Associates 170428 0097700 CREDIT 1004 121 Bytes & Words 170428 0182415 CREDIT 1005 109 Compdat Computer Consulting 170428 1762511 CREDIT 1006 116 Compumasters Computer Supply 170428 0336028 CREDIT 1007 112 Computer Medical Ctr. 170428 0766318 CREDIT 1008 103 Computer Mountain Inc., 170517 0453638 CREDIT 1009 100 Computer Warehouse - II 170518 0806467 CREDIT 1010 106 Computer Warehouse - I170520 0234674 CREDIT 1011 117 Data Solutions170528 0604850 CREDIT 1012 115 Datacrafters Infosystems 170529 0629889 CREDIT 1013 104 Industrial Concepts Inc. 170628 0488496 CREDIT 1014 126 Johnson Technologies 170629 0205217 CREDIT 1015 120 Lanufacturers Discount Computers 170711 0185579 CREDIT 1016 122 Microcomputer Distribution170712 0427012 CREDIT 1017 122 Microcomputer Distribution170728 0463948 CREDIT 1018 101 Microtech University - I 170729 0185579 CREDIT 1019 111 Microtech University - II 170803 0206199 CREDIT 1020 107 Midtown Computer Co. 170812 0302425 CREDIT 1021 125 MIS by Design 170814 0151213 CREDIT 1022 119 Modular Software, Inc.170826 0528262 CREDIT 1023 108 Nordan Distributors, Inc. 170827 0615651 CREDIT 1024 114 Olympic Sales 170827 1173371 CREDIT 1025 114 Olympic Sales 170827 0352012 CREDIT 1026 114 Olympic Sales 170827 0631362 CREDIT 1027 118 Open Systems I/O 170902 0260749 CREDIT 1028 105 PC Consultation And Design170903 1030995 CREDIT 1029 105 PC Consultation And Design170911 0302425 CREDIT 1030 110 Softech Database Design 170928 1209701 CREDIT 1031 127 RAM Data Systems,
[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.