External File truncating first three characters on each read

General development discussion.

Moderators: Susan Smith, admin, Gabriel

Post Reply
John
Posts: 555
Joined: Sun Apr 26, 2009 8:27 am

External File truncating first three characters on each read

Post 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
gordon
Posts: 358
Joined: Fri Apr 24, 2009 6:02 pm

Post 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.
John
Posts: 555
Joined: Sun Apr 26, 2009 8:27 am

Post 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.)
Post Reply