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

Firebird Script Help http://www.tek-tips.com/faqs.cfm?fid=7254

Status
Not open for further replies.

AOSupport

MIS
Jan 7, 2008
81
US
Hi,

Managed to get this script working, but I'm getting stuck at the SPWD prompt. It just passed it and try's to import the codes.

Any help here would be great.

Thanks,

Frank
 
SPWD is the secure data password (4 digits) as defined in LD 15. If you don't know it, you can change it as long as you know the Level 2 password.
 
I have the password, its 0000 and i looked through the script provided by firebird and it appears to be in there, but for some reason its not getting passed it.

Can I turn SPWD off ?
 
Not a script expert, but search for 9999 and see if changing this works

txdc ("9999")

to

txdc ("0000")

[©] GHTROUT.com [⇔] Resources for Nortel Meridian/CS1000 System Administrators - You Can Hire Me Too
 
here is what was in the capture file when I run the script. thank you so much

>
AUD000
LOGI admin2
PASS?
SEC0029 SECURITY WARNING: THIS SYSTEM CONTAINS INSECURE PASSWORDS, NOTIFY YOUR S
YSTEM ADMINISTRATOR

.
TTY #00 LOGGED IN ADMIN2 12:34 15/10/2009

>****
OVL000
>
OVL000
>LD 88
AUTH000

MEM AVAIL: (U/P): 2167147 USED U P: 616836 263440 TOT: 3047423
DISK RECS AVAIL: 896
REQ NEW
TYPE AUT
CUST 0
SPWD
AUTH002

MEM AVAIL: (U/P): 2167147 USED U P: 616836 263440 TOT: 3047423
DISK RECS AVAIL: 896
REQ
AUTH001

MEM AVAIL: (U/P): 2167147 USED U P: 616836 263440 TOT: 3047423
DISK RECS AVAIL: 896
REQ 000
AUTH001

MEM AVAIL: (U/P): 2167147 USED U P: 616836 263440 TOT: 3047423
DISK RECS AVAIL: 896
REQ 0987654321
AUTH001

MEM AVAIL: (U/P): 2167147 USED U P: 616836 263440 TOT: 3047423
DISK RECS AVAIL: 896
REQ ****
OVL000
>logo
TTY #00 LOGGED OUT ADMIN2 12:36 15/10/2009
SESSION DURATION: 00:02

>
 
I'll try my script tomorrow, but have you created the file below that the script needs to see?.

; The information listed below has been taken from the "vkeys.inc" file.
; I have added in one ";" against each line for use with this file!.
; Should your copy of "vkeys.inc" be missing or damaged, then you can copy this
; section listed below with one of the ";" removed for each line!.

;;Definitions of standard virtual key code values
;;**********************************************************************
;;* VKEYS.INC
;;* Copyright (c) 1999 Symantec Corporation
;;*
;;* Definitions of standard virtual key code values. Use these macro
;;* definitions in your ASPECT script files rather than hard-coded
;;* constants to improve maintainability and readability. For more
;;* information, see the keyval and vkey conventions described in the
;;* Windows ASPECT Script Language reference manual.
;;**********************************************************************

;#ifndef _INC_VKEYS ; if file not already included
;#define _INC_VKEYS ; prevent further inclusion

;;**********************************************************************
;;* Macro definitions of standard virtual key code values
;;**********************************************************************

