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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scipt needed to remove multiple ANIs from NorTel DMS-500 ANISCUSP

Status
Not open for further replies.

WireDawg007

Technical User
Nov 22, 2004
1
US
I am trying to remove MANY erroneous ANIs from Table ANISCUSP in several DMS-500 switches. Each switch would have different arguments as to which ANIs are valid. For example, one switch may need to have all ANIs deleted that do not have an NPA of 205 or 256. I do not know how to have ProComm/ASPECT respond to the switches response to a LIST command, nor do I know how to "wildcard" the argument in ASPECT.

Below is an example of switch entry and response.

>TABLE ANISCUSP;FORMAT PACK;VER OFF
TABLE: ANISCUSP
<line length>: 76 columns can be output per line.
<pack mode>: Pack mode is ON.
<indent column>: Indented lines will begin in column 1.
<first column>: The first column of output is column 1.
VERIFY OFF
>LIST
TOP
KEY ANITYPE REFAREA
-------------------
2002311111 SUB AL 0 N 3_1KHZ 54 2 N 0 0 $ 46 ALWAYS (OPCHOICE 1) $
>DEL
TUPLE TO BE DELETED:
2002311111 SUB AL 0 N 3_1KHZ 54 2 N 0 0 $ 46 ALWAYS (OPCHOICE 1) $
TUPLE DELETED
WRITTEN TO JOURNAL FILE AS JF NUMBER 7250
>LIST
TOP
KEY ANITYPE REFAREA
-------------------
2013332810 SUB AL 0 N 3_1KHZ 54 2 N 0 0 $ 46 ALWAYS (OPCHOICE 1) $
>DEL
TUPLE TO BE DELETED:
2013332810 SUB AL 0 N 3_1KHZ 54 2 N 0 0 $ 46 ALWAYS (OPCHOICE 1) $
TUPLE DELETED
WRITTEN TO JOURNAL FILE AS JF NUMBER 7255
>LIST
TOP
KEY ANITYPE REFAREA
-------------------
2014336527 SUB AL 0 N 3_1KHZ 54 2 N 0 0 $ 46 ALWAYS (OPCHOICE 1) $
>

What I would like to accomplish is if the 10-digit ANI does not begin with 205 or 256 then issue the command DEL followed by LIST. If the ANI does begin with 205 or 256 then issue the command DOW and continue analyzing the ANI until the switch responds with BOTTOM.

Any help is greatly appreciated.
 
Probably the easiest way to do this is to use when target to key off the ------------------- string that appears to precede each record you are looking at. When target can then call a procedure which uses the rget command (or may need two calls depending on your environment) to get the next string of data from the port. This will cause it to not appear on screen, but I don't think this should cause any problems for your application. Once you have that string, you can use the strncmp command to compare the first three characters against 205 and 256. You'll need to use a nested if/else structure to do this, with the added side benefit that if both strncmp commands return a non-zero value, then the strings do not start with 205 or 256, meaning you can issue the DOW command and continue looking through the records.


aspect@aspectscripting.com
 
WireDawg007,

I've done similar things in the DMS before. Did you find your solution yet?

What I usually do in this type of situation is to have a script the generates the source list (in this case anicusp), and capture it to a file. Once the bottom of the table is reached, open the file, and compare the first 3 characters to your NPA's (which you can enter with a dialog box). If your ANICUSP key is one to be deleted, store it to an array. Once you've analyzed each tuple for ANICUSP, post the array, one tuple at a time, and delete them.

I could probably put something together for you if you still need it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top