Page 1 of 1

External File truncating first three characters on each read

Posted: Mon Aug 08, 2011 2:29 pm
by John
I'm attempting to read an external file. Each time I read the first three characters are ignored.

My statements looks like:
24000 dim gnl_block$*512
21400 open #1: 'name=C:\Users\John\Desktop\TimeSheet.csv,RecL=100,Shr',external,input
24800 read #1: gnl_block$

changing the RECL seems to have no effect. I've tried this in 4.03 and 4.3, they both have the same issue. I'm not sure what I'm doing wrong.

Oh and reading it as a display file is not an option because I need to read the LFs and/or CRLFs that are at the end of each line.

Any suggestions?

-John Bowman

Posted: Mon Aug 08, 2011 7:37 pm
by gordon
John.. you are on support. So if BR isn't performing to spec, send me the file in question and we will check it out and correct BR if it is in error.

Posted: Tue Aug 09, 2011 9:41 am
by John
The addition of the form statement worked perfectly. Thank you very much!

-John

____________________RE:____________________
John,

Try adding a FORM statement.

24800 read #1,using "form c 100":gnl_block$

I forget exactly why this is, but without the form statement, I think it treats the first 3 characters as a binary record length or something like that.

David Bohlke

(Sorry for responding like this, but I either don't have a userid/password for the forum or don't know what it is.)