;#define VK_LBUTTON 0x01 ; Left mouse button
;#define VK_RBUTTON 0x02 ; Right mouse button
;#define VK_CANCEL 0x03 ; Ctrl-Break
;#define VK_MBUTTON 0x04 ; Middle mouse button
;; 0x05-0x07 ; Undefined
;#define VK_BACK 0x08 ; Backspace key
;#define VK_TAB 0x09 ; Tab key
;; 0x0A-0x0B ; Undefined
;#define VK_CLEAR 0x0C ; Clear key or Keypad 5 with Num lock off
;#define VK_RETURN 0x0D ; Enter or Return key
;; 0x0E-0x0F ; Undefined
;#define VK_SHIFT 0x10 ; Shift key
;#define VK_CONTROL 0x11 ; Control or Ctrl key
;#define VK_MENU 0x12 ; Menu or Alt key
;#define VK_PAUSE 0x13 ; Pause key
;#define VK_CAPITAL 0x14 ; Capital or Caps Lock key
;; 0x15-0x19 ; Reserved for Kanji Systems
;; 0x1A ; Undefined
;#define VK_ESCAPE 0x1B ; Esc or Escape key
;; 0x1C-0x1F ; Reserved for Kanji Systems
;#define VK_SPACE 0x20 ; Spacebar
;#define VK_PRIOR 0x21 ; Page Up key
;#define VK_NEXT 0x22 ; Page Down key
;#define VK_END 0x23 ; End key
;#define VK_HOME 0x24 ; Home key
;#define VK_LEFT 0x25 ; Left arrow key
;#define VK_UP 0x26 ; Up Arrow key
;#define VK_RIGHT 0x27 ; Right Arrow key
;#define VK_DOWN 0x28 ; Down Arrow key
;#define VK_SELECT 0x29 ; Select key
;#define VK_PRINT 0x2A ; Keyboard (OEM) specific
;#define VK_EXECUTE 0x2B ; Execute key
;#define VK_SNAPSHOT 0x2C ; Print Screen key
;#define VK_INSERT 0x2D ; Insert key
;#define VK_DELETE 0x2E ; Delete key
;#define VK_HELP 0x2F ; Help key
;#define VK_0 0x30 ; 0 key
;#define VK_1 0x31 ; 1 key
;#define VK_2 0x32 ; 2 key
;#define VK_3 0x33 ; 3 key
;#define VK_4 0x34 ; 4 key
;#define VK_5 0x35 ; 5 key
;#define VK_6 0x36 ; 6 key
;#define VK_7 0x37 ; 7 key
;#define VK_8 0x38 ; 8 key
;#define VK_9 0x39 ; 9 key
;; 0x3A-0x40 ; Undefined
;#define VK_A 0x41 ; A key
;#define VK_B 0x42 ; B key
;#define VK_C 0x43 ; C key
;#define VK_D 0x44 ; D key
;#define VK_E 0x45 ; E key
;#define VK_F 0x46 ; F key
;#define VK_G 0x47 ; G key
;#define VK_H 0x48 ; H key
;#define VK_I 0x49 ; I key
;#define VK_J 0x4A ; J key
;#define VK_K 0x4B ; K key
;#define VK_L 0x4C ; L key
;#define VK_M 0x4D ; M key
;#define VK_N 0x4E ; N key
;#define VK_O 0x4F ; O key
;#define VK_P 0x50 ; P key
;#define VK_Q 0x51 ; Q key
;#define VK_R 0x52 ; R key
;#define VK_S 0x53 ; S key
;#define VK_T 0x54 ; T key
;#define VK_U 0x55 ; U key
;#define VK_V 0x56 ; V key
;#define VK_W 0x57 ; W key
;#define VK_X 0x58 ; X key
;#define VK_Y 0x59 ; Y key
;#define VK_Z 0x5A ; Z key
;#define VK_WINDOWSL 0x5B ; Windows key (left)
;#define VK_WINDOWSR 0x5C ; Windows key (right)
;#define VK_APPLICATION 0x5D ; Application key
;; 0x5E-0x5F ; Undefined
;#define VK_NUMPAD0 0x60 ; Numeric Keypad 0
;#define VK_NUMPAD1 0x61 ; Numeric Keypad 1
;#define VK_NUMPAD2 0x62 ; Numeric Keypad 2
;#define VK_NUMPAD3 0x63 ; Numeric Keypad 3
;#define VK_NUMPAD4 0x64 ; Numeric Keypad 4
;#define VK_NUMPAD5 0x65 ; Numeric Keypad 5
;#define VK_NUMPAD6 0x66 ; Numeric Keypad 6
;#define VK_NUMPAD7 0x67 ; Numeric Keypad 7
;#define VK_NUMPAD8 0x68 ; Numeric Keypad 8
;#define VK_NUMPAD9 0x69 ; Numeric Keypad 9
;#define VK_MULTIPLY 0x6A ; Multiply key
;#define VK_ADD 0x6B ; Add key
;#define VK_SEPARATOR 0x6C ; Separator key
;#define VK_SUBTRACT 0x6D ; Subtract key
;#define VK_DECIMAL 0x6E ; Decimal key
;#define VK_DIVIDE 0x6F ; Divide key
;#define VK_F1 0x70 ; Function key F1
;#define VK_F2 0x71 ; Function key F2
;#define VK_F3 0x72 ; Function key F3
;#define VK_F4 0x73 ; Function key F4
;#define VK_F5 0x74 ; Function key F5
;#define VK_F6 0x75 ; Function key F6
;#define VK_F7 0x76 ; Function key F7
;#define VK_F8 0x77 ; Function key F8
;#define VK_F9 0x78 ; Function key F9
;#define VK_F10 0x79 ; Function key F10
;#define VK_F11 0x7A ; Function key F11
;#define VK_F12 0x7B ; Function key F12
;#define VK_F13 0x7C ; Function key F13
;#define VK_F14 0x7D ; Function key F14
;#define VK_F15 0x7E ; Function key F15
;#define VK_F16 0x7F ; Function key F16
;#define VK_F17 0x80 ; Function key F17
;#define VK_F18 0x81 ; Function key F18
;#define VK_F19 0x82 ; Function key F19
;#define VK_F20 0x83 ; Function key F20
;#define VK_F21 0x84 ; Function key F21
;#define VK_F22 0x85 ; Function key F22
;#define VK_F23 0x86 ; Function key F23
;#define VK_F24 0x87 ; Function key F24
;; 0x88-0x8F ; Unassigned
;#define VK_NUMLOCK 0x90 ; Num Lock key
;#define VK_OEM_SCROLL 0x91 ; Scroll Lock key
;; 0x92-0xB9 ; Unassigned
;; 0xBA-0xC0 ; Keyboard (OEM) specific
;; 0xC1-0xDA ; Unassigned
;; 0xDB-0xE4 ; Keyboard (OEM) specific
;; 0xE5 ; Unassigned
;; 0xE6 ; Keyboard (OEM) specific
;; 0xE7-0xE8 ; Unassigned
;; 0xE9-0xF5 ; Keyboard (OEM) specific
;; 0xF6-0xFE ; Unassigned

;;**********************************************************************
;;* Useful macros for testing and forming key values from keyboard
;;* shift states and virtual key code values.
;;**********************************************************************

;#define KV_SHIFT 0x01 ; Shift key pressed
;#define KV_CTRL 0x02 ; Ctrl key pressed
;#define KV_ALT 0x04 ; Alt key pressed
;#define KV_EXT 0x08 ; Extended key flag
;#define KV_CAPSLOCK 0x10 ; Caps Lock key toggled on

;#define MAKE_KV(skeys,vkey) (((skeys) << 8) | (vkey))

;#define KV_VKEY(keyval) ((keyval) & 0xFF)
;#define KV_SKEYS(keyval) ((keyval) >> 8)

;#define KV_SHIFTKEY(keyval) (KV_SKEYS(keyval) & KV_SHIFT)
;#define KV_CTRLKEY(keyval) (KV_SKEYS(keyval) & KV_CTRL)
;#define KV_ALTKEY(keyval) (KV_SKEYS(keyval) & KV_ALT)
;#define KV_EXTKEY(keyval) (KV_SKEYS(keyval) & KV_EXT)

;#endif ; _INC_VKEYS


All the best

Firebird Scrambler
Meridian Programmer in the UK

If it's working, then leave it alone!.
 
AUTH 002 is telling you that the password you are using is incorrect.
 
What software version are you using please?.

I've looked at the script again and you might need to increase the transmit pace in the drop down box. Also the pause time might need to be changed as shown below.

Proc SPWD_0000
pause 6 ; change to a lower or higher number
txdc ("0000")
PAUSE 6
WAITFOR "CODE " 2
txdc ("")
endproc

