Hi. I am trying to process very large text files whereby the data are stored in columns and rows (like a table) Visual Basic 6.0.
The text file looks something like this:
* LRU1 LRU2 LRU3 LRU4 LRU5 LRU6 LRU7 ......Dummy5
Bn1_Failures 0.2 0.1 0 0.3 0.4 0.6 0.9 0.1 0.9
.
Bn9_Failures 0.4 0.5 0 0.1 0.8 0.6 0.7 0.2 1.9
--------------------------------------------------
Bn1_SparesFill 100% 80% 70% 60% 50% 40% 30% 10%
.
Bn9_SparesFill 50% 40% 30% 10% 80% 70% 40% 60%
LRU1, LRU2, etc are the line items whereas Bn1_Failure to Bn9_Failure, etc are the criterias / properties belonging to each line items
Each group of criteria is segregated by a -
The first group may contain criteria of Bn1_Failure all the way to Bn9_Failures, second group may contain criteria of Bn1_SparesFill to Bn9_SparesFill, Bn1_SparesWait to Bn9_Spareswait, Bn1_DownBySparesP1 to Bn1_DownBySparesP3 ... Bn9_DownBySparesP3, etc. The number of criterias are also unfixed too.
The number of line items are not fixed whereby there can be any number
I need to populate the criterias i.e. Bn1_Failures to Bn9_Failure,etc (i.e. all the items in the first column) into a combo box. Upon choosing a criteria from the combo box i.e. Bn1_SparesFill from the list, it will retrieve all the items pertaining to Bn1_SparesFill,Bn1_SparesWait and Bn1Down_bySpare_P1,Bn1Down_bySpare_P2,Bn1Down_bySpare_P3 and the values and then displayed all these values sorted by Bn1_SparesFill in ascending order.
Q1: How can I retrieve data from text file such that the same line item i.e. LRU1 properties Bn1_Failure, Bn1_SparesFill,Bn1_SparesWait, Bn1_DownBySpareP1, Bn1_DownBySpareP2 and Bn1_DownBySpareP3 can be stored in a array of structure and then be sorted based on the criteria when the criterias are unfixed and the sorting criteria is unfixed too.
The criterias are unfixed i.e. If the person chooses Bn1_LRUWait, another set of criterias associated with the selection in retrieved, this criteria may cause the values belonging to LRUWait
to be sorted in ascending order.
Can anyone please help? Thanks!
The text file looks something like this:
* LRU1 LRU2 LRU3 LRU4 LRU5 LRU6 LRU7 ......Dummy5
Bn1_Failures 0.2 0.1 0 0.3 0.4 0.6 0.9 0.1 0.9
.
Bn9_Failures 0.4 0.5 0 0.1 0.8 0.6 0.7 0.2 1.9
--------------------------------------------------
Bn1_SparesFill 100% 80% 70% 60% 50% 40% 30% 10%
.
Bn9_SparesFill 50% 40% 30% 10% 80% 70% 40% 60%
LRU1, LRU2, etc are the line items whereas Bn1_Failure to Bn9_Failure, etc are the criterias / properties belonging to each line items
Each group of criteria is segregated by a -
The first group may contain criteria of Bn1_Failure all the way to Bn9_Failures, second group may contain criteria of Bn1_SparesFill to Bn9_SparesFill, Bn1_SparesWait to Bn9_Spareswait, Bn1_DownBySparesP1 to Bn1_DownBySparesP3 ... Bn9_DownBySparesP3, etc. The number of criterias are also unfixed too.
The number of line items are not fixed whereby there can be any number
I need to populate the criterias i.e. Bn1_Failures to Bn9_Failure,etc (i.e. all the items in the first column) into a combo box. Upon choosing a criteria from the combo box i.e. Bn1_SparesFill from the list, it will retrieve all the items pertaining to Bn1_SparesFill,Bn1_SparesWait and Bn1Down_bySpare_P1,Bn1Down_bySpare_P2,Bn1Down_bySpare_P3 and the values and then displayed all these values sorted by Bn1_SparesFill in ascending order.
Q1: How can I retrieve data from text file such that the same line item i.e. LRU1 properties Bn1_Failure, Bn1_SparesFill,Bn1_SparesWait, Bn1_DownBySpareP1, Bn1_DownBySpareP2 and Bn1_DownBySpareP3 can be stored in a array of structure and then be sorted based on the criteria when the criterias are unfixed and the sorting criteria is unfixed too.
The criterias are unfixed i.e. If the person chooses Bn1_LRUWait, another set of criterias associated with the selection in retrieved, this criteria may cause the values belonging to LRUWait
to be sorted in ascending order.
Can anyone please help? Thanks!