

SCRIPT:	DACSUTIL.WAS
AUTHOR:	HANK CAMPBELL
DATED:	10-16-03

SYSTEM:	PROCOMM PLUS 4.8
        PROCOMM 32
        
WIN OS:	WINDOWS 2000 PRO SP4
	WINDOWS 98 SE
	WINDOWS NT


******************* SETUP **********************

Create a Folder on the C: Drive Named FILES:

C:\FILES

Copy the SystemID.txt and SystemCmd.txt to that
Folder.

Copy the DACSUTIL.was to your Procomm Plus
Directory where you Run your Scripts.

Compile and Run the Script.

***********************************************

(1). PREFACE:

The Dacsutil.was Script was created to overcome some flaws in the Procomm Plus
Clipboard Utility. I say flaws because Clipboard did not accomplish what I 
thought it should do. Maybe I was using it incorrectly; but never the less, 
I decided to write a Script that performed as I needed it to.


(2) PURPOSE:

This Script is used to perform DACS Conversions in a Telco Central Office. 
The System will require Verification of the Existing Crosspoints and then
the Disconnect of the Old Configuration and then the Connect of the New 
Configuration. Typing in these Commands is Time Consuming and Repetitive,
Also, any Mistakes made, require re-typing the Command.


(3) DESIGN:

The way I designed this Utility was really simple. I created two Text Files.
The First Text File, named SystemID.txt, contain a List of the System Names
that I needed to Change. The Second File named, SystemCmd.txt,contains the 
System ID and the Crosspoints for each System.

The Dialog Box that I Created contains a FlistBox, that Displays the SystemID 
File. There are several controls that I used for performing various tasks. 
Some these include, Verification, Cutover, Rollback, Forced Override and Trunk
Conditioning.


(4) CREATING THE SYSTEMID AND SYSTEMCMD FILES:

Creating these two Files is important for this Utility towork properly ! 
Each entry in the SystemID File references an entry in the SystemCmd.txt 
File !

Here is an Example of a Single System as it would appear in the SystemID File.

[100][BST]


Here is an Example of the Single System as it would appear in the SystemCmd File.


[100][BST]
D 010277 020267
C 020267 321405


NOTE:

The System ID must MATCH EXACTLY in Each File. Any variation in the System ID 
name in either File will cause the System to  be skipped when the Script is 
Executed. I chose to Enclose the System ID in Brackets. The First Set indicates
a System Number and the Second, a System Name. This made it easier for me to
know what I was working on; but can be changed to meet the needs of others, 
as long as they understand how the Code was  written. The Brackets are used 
as a Start and End Point in the String Search Commands.

The D field indicates the Crosspoints to be Disconnected.
The C field indicates the Crosspoints to be Connected.

If a Rollback is requested, the C fields are used as the Disconnect and the 
D fields are then used as the Connect fields.


(5) USING THE UTILITY:

When the Script is Launched and the Dialog Box appears, the FlistBox will display
the Systems from the SystemID.txt File. The user can choose one or more Systems 
using the following Methods.


Selection Types:

** Single: **

Simply Click the Mouse on the System from the List.


** Multiple Continuous: **

Simply Click on the First System and Drag the Mouse down until you reach the Last
Selection of your choice.


** Multiple Random: **

Click on the First System of your Choice. Hold down the CONTROL KEY and Click 
the Mouse on your Next Choice. Continue this Method unit you completed all your 
Selections.


VERIFICATION MODE:

Once the Selections have been made in the FlistBox, the user presses the Verify 
Select Button. This action Enables the Verify Execute Button. Pressing the Verify 
Execute Button causes the Script to Transmit the Messages that Pertain to the 
Systems selected. Once this is done, the User would then Press the Reset Button 
to Clear the Selections made in the previous action. Also the Reset Button can 
be used at any time to cancel and mistakes make prior to the Execution Sequence.


CUTOVER MODE:

In this Mode, the User selects the System(s), as described in the Selection Types. 
Next the User would Click on the Cutover Mode Box. Now select he/she would select 
the Trunk Conditioning Bits that pertain to the Circuit. To Override the System 
in a Forced Mode, the User would Click on the Red Line Override Box. Once all 
Selections are made, Pressing the Confirm Button, Locks the Selections and then
to Perform the Action, the Execute Button is Pressed. As before, Pressing the 
Reset Button will Cancel all sections Prior to using the Execute Button.


ROLLBACK MODE:

The Rollback Mode can be used to Reverse the Actions of the Cutover Mode. The 
Sequences are the Same as the Cutover Mode.


---------------------------------------------------------------------

**** CODE INFO: ****


LICENCE:

This Procedure is used as a Basic Timer. It relys on the PC's RegionalOptions Date 
being set to M/d/yyyy. If this is TRUE, then the Script willonly work from 
10-16-2003 until 12-30-2003. If the Program is accessed before or after these Dates,
a WINDOWS FAULT will Appear. You realize this is just a Confusion Factor for the User.
This is a Simple Method for those who wish the End User to use the Script for a 
Limited Time. An INI File would certainly work better.. But that's another story !


TERMSETUP:

I used this Procedure instead of a Connection Directory due to the Fact that we were
Connecting to a Working Control System that had some real flaky characteristics. I 
left this code in here for the sake of demonstration.

FILECHECK:

This Procedure was created to Force Users to use the File Name Constraints.
On your System, you may wish to change the Path's and File Names.


FILESETUP:

This is used to Capture Screen Displays if the Start Logging Button is Used. The Data 
is Captured using a TimeStamp.


THE WHILE LOOPS:

When the Verify Execute or Execute Buttons are Pressed, all the Selections in the 
FlistBox are copied to the sFLBS File. This File is deleted whenthe Script starts,
so that there are no Selections. Also this File is Deleted each time the Reset Button
is Pressed.

During these Loops, the First Pass takes the First Entry in the sFLBS File. It is 
Compared to each Entry in the SystemCmd File. If a Match is found, a Loop Starts 
that gathers the D and C Lines for the Output Messages. When all Matches are found,
the SystemCmd File is Rewound to the Start of the File.  The Second Entry is obtained
and the search begins again.

BUTTONS DISABLED:

You'll note that the Execute Buttons are Disabled until all Selections are made and
until the Verify Select or Confirm Buttons are Pressed. This Feature ensures that the
User has entered all the Information Needed,for the Requested action.


The Rest of the Code is Pretty Straight Forward. Using this Method was very interesting
to me, and I hope Aspect Script Writers can use some of this for their Scripts.

---------------------------------------------------------------------------------

USAGE:

Change the TERMWRITES [Strings] to Transmits [Strings] 
and 
the Termwrites "`n`r" to Pause 3.

---------------------------------------------------------------------------------

Later,

Hank Campbell