The error message of AUTH002 would indicate that either 0000 is the wrong password (or whatever it's set as) or the passcode is being entered at a speed that is too great for the system?.

All the best

Firebird Scrambler
Meridian Programmer in the UK

If it's working, then leave it alone!.
 
Firebird, I just tried that and I'm gettin the same results. Is it possibe for you to look at this sometime today. I have a project that needs to get done by this weekend and your script is the only thing that might save it.

Thanks again
 
Have you tried to enter a code manually or just print the AUB to verify your password of 0000 is correct?
 
Just tried adjusting the pause to 8 and pace I change to 200 and 300. Same results.

Thanks,
 
here you go, I acutally some how got it wait for SPWD and I can enter the 0000 there and it seems to work. The only issue I have now is that is takes long time to import the codes. I Imported 6 codes and it took about 3 minutes. I have unload about 3000 over the weekend. That's going to take forever. Is there anything is the script that can be modified to speed it up.

Thanks so much

; Enter Change or Out AUB AUT in LD 88 20th June 2006

; NOTE!
; This program will only work with a WINDOWS version of Procomm Plus.
; The " ; " denotes that the data on the program file line is ignored,
; when the script is run.

; The program is designed to make changes to a customers Auth codes by adding, deleting
; AUB's AUT's & SAR's etc in LD 88. The source data must be in a Excel "CSV" format
; & also in the column order as follows..

; AUB , CLAS , DSP , RLI e.g.

; 6000,4,LSC,22,
; 6001,4,DN,22,
; 6002,4,LSC,22,
; 6003,4,LSC,22, (etc)

; AUT = CODE , CLAS Number , e.g.

; 6000,001,
; 6001,002,
; 6002,002,
; 6003,004, (etc)

; SAR = SGRP , OFFP , STAR , STOP , DAYS , COS , TGAR , NCOS , ICR , LOCK e.g.

; 0,1,00 01,10 00,1 2 3 4,TLD,1,4,YES,1
; 1,2,00 10,11 00,1 2 3 4 5 6 7,UNR,0,7,YES,1
; 2,4,01 00,12 00,2 3 4 5,TLD,1,6,YES,1
; 3,5,02 01,21 00,1 2 3 4 5 6,TLD,1,6,YES,1 (etc)

; This program file should remain unaltered & only copies made from it for whatever
; use is required. P.S. I suggest that you make it a "READ ONLY" file. & store it on
; your P.C's HARD DRIVE.
; There will be a % counter running in a separate box on the right hand side
; showing the progress of the script with number of changes left to do.

; If your source file (example below) has lines of data of this length or more, then the script will FAIL with a
; message of Error 1: Value out of range
; Please reduce the data for that line. e.g. a line of data that is too long is..
;1140,066 0 00 25,1140,0,74210,1,6,1421,10,1111,FBA CRPA HFA CNIA DNDA PUA VOLA VOUA CFXA ICRA,2,7000,74210,74210,0,0,SCR 4213 0,SCN 4212 0,SCN 4216 0,SCN 4218 0,SCN 4219 0,SCN 4222,ADL 8 4230,ADL 8 4019,ADL 8 5302,SCN 4211 0,SCN 4791 0,ADL 8, ,CFW 6,RNP,SSU 10 (262 CHARACTERS!)

; Trim the data down to e.g.
;1140,066 0 00 25,1140,0,74210,1,6,1421,10,1111,FBA CRPA HFA CNIA DNDA PUA VOLA VOUA CFXA ICRA,2,7000,74210,74210,0,0,SCR 4213 0,SCN 4212 0,SCN 4216 0,SCN 4218 0,SCN 4219 0,SCN 4222,ADL 8 4230,ADL 8 4019,ADL 8 5302,SCN 4211,SCN 4791,ADL 8, ,CFW 6,RNP,SSU 10

#include "vkeys.inc" ; You must have this file "vkeys.inc"
; located within the "Aspect" folder!

string s_opdata[10]
STRING F_Time
integer i_mdm_clrdwn

proc main
integer i_ch
integer i_evt
integer i_fch_tx_val
integer i_tx_val
integer i_p
integer i_tmp

long l_tot_no_lin
long l_lin_cnt
long l_prog_bar_op
long l_fi_sz0
long l_cur_fi_sz0

string s_fi_nm
string s_tx_list = "0,5,10,15,20,25,50,80,100,120,180,200,300,400,500,600,700"
string s_tx_item = "120"
string s_dir
string s_pwd
string s_userid
string s_time_start
string s_date_start
string s_progress
string s_prog_bar
string s_sce_lin
string s_fi_ext_item = "*.CSV"
string s_type_list = "NEW,CHG,OUT"
string s_type_item = "NEW"
string s_type_cdplst = "AUT,AUB,SAR"
string s_type_cdp = "AUT"
string s_type_REQ = "REQ"
string s_list_customer = "0"
string s_customer_item = "0"

dialogbox 0 13 17 476 350 11 " Nortel Procomm script file to enter, change or remove a AUT / AUB and SAR in LD 88. V01.3 20th June 2006"
groupbox 52 3 2 146 105 " LD 88 main Auth codes details to input"
groupbox 57 9 12 132 52 " Enter in the required parameters"

text 53 20 25 72 11 "New / Change or Out" center
combobox 82 95 23 40 80 DROPDOWNLIST s_type_list s_type_item SORT
text 42 20 49 72 11 "AUT / AUB or SAR" center
combobox 30 95 47 40 80 DROPDOWNLIST s_type_cdplst s_type_cdp

groupbox 41 7 71 136 30 " Enter the Customer number"
combobox 10 109 81 26 250 DROPDOWNLIST s_list_customer s_customer_item
text 16 21 83 84 11 "Select between 0 and 87" left

dirlistbox 12 10 135 134 88 "*.csv" SINGLE s_fi_nm 21 SORT ; Source file drop down box
editbox 23 386 19 73 11 s_userid 11
editbox 13 386 35 74 11 s_pwd 16 MASKED
editbox 37 417 92 38 11 s_date_start 8
editbox 38 417 130 38 11 s_time_start 8
combobox 24 423 163 30 170 DROPDOWNLIST s_tx_list s_tx_item

dirpath 21 10 123 134 11 s_dir ; Location path of where the source file is located

checkbox 40 340 280 130 11 "Modem cleardown on completion" i_mdm_clrdwn

groupbox 69 164 270 160 60 " What this script will do after changes are made!"
text 70 169 285 146 11 "LD 88 data is printed After completion" center
text 71 169 295 146 11 "LD 32 is accessed to cancel any alarms" center
text 72 169 305 146 11 "LD 43 is accessed and a EDD is done" center
text 73 169 315 146 11 "This script will then logoff and exit the system " center

groupbox 74 330 270 140 60 " Tick Modem cleardown if it's needed!"
pushbutton 14 415 300 40 13 "Accept"
pushbutton 15 340 300 40 13 "Cancel"

groupbox 58 164 152 110 34 " Useful info to check first"
text 59 169 162 100 11 "Script should work for" center
text 61 169 172 100 11 "most systems!" center

groupbox 46 280 152 188 34 " Select the systems Transmit Pacing"
text 25 285 165 135 11 "Use a higher number on older software!." left

groupbox 49 164 3 302 48 " Enter the systems Login Name and Password in the box's below to run the script file"

text 22 190 20 190 11 "Name or User ID. (No Name = any character key pressed!)" left
text 47 217 37 166 11 "Switch Password is Case Sensitive for V4.5 onwards" left

groupbox 50 164 60 304 86 " Date and Start time functions"
text 36 169 72 294 11 "If you want the program to Date start, then enter the Date as e.g. 23/12/05 in the box below" center
text 31 169 92 248 11 "Pressing the (Space Bar) = Auto Start, or enter the required Date for it to run" left
text 32 418 82 34 9 "Dy/Mh/Yr" center
text 29 169 110 294 11 "If you want the program to Time start, then enter the time in 24Hr format in the box below" center
text 34 169 130 248 11 "Pressing the (Space Bar) = Auto Start, or enter the start Time = e.g. 16:20:00 " left
text 39 419 120 34 9 "Hr:Mn:Sc" center

groupbox 51 5 110 145 230 " Source file MUST be in a *.CSV format!"
text 54 8 215 138 11 " AUB and AUT examples. Use on V19+" center

text 43 8 225 136 11 "AUB = CLAS , COS , TGAR , NCOS e.g." center
text 44 8 235 136 11 "004,TLD,1,07," center
text 45 8 245 136 11 "001,UNR,2,01," center

text 48 8 260 136 11 "AUT = CODE , CLAS number , e.g." center
text 60 8 270 136 11 "6003,004," center
text 63 8 280 136 11 "6006,004, (etc)" center

text 64 8 295 138 11 "SAR = SGRP,OFFP,STAR,STOP,DAYS," center
text 65 8 305 138 11 "and also COS,TGAR,NCOS,ICR,LOCK, e.g." center
text 67 8 315 138 11 "0,1,00 01,23 00,2 3 4 5 6,TLD,1,7,NO,1" center
text 68 8 325 138 11 "1,2,00 10,11 00,1 7,UNR,0,7,YES,1 (etc)" center

groupbox 56 164 188 304 78 " Read this section FIRST! if you intend to use the delayed start function"
text 55 168 198 290 16 " If you are planning to use the delayed start time / date function, then follow the instruction listed below " left
text 35 167 216 290 26 " Please remember to check your capture file settings under the following headings's (Options, Data Options, Setup Files, Capture File Options, Control Options) to UNCHECK the box marked (Query for file name when capture is started)!. " left
text 33 168 245 288 16 " Click (OK) & (OK) again before starting this script program. This will make the script capture the information if the delayed Date / Time start function is used!. " left
enddialog

while 1
dlgevent 0 i_evt
switch i_evt
case 0
if nullstr s_date_start
disable dlgctrl 0 14
elseif nullstr s_time_start
disable dlgctrl 0 14
elseif nullstr s_userid
disable dlgctrl 0 14
elseif nullstr s_pwd
disable dlgctrl 0 14
elseif nullstr s_fi_nm
disable dlgctrl 0 14
else
enable dlgctrl 0 14
endif
endcase
case 13
strlen s_pwd i_tmp
if i_tmp < 4
usermsg "Password `"%s`"`n`nThis must be between 4-16 characters in length & it is case sEnsTivE on V04.50 onwards!" s_pwd
sendvkey MAKE_KV(KV_SHIFT,VK_TAB)
endif
endcase
case 14
exitwhile
endcase
case 15
exitwhile
endcase
case 23
strlen s_userid i_tmp
if i_tmp < 1
usermsg "Name or UserID `"%s`"`n`nName can be up to 11 Characters. Otherwise enter a dummy name or press the Space Bar to accept the entry" s_userid
sendvkey MAKE_KV(KV_SHIFT,VK_TAB)
endif
endcase
case 28
exitwhile
endcase
case 29
exitwhile
endcase
case 30
dlgupdate 0 24
endcase
case 37
strlen s_date_start i_tmp
if i_tmp < 1
usermsg "Start Date `"%s`"`n`nmust be 6 Numbers in length and with a (/) in between every 2 digits. or you can just press the Space Bar to leave the box blank to Auto Start the Listing program" s_date_start
sendvkey MAKE_KV(KV_SHIFT,VK_TAB)
endif
endcase
case 38
strlen s_time_start i_tmp
if i_tmp < 1
usermsg "Start Time `"%s`"`n`nmust be 6 Numbers in length and with a :)) in between every 2 digits. or you can just press the Space Bar to leave the box blank to Auto Start the Listing program" s_time_start
sendvkey MAKE_KV(KV_SHIFT,VK_TAB)
endif
endcase
endswitch
endwhile

