I have a text file in the following format with more than 100 entries
Header Responses
--- AMD 6001 ---
Sent Packet
FRO 101
A_TEST 5001
Status 0
--- AMD 6002 ---
Sent Packet
FRO 101
A_TEST 5002
Status 1
My requirement is to validate whether the value of 'Status' is 0, if so, proceed further to fetch the random 'A_TEST' value from each entry. Could you please help me with an effective approach to find the 'A_Test' values in each entry, because time taken for execution is more important due to large number entries.
I have written a code in following structure
set txtfile = fso.OpenTextFile("")
set content= txtfile.ReadAll
arrEntry = split (content,"--- AMD")
For num=1 to ubound(arrEntry)
'2nd entry fails due to its entry status
If Instr(arrEntry(num),"Status 0") > 0 Then
' How to proceed further to get the value of 'A_TEST' from this array ????
Else
'Fail - Dont Proceed Further
End If
Next