Damon, I just checked the docs. SFIL only works to 500 characters!
Dennis ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Dennis McGrath Sent: Wednesday, February 25, 2009 3:30 PM To: RBASE-L Mailing List Subject: [RBASE-L] - RE: Stripping "blanks" off the end of file lines Damon, RBASE has a tendency to drop trailing spaces, by intention, but sometimes it gets in your way. Do you SET WIDTH 520 Before writing the file? Would the file be just as good if you put a CHAR(255) in position 512? SET VAR vRECORD = (SPUT(.vRECORD,CHAR(255),512)) Would guarantee that the line was 512 long and would not be truncated by RBASE Dennis McGrath ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Gray, Damon Sent: Wednesday, February 25, 2009 3:16 PM To: RBASE-L Mailing List Subject: [RBASE-L] - Stripping "blanks" off the end of file lines Greetings all. I'm working an issue in which our W2 files are being rejected by the U.S. government because the "records" are not 512 bytes long. After burning a couple of hours on investigative techniques I won't bore you with or embarrass myself with, I'll tell you that indeed the records are NOT 512 bytes, but are 500 bytes. The last 12 bytes of each line (required by the specification) are being stripped off at some point when before the file is written to the disc. I start with this routine: SET VAR vBLANK = (CHAR(32)) CLEAR VAR vRECORD SET VAR vRECORD TEXT SET VAR vRECORD = (SFIL(.vBLANK,512)) And then use SPUT to place the various data items in their required position. The last piece written is a "P" at position 500. Positions 501 - 512 should be blanks, as created by the SFIL above, but instead are being stripped off. Any idea why? wwwww ( @ @ ) -------oOO---(_)---OOo------- Damon J. Gray Anvil Corporation Business Services (360) 937-0770 oooo0 0oooo ( ) ( ) ----------\ (----) /----------- \__) (__/