dlgdestroy 0 cancel

if i_evt != 14
exit
endif

if not fopen 0 s_fi_nm read
errormsg "Couldn't open file `"%s`"." s_fi_nm
else

STATMSG "Waiting for the AUB / AUT or SAR auto start date/time program to run. Make sure that auto capture is set correctly!"

cnt_no_fi_lines(i_ch,&l_tot_no_lin,&l_fi_sz0)

fetch txpace i_fch_tx_val
atoi s_tx_item i_tx_val
strcat s_tx_item " ms"
set txpace i_tx_val

datetimestart(s_time_start,s_date_start)
logi(s_userid)
login(s_pwd)

STATMSG "The AUB / AUT or SAR auto start date/time program has now started!"

if strcmp s_type_cdp "OUT"
txdc ("LD 88")
waitfor "REQ "
txdc ("OUT")
waitfor "TYPE "
txdc (s_type_cdp)
waitfor "CUST "
txdc (s_customer_item)
else
ld_ovl_88(s_type_item,s_type_cdp,s_customer_item)
endif

dialogbox 1 350 52 280 65 14 " New Change or Out of AUT / AUB or SAR Progress Status Bar"
text 1 8 16 65 11 s_progress left
editbox 2 8 32 210 11 s_prog_bar
text 3 8 45 270 11 s_fi_nm left
text 4 220 5 55 11 "Transmit Pace" left
text 6 90 16 140 11 s_sce_lin left
text 5 230 16 35 11 s_tx_item left
text 7 90 5 70 11 "Source file Info" left
text 8 8 5 60 11 "Source file line No" left
enddialog

l_prog_bar_op = l_fi_sz0/40

while not feof 0
fgetc 0 i_ch
if not feof 0
ftell 0 l_cur_fi_sz0
if l_cur_fi_sz0 % l_prog_bar_op == 0
strcat s_prog_bar "#"
dlgupdate 1 2
endif
if i_ch == '`r'
loopwhile
endif
if i_ch == '`n'
l_lin_cnt++
strputc s_sce_lin i_p 0
if not nullstr s_sce_lin

