11-05-2006, 04:46 PM
Hello,
I need to move down two lines in a log file then check the next 10 lines or so to see if they start with "Urgent". If they do i need to take each line and populate an array with each word in the line. I want the array to have the first dimension MyArray[0] [0] to be the first word (Urgent) in the line and the next, MyArray[0] [1] to be the second word, MyArray[1] [0] first word next line. Each line has 6 parts to it delimited by a space....nothing i've tried has worked, could i ask you for an example.
I also need to know how to access and modify each dimension. A small example would be fine. I understand how to work with arrays in other languages but nothing i've tried in QM has worked. I've read everything i can find on Arrays in QM help and on the forum and I'm stuck.
My log files are one file per day with multiple appends during each day. So after I go through the first chunk of text i need to move down to the next appended chunk of text in the file and start again. Three blank lines delimit each chunk of text.
Can you help?
If you think using TYPE or CLASS would be a better solution by all means suggest away. I know thats bascally what i'm doing is creating a CLASS but I have no idea how to do that either.
Thanks in advance for any help you can give on this.
Bob
I need to move down two lines in a log file then check the next 10 lines or so to see if they start with "Urgent". If they do i need to take each line and populate an array with each word in the line. I want the array to have the first dimension MyArray[0] [0] to be the first word (Urgent) in the line and the next, MyArray[0] [1] to be the second word, MyArray[1] [0] first word next line. Each line has 6 parts to it delimited by a space....nothing i've tried has worked, could i ask you for an example.
I also need to know how to access and modify each dimension. A small example would be fine. I understand how to work with arrays in other languages but nothing i've tried in QM has worked. I've read everything i can find on Arrays in QM help and on the forum and I'm stuck.
My log files are one file per day with multiple appends during each day. So after I go through the first chunk of text i need to move down to the next appended chunk of text in the file and start again. Three blank lines delimit each chunk of text.
Can you help?
If you think using TYPE or CLASS would be a better solution by all means suggest away. I know thats bascally what i'm doing is creating a CLASS but I have no idea how to do that either.
Thanks in advance for any help you can give on this.
Bob