[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: [sqr-users] curious flat file behavior
Clark,
As others have noted, you are observing the correct behavior: trailing
blanks are automatically deleted.
In situations where I want to read every character, I open the file as
fixed:1, and read the file byte-by-byte. This also allows me to read
and process null characters (character 0).
Hope this helps.
Ray
On Fri, Jul 25, 2003 at 01:45:08PM -0500, the dragon wrote:
> Hi all. I have a flat file (attached) that is acting strangely. The size is
> 300 characters. When I read the flat file in, and there is a character in
> the last space (number 300) everything works correctly (see A below) but if
> there are only spaces until the end, my substr does not get the spaces (see
> B below) Any ideas? BTW, this looks much better in fixed font....
>
> I have never seen this happen before.
>
> thanks in advance
> clark 'the dragon' willis
>
>
> A
> Account start |111100 |
> Dept Id start |0200 |
> Oper Unit start |0100 |
> Product start | |
> Afilliate start | |
> Project start | |
> CF1 start | |
> CF2 start | |
> CF3 start | |
> Line Descr start |JUST A LINE DESCRIPTION A |
> JLine Ref start | |
> OI Key start | |
> Account end |111100|
> Dept Id end |0200|
> Oper Unit end |0100|
> Product end | |
> Afilliate end | |
> Project end | |
> CF1 end | |
> CF2 end | |
> CF3 end | |
> Line Descr end |JUST A LINE DESCRIPTION A|
> JLine Ref end | |
> OI Key end | |
>
> B
>
> Account start |111100 |
> Dept Id start |0200 |
> Oper Unit start |0100 |
> Product start | |
> Afilliate start | |
> Project start | |
> CF1 start | |
> CF2 start | |
> CF3 start | |
> Line Descr start |JUST A LINE DESCRIPTION B|
> JLine Ref start ||
> OI Key start ||
> Account end |111100|
> Dept Id end |0200|
> Oper Unit end |0100|
> Product end | |
> Afilliate end | |
> Project end | |
> CF1 end | |
> CF2 end | |
> CF3 end | |
> Line Descr end |JUST A LINE DESCRIPTION B|
> JLine Ref end ||
> OI Key end ||
>
>
> PSA: Salary <> Slavery. If you earn a salary, your employer is renting your
> services for 40 hours a week, not purchasing your soul. Your time is the
> only real finite asset that you have, and once used it can never be
> recovered, so don't waste it by giving it away.
>
> "Time is the coin of your life. It is the only coin you have, and only you
> can determine how it will be spent. Be careful lest you let other people
> spend it for you."
>
> Carl Sandburg
> (1878 - 1967)
>
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> XXXXX00945ACTUALS 20030720 111100 0200 0100
> 00000000000000500000USDJUST A LINE
> DESCRIPTION A
> X
> 00945ACTUALS 20030720 111100 0200 0100
> -0000000000000500000USDJUST A LINE
> DESCRIPTION B
> 00945ACTUALS 20030720 176014 8151 00951
> 00000000000001000000USDJUST A LINE
> DESCRIPTION C
> 00945ACTUALS 20030720 176014 8151 00951
> -0000000000001000000USDJUST A LINE
> DESCRIPTION D
> 00945ACTUALS 20030720 293100 0200 1000 5114 00951
> 00000000000005000000USDJUST A LINE
> DESCRIPTION F
> 00945ACTUALS 20030720 293100 0200 1000 5114 00951
> 00000000000001000000USDJUST A LINE
> DESCRIPTION G
> 00945ACTUALS 20030720 511050 0200 5110 00951
> 00000000000001000000USDJUST A LINE
> DESCRIPTION H
> 00945ACTUALS 20030720 660330 0160 1000 5112 00951
> 00000000000001000000USDJUST A LINE
> DESCRIPTION I
> XXXXX00951ACTUALS 20030720 111100 0200 1000
> 00000000000001000000USDJUST A LINE
> DESCRIPTION J
> 00951ACTUALS 20030720 111100 0200 1000 00923
> 00000000000001000000USDJUST A LINE
> DESCRIPTION K
> 00951ACTUALS 20030720 176014 00966
> 00000000000001000000USDJUST A LINE
> DESCRIPTION L
> 00951ACTUALS 20030720 176100 0200 1000 5112 00967
> 00000000000001000000USDJUST A LINE
> DESCRIPTION M
> XXXXX00966ACTUALS 20030720 111200 0200 8000
> 00000000000000100000USDJUST A LINE
> DESCRIPTION N
> 00966ACTUALS 20030720 111200 0100 8000
> 00000000000000100000USDJUST A LINE
> DESCRIPTION O
> 00966ACTUALS 20030720 111300 0100 8000
> 00000000000000100000USDJUST A LINE
> DESCRIPTION P
> 00966ACTUALS 20030720 111599 0200 8000
> 00000000000000100000USDJUST A LINE
> DESCRIPTION Q
> 00966ACTUALS 20030720 113100 8000
> 00000000000000100000USDJUST A LINE
> DESCRIPTION R
> 00966ACTUALS 20030720 113100
> 00000000000000100000USDJUST A LINE
> DESCRIPTION S
> 00966ACTUALS 20030720 113100 0200 8000 00951
> 00000000000000100000USDJUST A LINE
> DESCRIPTION T
> 00966ACTUALS 20030720 113100 0100 8000
> 00000000000000100000USDJUST A LINE
> DESCRIPTION U
> 00966ACTUALS 20030720 114500 0000001475
> 00000000000000100000USDJUST A LINE
> DESCRIPTION V
> 00966ACTUALS 20030720 114500 0100 8000
> 00000000000000100000USDJUST A LINE
> DESCRIPTION W
> 00966ACTUALS 20030720 114500 1475 8000
> 00000000000000100000USDJUST A LINE
> DESCRIPTION X
>
>
----------------------------------------------------------------------
Ray Ontko rayo@ontko.com Phone 1.765.935.4283 Fax 1.765.962.9788
Ray Ontko & Co. Software Consulting Services http://www.ontko.com/
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users