get_opdata(s_sce_lin)

strfmt s_progress "Line %ld of %ld" l_lin_cnt l_tot_no_lin
dlgupdate 1 1
dlgupdate 1 6
s_sce_lin = ""
i_p = 0

if strcmp s_type_item "OUT"
out_cdp(s_type_cdp,s_customer_item)
else
if strcmp s_type_cdp "AUT"
send_opdata_aut(s_type_item)
elseif strcmp s_type_cdp "AUB"
send_opdata_aub(s_type_item,s_type_cdp,s_customer_item)
elseif strcmp s_type_cdp "SAR"
send_opdata_sar(s_type_item,s_type_cdp,s_customer_item)
endif
endif

loopwhile
endif
endif
strputc s_sce_lin i_p i_ch
i_p++
endif
endwhile

ex_ovl_88(s_type_cdp,s_customer_item) ;()

set txpace i_fch_tx_val
fclose 0

endif

dlgdestroy 1 cancel

endproc

proc get_opdata ;#####

param string s_sce_lin

Capture On

WHEN TARGET 1 "TEN " CALL TEN
WHEN TARGET 2 "OVL111 " CALL OVL111
WHEN TARGET 3 "AUTO " CALL AUTO_NO
WHEN TARGET 4 "OVL013 " CALL OVL013
WHEN TARGET 5 "AUTHCOD_ALRM " CALL AUTHCOD_ALRM
WHEN TARGET 6 "ACLE " CALL CARR_RETURN
WHEN TARGET 7 "BRST " CALL CARR_RETURN
WHEN TARGET 8 "RTRY " CALL CARR_RETURN
WHEN TARGET 9 "ALEN " CALL ALEN
WHEN TARGET 10 "ACDR " CALL ACDR
WHEN TARGET 11 "RANR " CALL RANR

WHEN TARGET 12 "ESN006 " CALL ESN006
WHEN TARGET 13 "ESN009 " CALL ESN009
WHEN TARGET 14 "ESN014 " CALL ESN014
WHEN TARGET 15 "ESN017 " CALL ESN017
WHEN TARGET 16 "ESN019 " CALL ESN019
WHEN TARGET 17 "ESN022 " CALL ESN022
WHEN TARGET 18 "ESN026 " CALL ESN026
WHEN TARGET 19 "ESN028 " CALL ESN028
WHEN TARGET 20 "ESN029 " CALL ESN029
WHEN TARGET 21 "ESN030 " CALL ESN030
WHEN TARGET 22 "ESN048 " CALL ESN048
WHEN TARGET 23 "ESN062 " CALL ESN062
WHEN TARGET 24 "ESN073 " CALL ESN073
WHEN TARGET 25 "ESN115 " CALL ESN115
WHEN TARGET 26 "ESN125 " CALL ESN125
WHEN TARGET 27 "ESN127 " CALL ESN127
WHEN TARGET 28 "ESN128 " CALL ESN128
WHEN TARGET 29 "ESN131 " CALL ESN131
WHEN TARGET 30 "ESN134 " CALL ESN125
WHEN TARGET 31 "ESN136 " CALL ESN136
WHEN TARGET 32 "ESN139 " CALL ESN139
WHEN TARGET 33 "ESN158 " CALL ESN158
WHEN TARGET 34 "ESN188 " CALL ESN188
WHEN TARGET 35 "SCH1328 " CALL SCH1328
WHEN TARGET 36 "SCH8796 " CALL SCH8796
WHEN TARGET 37 "SPWD " CALL SPWD_0000
WHEN TARGET 38 "AUTH001 " CALL AUTH001
WHEN TARGET 39 "AUTH002 " CALL SPWD_0000
WHEN TARGET 41 "AUTH005 " CALL AUTH005
WHEN TARGET 42 "AUTH006 " CALL AUTH006
WHEN TARGET 43 "AUTH007 " CALL AUTH007
WHEN TARGET 44 "AUTH008 " CALL AUTH008
WHEN TARGET 45 "AUTH009 " CALL AUTH009

