searching files 
Author Message
 searching files

I have a text file being generated using labview similar to that shown
below.
Each row is the result of different tests.  The first column is the serial
number of the UUT.  When the operator writes in the serial number of the UUT
at the start of the test sequence, I am trying to do a check on the first
column to ensure the same serial number has not been previously entered.  If
it has, the operator is then asked to type another serial number.  The batch
sizes for tests are not consistent.  I have had a few goes at trying to do
this and I keep failing.  Any assistance would be greatly appreciated.
Denis

Serial Number, Result1, Result2
123FR23, 12345, 2345
123FQ32, 5432, 234



Mon, 02 Dec 2002 03:00:00 GMT  
 searching files
I can see a couple of ways to do this.  Perhaps the easiest would be to
read your text file as a spreadsheet string.  You can search the string
with the match pattern function in the vi library.  Based on the
results of the search you can prompt for a new serial number, or
process it as normal.

The other way would be to maintain the contents of the data file in
memory as a 2D array of strings (this may not work if your data file is
extremely large).  When you want to add a new field, you can index the
2D array to a 1D array that contains the first column (the serial #s),
then use the search 1D array function for the current serial number.

The first solution is probably the easier one to implement.  Hopefully
I understood your problem correctly, and this may help, feel free to
contact me with any other questions.

Spencer Anderson



Quote:
> I have a text file being generated using labview similar to that shown
> below.
> Each row is the result of different tests.  The first column is the
serial
> number of the UUT.  When the operator writes in the serial number of
the UUT
> at the start of the test sequence, I am trying to do a check on the
first
> column to ensure the same serial number has not been previously
entered.  If
> it has, the operator is then asked to type another serial number.
The batch
> sizes for tests are not consistent.  I have had a few goes at trying
to do
> this and I keep failing.  Any assistance would be greatly appreciated.
> Denis

> Serial Number, Result1, Result2
> 123FR23, 12345, 2345
> 123FQ32, 5432, 234

Sent via Deja.com http://www.deja.com/
Before you buy.


Sat, 07 Dec 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. number of records for tps file and searching files

2. search files

3. Search file and print line + next line?

4. Search file procedure

5. FYI - Re: Speed of searching file using Queues

6. search file dbfntxax.ch

7. TSO Rexx to search file for string

8. searching files into a table

9. search files / directory listing

10. Search file !!!

11. Searching files

12. searching files

 

 
Powered by phpBB® Forum Software