Quite. if you set var vtext text = (sfil('x', 1501)) you will get a "warinig new value will be truncated". And it is truncated at the limit of TEXT datatype 1500 chars.

----- Original Message ----- From: "Emmitt Dove" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Wednesday, February 25, 2009 5:14 PM
Subject: [RBASE-L] - RE: Stripping "blanks" off the end of file lines


Dennis,



I have one particular situation where I've been using
(SFIL(.varname,'0',512)) for years, and it works fine.



Emmitt Dove

Manager, Converting Applications Development

Evergreen Packaging, Inc.

[email protected]

(203) 214-5683 m

(203) 643-8022 o

(203) 643-8086 f

[email protected]



From: [email protected] [mailto:[email protected]] On Behalf Of Dennis
McGrath
Sent: Wednesday, February 25, 2009 4:33 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Stripping "blanks" off the end of file lines



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

         (        )   (        )

----------\    (----)     /-----------

              \__)   (__/





--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, place any text to search for.
================================================


Reply via email to