strtok s_opdata[0] s_sce_lin "," ;CODE for AUT & CLAS for AUB & SGRP for a SAR
strtok s_opdata[1] s_sce_lin "," ;CLAS for AUT & COS for AUB & OFFP for a SAR
strtok s_opdata[2] s_sce_lin "," ;TGAR for a AUB & STAR for a SAR
strtok s_opdata[3] s_sce_lin "," ;NCOS for a AUB & STOP for a SAR
strtok s_opdata[4] s_sce_lin "," ;DAYS for a SAR ( 1 2 3 4 5 6 7)
strtok s_opdata[5] s_sce_lin "," ;COS for a SAR
strtok s_opdata[6] s_sce_lin "," ;TGAR for a SAR
strtok s_opdata[7] s_sce_lin "," ;NCOS for a SAR (00 to 99)
strtok s_opdata[8] s_sce_lin "," ;ICR for a SAR (YES or NO)
strtok s_opdata[9] s_sce_lin "," ;LOCK for a SAR (1 to 8)

endproc

proc send_opdata_aut ;#####

param string s_type_item

if strcmp s_type_item "NEW"

waitfor "SPWD "
txdc (s_opdata[0])
waitfor "SARC "
txdc ("")
waitfor "CLAS "
txdc (s_opdata[1])
waitfor "CODE "

else ; "CHG"
txdc (s_opdata[0])
waitfor "SARC "
txdc ("")
waitfor "CLAS "
txdc (s_opdata[1])
waitfor "CODE "

endif

endproc

proc send_opdata_aub ;#####
param string s_type_item
param string s_type_cdp
param string s_customer_item

if strcmp s_type_item "NEW"

; waitfor "ALEN "
; txdc ("4") ; Change to the digit length required!.
; waitfor "ACDR "
; txdc ("YES")
; waitfor "RANR "
; txdc ("X")
waitfor "CLAS "
txdc (s_opdata[0])
waitfor "COS "
txdc (s_opdata[1])
waitfor "TGAR "
txdc (s_opdata[2])
waitfor "NCOS "
txdc (s_opdata[3])
waitfor "CLAS "
txdc ("")
waitfor "REQ "
txdc ("CHG")
waitfor "TYPE "
txdc (s_type_cdp)
waitfor "CUST "
txdc (s_customer_item)
; waitfor "ACDR "
; txdc ("YES")
; waitfor "RANR "
; txdc ("X")
; waitfor "CLAS "

else ; "CHG"
; waitfor "ACDR "
; txdc ("YES")
; waitfor "RANR "
; txdc ("X")
waitfor "CLAS "
txdc (s_opdata[0])
waitfor "COS "
txdc (s_opdata[1])
waitfor "TGAR "
txdc (s_opdata[2])
waitfor "NCOS "
txdc (s_opdata[3])
waitfor "CLAS "
txdc ("")
waitfor "REQ "
txdc ("CHG")
waitfor "TYPE "
txdc (s_type_cdp)
waitfor "CUST "
txdc (s_customer_item)
; waitfor "ACDR "
; txdc ("YES")
; waitfor "RANR "
; txdc ("X")
; waitfor "CLAS "

endif

endproc

proc send_opdata_sar ;#####
param string s_type_item
param string s_type_cdp
param string s_customer_item

if strcmp s_type_item "NEW"

txdc (s_opdata[0])
waitfor "SCDR "
txdc ("YES")
waitfor "OFFP "
txdc (s_opdata[1])
waitfor "STAR "
txdc (s_opdata[2])
waitfor "STOP "
txdc (s_opdata[3])
waitfor "DAYS "
txdc (s_opdata[4])
waitfor "COS "
txdc (s_opdata[5])
waitfor "TGAR "
txdc (s_opdata[6])
waitfor "NCOS "
txdc (s_opdata[7])
waitfor "OFFP "
txdc ("")
waitfor "ICR "
txdc (s_opdata[8])
waitfor "LOCK "
txdc (s_opdata[9])
waitfor "REQ "
txdc (s_type_item)
waitfor "TYPE "
txdc (s_type_cdp)
waitfor "CUST "
txdc (s_customer_item)
waitfor "SGRP "

else ; "CHG"
txdc (s_opdata[0])
waitfor "SCDR "
txdc ("YES")
waitfor "OFFP "
txdc (s_opdata[1])
waitfor "STAR "
txdc (s_opdata[2])
waitfor "STOP "
txdc (s_opdata[3])
waitfor "DAYS "
txdc (s_opdata[4])
waitfor "COS "
txdc (s_opdata[5])
waitfor "TGAR "
txdc (s_opdata[6])
waitfor "NCOS "
txdc (s_opdata[7])
waitfor "OFFP "
txdc ("")
waitfor "ICR "
txdc (s_opdata[8])
waitfor "LOCK "
txdc (s_opdata[9])
waitfor "REQ "
txdc (s_type_item)
waitfor "TYPE "
txdc (s_type_cdp)
waitfor "CUST "
txdc (s_customer_item)
waitfor "SGRP "

endif

endproc

proc cnt_no_fi_lines ;#####

param integer i_ch
param long l_tot_no_lin
param long l_fi_sz0

while not feof 0
fgetc 0 i_ch
if not feof 0
if i_ch == '`n'
l_tot_no_lin++
endif
endif
endwhile

ftell 0 l_fi_sz0
rewind 0

endproc

;proc txdt ;#####

;param string s_txs
;integer i_p = 0
;integer i_ch = -1

; strgetc s_txs i_P i_ch
; i_p++

; while i_ch != 0
; computc i_ch
; strgetc s_txs i_P i_ch
; i_P++
; endwhile

;endproc

proc txdc ;#####

param string s_txs
integer i_p = 0
integer i_ch = -1

strgetc s_txs i_P i_ch
i_p++

while i_ch != 0
computc i_ch
strgetc s_txs i_P i_ch
i_P++
endwhile

computc 13

endproc

proc ld_ovl_88 ;#####

param string s_type_item
param string s_type_cdp
param string s_customer_item

