I need to read thru a capture file of a Nortel PBX TNB report using strfind. The Terminal Number report represents the features and button programming of each telephone set. Each TN is grouped in a vertical format with a field name, space, and value(s) to the right, carriage return, next field name, etc. I can strfind the feature data where the report is consistant in order of appearance (no problem there).
The problem is the last half of TN rpt containing the phone set key (button) programming has varible lines of text, and the data assigned to Keys are found with no specific pattern/order or may not programmed at all. Thus I believe I must loop thru a block of text several times, each time strfind a different field name and collect the desired data.
I think I need to do the following:
>Identify begining and end of the text block using strfind (" KEY 00 " and " DATE: ")
>Count lines of text between these two markers
>Go back to the start of the block and while tracking line count
>strfind the first field name "CFW" and collect the data; else data = ""
>Go back to start of block marker
>strfind the next field name "SCU", collect data; else data = ""
>Go back...etc. for about 3-4 fields to collect.
>Repeat the feature section and Key programming section for each set TN until EOF is reached.
I haven't found any Aspect examples explaining how to loop thru a portion of the capture file, then move on to the next TN group. This information would be valued for other reports I wish to deseminate into spreadsheets.
Thanks in advance.
The problem is the last half of TN rpt containing the phone set key (button) programming has varible lines of text, and the data assigned to Keys are found with no specific pattern/order or may not programmed at all. Thus I believe I must loop thru a block of text several times, each time strfind a different field name and collect the desired data.
I think I need to do the following:
>Identify begining and end of the text block using strfind (" KEY 00 " and " DATE: ")
>Count lines of text between these two markers
>Go back to the start of the block and while tracking line count
>strfind the first field name "CFW" and collect the data; else data = ""
>Go back to start of block marker
>strfind the next field name "SCU", collect data; else data = ""
>Go back...etc. for about 3-4 fields to collect.
>Repeat the feature section and Key programming section for each set TN until EOF is reached.
I haven't found any Aspect examples explaining how to loop thru a portion of the capture file, then move on to the next TN group. This information would be valued for other reports I wish to deseminate into spreadsheets.
Thanks in advance.