proc main integer ijump integer imain1 integer imain2 dialogbox 2 279 79 210 114 3 "Disclaimer" text 10 31 5 130 50 "WARNING: This is a trial version of this script. It performs repetitive actions on the Nortel DMS-10 switch. Use at your own risk. You must be in the correct overlay before starting the particular procedure." left pushbutton 11 27 76 62 16 "OK" pushbutton 12 110 77 50 16 "Cancel" enddialog while 1 dlgevent 2 imain2 switch imain2 case 0 endcase case 11 exitwhile endcase case 12 goto label50 endcase endswitch endwhile dlgdestroy 2 cancel setjmp 0 ijump dialogbox 0 136 36 264 200 2 " DMS-10 Helper Script" text 1 8 17 138 11 "Please Select One of the Following:" left pushbutton 2 60 40 125 15 "BUSY/RTS DMS-10 Trunks." pushbutton 3 60 74 125 15 "Add DMS-10 Line Ckt Packs." pushbutton 4 60 108 125 15 "Delete DMS-10 Line Ckt Packs." pushbutton 5 60 142 125 15 "Exit DMS-10 Helper Script" enddialog while 1 dlgevent 0 imain1 switch imain1 case 0 endcase case 2 busyrtstrks() endcase case 3 addlinepks() endcase case 4 dellinepks() endcase case 5 exitwhile endcase endswitch endwhile label50: endproc proc busyrtstrks string strbsyorrts string strfirsttrk string strnumboftrks string dtrk string trk string lchance integer trknum integer ijump integer ifirsttrk integer inumboftrks integer ix trknum=1 usermsg "This routine should be ran while logged into the DMS-10 and in overlay DED." label0: sdlginput "Information" "Enter DTRK location(i.e.RWBH PE 5 2 8)or Q to quit." dtrk If failure longjmp 0 ijump endif STRUPR dtrk strcmp dtrk "Q" If success longjmp 0 ijump endif label1: sdlginput "Begining Trunk" "Enter first trunk number in sequence(1-24)." strfirsttrk if failure goto label0 endif atoi strfirsttrk ifirsttrk if ifirsttrk < 1 goto label1 endif if ifirsttrk > 24 goto label1 endif label2: sdlginput "Number of Trunks" "Enter total number of trunks(1-24)." strnumboftrks if failure goto label0 endif atoi strnumboftrks inumboftrks if inumboftrks < 1 usermsg "Number must be between 1 and 24!" goto label2 endif if inumboftrks > 24 usermsg "Number must be between 1 and 24!" goto label2 endif label3: sdlginput "BUSY or RTS?" "BUSY or RTS TRKS?(BUSY/RTS)" strbsyorrts If failure goto label0 endif strupr strbsyorrts strcmp strbsyorrts "BUSY" if failure strcmp strbsyorrts "RTS" if failure usermsg "You must enter either 'BUSY' or 'RTS'!" goto label3 endif endif sdlginput "LASTCHANCE" "Are you sure?(Y/N)" lchance If failure busyrtstrks() endif strupr lchance strcmp lchance "Y" If FAILURE busyrtstrks() endif trknum=ifirsttrk while ix " forever endwhile busyrtstrks () endproc proc addlinepks string strclasscode string strsitename string strlcenum string strlsgnum string strlnpkpos string strlsgamnt string strlpkamnt string strtypeofpk string strtemptype string strshelf string strnewlnpkpos string strnht string strtop string strwlc string strlptp string strfctn string strstrt string strcctl string strtmpl string str18nht string strdely string strlastchance string strlastchance2 integer ilpkamnt integer ilsgamnt integer ilnpkpos integer iloop1 integer ijump integer istrleng1 integer ilcenum integer ilsgnum integer iy integer iz integer inewlnpkpos dialogbox 0 8 43 264 108 2 "Multiple Line Pack Change" text 2 50 22 154 43 "This routine is designed to add up to 640 line paks at a time to the DMS-10. It should be ran while logged into the DMS-10 and in ovly CPK. Please verify that you are logged on and in the correct overlay, then press ok to continue." left pushbutton 3 70 72 50 15 "OK" pushbutton 4 128 72 50 15 "Cancel" enddialog while 1 yield dlgevent 0 iloop1 switch iloop1 case 0 endcase case 3 exitwhile endcase case 4 longjmp 0 ijump endcase endswitch endwhile label1: sdlginput "Site Name" "Site Name of LCE affected(RWBH,FRSY, etc.)?" strsitename if failure addlinepks() endif strlen strsitename istrleng1 if istrleng1 !=4 usermsg "Site name must be four characters." goto label1 endif strupr strsitename label2: sdlginput "LCE Number" "Number of LCE(0-10)?" strlcenum if failure addlinepks() endif if nullstr strlcenum usermsg "You must enter a LCE number." goto label2 endif atoi strlcenum ilcenum if ilcenum > 20 usermsg "LCE Number must be between 0 and 10" goto label2 endif label3: sdlginput "First LSG Number" "First LSG in Conitiguous Series(0-19)?" strlsgnum if failure addlinepks() endif if nullstr strlsgnum usermsg "You must enter a beginning LSG number!" goto label3 endif atoi strlsgnum ilsgnum if ilcenum > 19 usermsg "LCE Number must be between 0 and 19" goto label3 endif label4: sdlginput "Line Pack Position" "First LPK position in Series(0-31)?" strlnpkpos if failure addlinepks() endif if nullstr strlnpkpos usermsg "You must enter a beginning LPK position!" goto label4 endif atoi strlnpkpos ilnpkpos if ilnpkpos > 31 usermsg "Beginning LPK position must be between 0 and 31" goto label4 endif label5: sdlginput "Number of Linepacks" "Total number of linepacks to add in each LSG?(1-32)" strlpkamnt if failure addlinepks() endif if nullstr strlpkamnt usermsg "You must enter a valid number of line packs!" goto label5 endif atoi strlpkamnt ilpkamnt if ilpkamnt > 32 usermsg "No more than 32 line packs may be added to any LSG." goto label5 endif label6: sdlginput "Number of LSG's" "Number of LSG's in which to add packs?(1-20)" strlsgamnt if failure addlinepks() endif if nullstr strlsgamnt usermsg "You must enter a valid number of LSG's!" goto label5 endif atoi strlsgamnt ilsgamnt if ilnpkpos > 31 usermsg "Beginning LPK position must be between 0 and 31" goto label1 endif label12: sdlginput "Module" "TOP(SH3-4) or BOT(SH1-2) Module(TOP/BOT)?" strtop if failure addlinepks() endif if nullstr strtop usermsg "You must Enter Shelf Designator." endif strupr strtop strcmp strtop "TOP" if failure strcmp strtop "BOT" if failure usermsg "You must enter TOP or BOT!" goto label12 endif endif label7: sdlginput "Type of Line Pack" "PEC of linepacks to add?(6X17 or 6X18)" strtypeofpk if failure addlinepks() endif if nullstr strtypeofpk usermsg "You must enter either 6X17 or 6X18" goto label7 endif strupr strtypeofpk strcmp strtypeofpk "6X17" if success goto label8 endif strcmp strtypeofpk "6X18" if success goto label11 endif usermsg "Card Type must be 6X17 or 6X18" goto label7 label8: sdlginput "Type of 6X17" "World-Class 6X17BA?(Y/N)" strclasscode if failure addlinepks() endif if nullstr strclasscode usermsg "You must enter either Y or N." goto label8 endif strupr strclasscode strcmp strclasscode "Y" if success strclasscode="YES" label9: sdlginput "Template" "Choose: 902L,902G,LOOP,GND,1MLP,1M92,LCWI?" strtemptype if nullstr strtemptype goto label9 endif strupr strtemptype else strcmp strclasscode "N" if failure usermsg "You must enter Y or N." else strclasscode="NO" label10: sdlginput "NHT: HAZARD TEST SUPPRESS" "Suppress the line hazard test?(Y/N)" strnht if failure addlinepks() endif if nullstr strnht usermsg "You must enter either Y or N." goto label10 endif strupr strnht strcmp strnht "Y" if success strnht="YES" endif strcmp strnht "N" if success strnht="NO" endif endif endif ;proc 6x17 sdlginput "Lastchance" "Are you absolutely sure?(Y/N)" strlastchance strupr strlastchance strcmp strlastchance "Y" if failure main() endif strnewlnpkpos = strlnpkpos inewlnpkpos=ilnpkpos while iz 20 usermsg "LCE Number must be between 0 and 10" goto label2 endif label3: sdlginput "First LSG Number" "First LSG in Conitiguous Series(0-19)?" strlsgnum if failure dellinepks() endif if nullstr strlsgnum usermsg "You must enter a beginning LSG number!" goto label3 endif atoi strlsgnum ilsgnum if ilcenum > 19 usermsg "LCE Number must be between 0 and 19" goto label3 endif label4: sdlginput "Line Pack Position" "First LPK position in Series(0-31)?" strlnpkpos if failure dellinepks() endif if nullstr strlnpkpos usermsg "You must enter a beginning LPK position!" goto label4 endif atoi strlnpkpos ilnpkpos if ilnpkpos > 31 usermsg "Beginning LPK position must be between 0 and 31" goto label4 endif label5: sdlginput "Number of Linepacks" "Total number of linepacks to delete in each LSG?(1-32)" strlpkamnt if failure dellinepks() endif if nullstr strlpkamnt usermsg "You must enter a valid number of line packs!" goto label5 endif atoi strlpkamnt ilpkamnt if ilpkamnt > 32 usermsg "No more than 32 line packs may be added to any LSG." goto label5 endif label6: sdlginput "Number of LSG's" "Number of LSG's in which to delete packs?(1-20)" strlsgamnt if failure dellinepks() endif if nullstr strlsgamnt usermsg "You must enter a valid number of LSG's!" goto label5 endif atoi strlsgamnt ilsgamnt if ilnpkpos > 31 usermsg "Beginning LPK position must be between 0 and 31" goto label1 endif label12: sdlginput "Module" "TOP(SH3-4) or BOT(SH1-2) Module(TOP/BOT)?" strtop if failure dellinepks() endif if nullstr strtop usermsg "You must Enter Shelf Designator." endif strupr strtop strcmp strtop "TOP" if failure strcmp strtop "BOT" if failure usermsg "You must enter TOP or BOT!" goto label12 endif endif strnewlnpkpos = strlnpkpos inewlnpkpos=ilnpkpos label13: sdlginput "Last Chance!" "Are you absolutely sure?(Y/N)" strlastchance if failure dellinepks() endif strupr strlastchance strcmp strlastchance "Y" If success while iz