txdc ("LD 88")
waitfor "REQ "
txdc (s_type_item)
waitfor "TYPE "
txdc (s_type_cdp)
waitfor "CUST "
txdc (s_customer_item)
STATMSG " Start of Progress status bar and changes to be made in LD 88"
endproc

proc ex_ovl_88 ;#####
param string s_type_cdp
param string s_customer_item

txdc ("")
pause 2
; txdc ("**")
; pause 2
STATMSG " Printout of changes made in LD 88"
waitfor "REQ "
txdc ("PRT") ; Prints out the relevent Auth / Sar data in LD 88
waitfor "TYPE "
txdc (s_type_cdp)
waitfor "CUST "
txdc (s_customer_item)
pause 4
txdc ("")
waitfor "REQ " FOREVER
txdc ("****")
waitfor ">"

ALARMS_LIST ()
LOGO ()
endproc

proc out_cdp ;#####

param string s_type_cdp
param string s_customer_item

if strcmp s_type_cdp "AUT"
txdc (s_opdata[0])
waitfor "CODE "
elseif strcmp s_type_cdp "AUB"
txdc (s_opdata[0])
waitfor "REQ "
txdc ("***")
waitfor "REQ "
CALL ALARMS_LIST
elseif strcmp s_type_cdp "SAR"
txdc (s_opdata[0])
waitfor "REQ "
txdc ("OUT")
waitfor "TYPE "
txdc (s_type_cdp)
waitfor "CUST "
txdc (s_customer_item)
waitfor "SGRP "

endif

endproc

PROC AUTHCOD_ALRM
pause 4
txdc ("")
ENDPROC

PROC CARR_RETURN
txdc ("")
ENDPROC

Proc SPWD_0000
waitfor "SPWD " forever
; txdc ("0000")
; PAUSE 1
WAITFOR "CODE " 0
txdc ("")
endproc

; Proc SPWD_9999
; pause 1
; txdc ("PRT")
; WAITFOR "TYPE" 1
; txdc ("AUT")
; WAITFOR "CUST " 1
; txdc ("0")
; WAITFOR "SPWD " 1
; pause 1
; txdc ("0000")
; PAUSE 1
; WAITFOR "CODE " 1
; txdc ("")
;endproc

Proc TTY_LOGIN
pause 3
txdc ("LOGI")
endproc

Proc ACDR
txdc ("YES")
endproc

Proc ALEN
txdc ("4") ; Change to the digit length required!.
endproc

Proc RANR
txdc ("X")
endproc

Proc AUTH001
txdc ("0")
endproc

PROC AUTH005
pause 1
STATMSG "Number of Authcode digits entered does not match the ALEN setting!."
ENDPROC

Proc AUTH006
txdc ("****")
txdc ("LD 88")
; waitfor "REQ"
endproc

PROC AUTH007
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, Specified Authcode already exists!."
exit
ENDPROC

PROC AUTH008
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, Specified Authcode does not exist!."
exit
ENDPROC

PROC AUTH009
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, Specified Authcode already exists!."
exit
ENDPROC

PROC SCH1328
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, Invalid input type!."
exit
ENDPROC

Proc SCH8796
txdc ("****")
; waitfor ">"
txdc ("LD 88")
waitfor "REQ"
endproc

PROC TEN
txdc ("")
ENDPROC

PROC ESN006
txdc ("**")
pause 2
STATMSG "Null input not allowed. Script will Continue to the next part."
ENDPROC

PROC ESN009
txdc ("")
ENDPROC

PROC ESN014
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, Route list index number out-of-range (0-255 for NARS, 0-127 for BARS, 0-7 for CDP). Increase your MXRL value to be higher than your RLI number!."
exit
ENDPROC

PROC ESN017
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, Route list does not exist, a value must be entered!."
exit
ENDPROC

PROC ESN019
txdc ("1")
STATMSG "Attendant number Out-of-range. A value of 1 - 7 must be entered. ALT (1) has been used!"
ENDPROC

PROC ESN022
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, Route list entry does not exist!."
exit
ENDPROC

PROC ESN026
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, Digit manipulation index number out-of-range. (1-255 for NARS/BARS,1-31 for CDP, 0-999 with FNP package 160). Increase your MXDM value to be higher than your DMI number!."
exit
ENDPROC

PROC ESN028
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped. Network translators, Route List Blocks, Digit Manipulation Tables, FCAS Tables, or CDP list still exist; ESN cannot be removed!."
exit
ENDPROC

PROC ESN029
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, Null input not allowed, a value must be entered!."
exit
ENDPROC

PROC ESN030
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, Route entered does not exist or exists but has no members. A value must be entered!."
exit
ENDPROC

PROC ESN048
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped. Digit manipulation table entry does not exist!."
exit
ENDPROC

PROC ESN062
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, No more available location codes. Go to LD 86 and change ESN (out or expand MXLC)!."
exit
ENDPROC

PROC ESN073
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, Conflict with another (NPA, NXX, etc). Enter new SPN number!."
exit
ENDPROC

PROC ESN115
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, Too few or too many digits entered. Re-enter only 1-4 digits per field of SPN!."
exit
ENDPROC

PROC ESN125
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, due to a invalid CDP entry!"
exit
ENDPROC

PROC ESN127
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, Undefined Route List Index (RLI)!."
exit
ENDPROC

PROC ESN128
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, Digit manipulation table does not exist!."
exit
ENDPROC

PROC ESN131
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, Undefined steering code (CHG command)!."
exit
ENDPROC

PROC ESN136
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, CDP DN length is out of range!."
exit
ENDPROC

PROC ESN139
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, Number of digits to strip is out-of-range (LSC)!."
exit
ENDPROC

PROC ESN158
txdc ("****")
pause 4
txdc ("LOGO")
USERMSG "Script file has stopped, ITGE is out of Range!."
exit
ENDPROC

PROC ESN188
STATMSG "LD 90 is being used to change HLOC. When changing HLOC for ESN, the ISDN HLOC in LD 15 might also require changing!."
ENDPROC

