Hello,
Just a quick question about an input file.
I have a program that reads a CUSTOMER.DAT file into a table and searches based on either the Id or the phone number. It is in this format:
ID FIRST LAST ADDRESS CITY STATE ZIP PHONE
00039June Adams 660 Elm St. Greer OH44628(614) 444-8585
The column headings here are just fyi. I condensed the spaces so that it fit on one line in this text box, but there is NO space between ID and First. There are only 50 records in the file in ascending order by ID#. (00001 to 00050) I have the OCCURS clause set to 100 so it can be updated with new customers.
I have the program up and it works just fine searching either the Id or phone number. My question is, when I add records to the file in Notepad, or Word or even Edit (MSDOS) and then try to search it, it only returns a good search for the new records if the phone number is correct, but not the Id.
Example: I added two full records. 00051 and 00052. If I search (this is done interactively by the user with an accept) on 00051, or 00052 it returns not found, but if I search a phone number matching the new Id, it returns found and displays all of the information - EVEN THE ID#!!!
Is there a certain way to create or update a .dat file that prevents me from doing it this way? (I work on a PC with MicroFocus)
Thank you for the help.
-Tyler
Just a quick question about an input file.
I have a program that reads a CUSTOMER.DAT file into a table and searches based on either the Id or the phone number. It is in this format:
ID FIRST LAST ADDRESS CITY STATE ZIP PHONE
00039June Adams 660 Elm St. Greer OH44628(614) 444-8585
The column headings here are just fyi. I condensed the spaces so that it fit on one line in this text box, but there is NO space between ID and First. There are only 50 records in the file in ascending order by ID#. (00001 to 00050) I have the OCCURS clause set to 100 so it can be updated with new customers.
I have the program up and it works just fine searching either the Id or phone number. My question is, when I add records to the file in Notepad, or Word or even Edit (MSDOS) and then try to search it, it only returns a good search for the new records if the phone number is correct, but not the Id.
Example: I added two full records. 00051 and 00052. If I search (this is done interactively by the user with an accept) on 00051, or 00052 it returns not found, but if I search a phone number matching the new Id, it returns found and displays all of the information - EVEN THE ID#!!!
Is there a certain way to create or update a .dat file that prevents me from doing it this way? (I work on a PC with MicroFocus)
Thank you for the help.
-Tyler