Record Deliniating

B

Bill

I have a sequential file that contains records
like:

D9/10' 0
U-1,083.65
T-1,083.65
NTXFR
PDirected Transfers
L[S01 322122]
^
Currently, I have the open statement as:

Open FileName For Input As #1

When reading the file, I don't want the input
records split at the occurrence of the comma.
I.e., I don't want the two records:

U-1,083.65
T-1,083.65

to become

U-1
083.65
T-1
083.65

What do I add to the Open or Input statements
to prevent the splitting?

Thanks,
Bill
 
S

Stuart McCall

Bill said:
I have a sequential file that contains records
like:

D9/10' 0
U-1,083.65
T-1,083.65
NTXFR
PDirected Transfers
L[S01 322122]
^
Currently, I have the open statement as:

Open FileName For Input As #1

When reading the file, I don't want the input
records split at the occurrence of the comma.
I.e., I don't want the two records:

U-1,083.65
T-1,083.65

to become

U-1
083.65
T-1
083.65

What do I add to the Open or Input statements
to prevent the splitting?

Thanks,
Bill

Use Line Input to read the file line by line:

Line Input #1, MyStringVariable
 
B

Bill

Thanks Stuart.

Too bad the HELP text about "Input"
doesn't at least have a "See Also" in
reference to the use of "Line Input".

Thanks again,
Bill

Stuart McCall said:
Bill said:
I have a sequential file that contains records
like:

D9/10' 0
U-1,083.65
T-1,083.65
NTXFR
PDirected Transfers
L[S01 322122]
^
Currently, I have the open statement as:

Open FileName For Input As #1

When reading the file, I don't want the input
records split at the occurrence of the comma.
I.e., I don't want the two records:

U-1,083.65
T-1,083.65

to become

U-1
083.65
T-1
083.65

What do I add to the Open or Input statements
to prevent the splitting?

Thanks,
Bill

Use Line Input to read the file line by line:

Line Input #1, MyStringVariable
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top