PROC AUTO_NO
txdc ("NO")
ENDPROC

Proc OVL013
txdc ("****")
endproc

PROC OVL111
txdc ("****")
waitfor ">"
USERMSG "Script failed, as the TTY user is NOT logged into the system!"
exit
endproc

PROC OVL428
USERMSG "Script failed. The Login name & password combination is invalid. Check the password & login name & try again.!"
exit
endproc

PROC OVL014
STATMSG "Please wait 30 seconds as the TTY is already logged in!"
endproc

PROC DATETIMESTART

param string s_time_start
param string s_date_start
integer i_tmp

strlen s_date_start i_tmp
if i_tmp >5
strlen s_time_start i_tmp
if i_tmp <2
s_time_start = "00:10:00"
endif
endif
strlen s_time_start i_tmp
if i_tmp >5
strlen s_date_start i_tmp
if i_tmp <2
s_date_start = $DATE
endif
endif

Waituntil s_time_start s_date_start
endproc

proc logi ;#####
param string s_userid
When Target 0 "OVL014 " CALL OVL014
When Target 1 "OVL428 " CALL OVL428
When Target 2 "SCH0510 " CALL OVL014
WHEN TARGET 3 "OVL013 " CALL TTY_LOGIN

transmit "LOGI "
; txdc ("LOGI ")
txdc (s_userid)
waitfor "PASS?"
endproc

proc login ;#####
param string s_pwd
txdc (s_pwd)
waitfor ">"
txdc ("****")
endproc

PROC LOGO
txdc ("LOGO") ; Check this box if you DON'T want to log out!
F_Time=$TIME
statmsg "LD 88 New, Out & Change script file has now been Completed`n`n at %s" F_TIME
pause 4
if i_mdm_clrdwn
waitfor "TTY"
pause 4
transmit "+++"
pause 4
waitfor "OK"
pause 4
txdc ("ATH0")
pause 4
Capture Off
usermsg "Modem cleardown & LD 88 New, Out & Change script file has now been Completed`n`n at %s" F_TIME
else
pause 4
endif
Capture Off
usermsg "LD 88 New, Out & Change script file has now been Completed`n`n at %s" F_TIME
endproc

PROC ALARMS_LIST

; ######## TO CANCEL ANY ALARMS IN LD 32 AFTER CHANGES ARE MADE

txdc ("LD 32")
STATMSG " To cancel any alarms in LD 32 after changes have been made"
pause 8
txdc ("CMIN ALL")
txdc ("CDSP")
txdc ("****")

; ###################### "VERSION 19.xx Onwards, Time Forward / Backward 1 Hour!"
; "United Kingdom Settings!"

; txdc ("LD 2")
; STATMSG " To set the UK daylight saving hours"
; pause 8
; txdc ("TTAD")
; txdc ("TDST")
; txdc ("FWTM 3 5 1 02")
; txdc ("BWTM 10 5 1 02")
; txdc ("SDST ON")
; txdc ("****")

; ######## TO DO A DUMP IN LD 43 AFTER CHANGES ARE MADE

txdc ("LD 43")
STATMSG " To do a system EDD in LD 43 after changes have been made"
pause 8
txdc ("EDD")
pause 250
; waitfor "." forever
txdc ("")
waitfor "EDD000"
txdc ("****")
endproc

 
I've ran my script on a customers option 11c system running version 25.15 software using the default settings and it runs fine as shown below.


TTY 00 SCH MTC 22:04
OVL111 BKGD 44
>
AUD000

LOGI DAVE
PASS?
.
TTY #00 LOGGED IN DAVE 22:13 15/10/2009

>****
>
OVL000
>
OVL000
>LD 88
AUTH000

MEM AVAIL: (U/P): 893357 USED U P: 450985 48297 TOT: 1392639
DISK RECS AVAIL: 467
REQ NEW
TYPE AUT
CUST 0
CODE 1200
SARC
CLAS 3
CODE 1201
SARC
CLAS 3
CODE 1202
SARC
CLAS 3
CODE 1203
SARC
CLAS 3
CODE 1204
SARC
CLAS 3
CODE 1205
SARC
CLAS 3
CODE 1206
SARC
CLAS 3
CODE 1207
SARC
CLAS 3
CODE 1208
SARC
CLAS 3
CODE 1209
SARC
CLAS 3
CODE 1210
SARC
CLAS 3
CODE 1211
SARC
CLAS 3
CODE 1212
SARC
CLAS 3
CODE 1213
SARC
CLAS 3
CODE 1214
SARC
CLAS 3
CODE 1215
SARC

(Had to stop the script, but it was doing it very quick.)

What software versions are you using?. Have you tried the script with your TTY USER prompt = MTC and BUG removed, although mine had it enabled.

All the best

Firebird Scrambler
Meridian Programmer in the UK

If it's working, then leave it alone!.
 
I've also tested out the "OUT" AUT codes and they work OK as shown below.

>LOGI DA
AUD000
VE
PASS?
.
TTY #00 LOGGED IN DAVE 22:19 15/10/2009

>****
OVL000
>
OVL000
>LD 88
AUTH000

MEM AVAIL: (U/P): 893101 USED U P: 450985 48553 TOT: 1392639
DISK RECS AVAIL: 466
REQ OUT
TYPE AUT
CUST 0
CODE 1200
CODE 1201
CODE 1202
CODE 1203
CODE 1204
CODE 1205
CODE 1206
CODE 1207
CODE 1208
CODE 1209
CODE 1210
CODE 1211
CODE 1212
CODE 1213
CODE 1214
CODE 1215
CODE 1216
CODE 1217

I'm puzzled why It's failing. I must also point out that I'm doing this via a 9600 baud dial up connection.


All the best

Firebird Scrambler
Meridian Programmer in the UK

If it's working, then leave it alone!.
 
I don't know, your guess is as good as mine. Procomm, is version 4.8 and also have version 25.15. I guess the only difference I can see is that I have 10 digit codes and expanding them to 14 digits. Is a possiblity for a delay ? Is there anything within procomm that would delay it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top