Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compare data output

Status
Not open for further replies.

majpooper

Technical User
Feb 5, 2005
17
US
Can someone get me started on how to compare data output captured in PROCOM useing Aspect
 
I want to run two commands

The idea is to see what cards DO NOT have links assigned

Some cards will never have links assigned - that's no problem if they always show up on a report I would like to generate.

But the idea is I want to generate a list of cards minus the cards I get as output as a result of the second command

> rept-stat-card
CARD VERSION TYPE GPL PST SST AST
1109 063-033-007 HMUX BPHMUX IS-
1110 063-033-007 HMUX BPHMUX IS-
1205 062-001-002 LIMT1 SS7HC IS-
1209 128-001-000 HIPR HIPR IS-
Command Completed.
;

> rept-stat-slk
SLK LSN CLLI
1205,A lsa1 -----------
Command Completed.
 
So basically you need to take the output from the second command and filter out those cards in the output from the first command?

If so, probably the easiest way to do that is to use the snapshot command to save the contents of the screen to a text file, open that file, and search for the "SLK LSN CLLI" using the strfind command. Once you have found that, you go line by line until the "Command Completed." line. For each line during that loop, you could use the strextract command, using a comma as the data delimiter, to grab the card (1205 your example) and then save that value away. You could use an array, another text file, append to a string, etc. whatever works best for you.

You would then run the first command and use a similar process to get the numbers of the various cards into a method you can work with to compare the two lists of cards. I think it might be easiest to read the first card from the second command, then go through the output from the first command, find that line, and delete it from the text file. I have a script or two on the samples page of my site that shows how to remove data from a text file that should get you started here (it's a bit tricky). When you are done going through the list of cards from the second command, you would close the text file from the first command, which would save your changes and end up with a processed list.

 
THX much knob - AGAIN! you have pointed me in the right direction.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top