home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-09-25 | 52.7 KB | 2,471 lines |
- #INDEX
- >None 00000705 000030
- >PC 00000710 000031
- >Mac 00000716 000032
- >Slave 00000724 000033
- >Wang 00000731 000034
- >BHost 00001926 000094
- >Satellit00001937 000095
- >Unix 00007743 000347
- >Xenix 00007751 000348
- >AIX 00007757 000349
- >Ultrix 00007766 000350
- >SunOS 00007774 000351
- >A/UX 00007781 000352
- >Demo 00007788 000353
- >VMS 00015723 000690
- >AOS 00023098 001013
- >CEO 00030819 001357
- >MVS/TSO 00038627 001714
- >VM/CMS 00041705 001871
- >Primos 00044798 002025
- >HP1000 00047907 002171
- >HP3000 00050847 002316
- :
- #########################################################
- #
- # Slave or other system running BLAST w/o logins
- #
- :None
- :PC
- :Mac
- :Slave
- :Wang
- #
- # No LOGON required on PC's or slave scripts
- #
- .LOGON
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " * "
- cursor 12,15
- put "No logon required for ",@SYSTYPE," system"
- set @SCRLREG = "0"
- end
- return 0
- .LOGOFF
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 14,0
- put " "
- cursor 14,0
- put " *"
- cursor 14,15
- put "No logoff required for ",@SYSTYPE," system"
- set @SCRLREG = "0"
- end
- return 0
- .TRANSFER
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 13,0
- put " "
- cursor 13,0
- put "--> "
- cursor 13,15
- put "Waiting for BLAST protocol"
- set @SCRLREG = "0"
- end
- return 0
- .UPLOAD
- if @SCRFILE = "AutoPoll"
- werror "UPLOAD not supported"
- fwrite 4, " >> UPLOAD not supported"
- return -2
- end
- ask "enter filename to upload", @filename
- if null @filename return 0
- if exist @filename goto .UPL10
- werror "can't open ", @filename
- return 1
- .UPL10
- tupload @filename
- return 0
- .END
- :
- #########################################################
- #
- # BLAST Plus Host Systems
- #
- :BHost
- :Satellit
- #
- # LOGON to remote BLAST Plus Host system
- #
- .LOGON
- if not null @USERID goto .LOG10
- if @SCRFILE not = "AutoPoll" ask "enter account", @USERID
- if null @USERID goto .LOG20
- .LOG10
- if not null @PASSWORD goto .LOG15
- if @SCRFILE not = "AutoPoll"
- ask noecho "enter password", @PASSWORD
- if null @PASSWORD return 0
- goto .LOG15
- end
- fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - No PASSWORD specified"
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X"
- cursor 12,15
- put "SETUP FILE ",@su_fil," - No PASSWORD specified"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- .LOG15
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put "--> "
- set @SCRLREG = "0"
- end
- reps 5
- .LOG20
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,15
- put " "
- cursor 12,15
- put "Looking for ",@SYSTYPE," logon prompt"
- cleol
- set @SCRLREG = "0"
- end
- tsend CR
- ttrap 10 "in:","tocol",">","\\","word:"
- if @STATUS = "1" goto .LOG30
- if @STATUS = "2" or @STATUS = "3" or @STATUS = "4" goto .LOG50
- if @STATUS = "5"
- tsend CR
- wait 1 idle
- end
- .LOG25
- tsend "\021"
- if @SCRFILE = "AutoPoll" fwrite 4, " * Attempting to get ",@SYSTYPE," system's attention"
- if reps goto .LOG20
- #
- # Can't log in, inform user and exit
- #
- if @SCRFILE = "AutoPoll" fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - Remote not responding with Userid prompt for ",@SYSTYPE
- else return 1
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X "
- cursor 12,15
- put "CHECK SETUP ",@su_fil," - Wrong System Type?"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- #
- .LOG30
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,15
- put " "
- cursor 12,15
- put "Sending UserId"
- cleol
- set @SCRLREG = "0"
- end
- tsend @USERID, CR # enter USERID
- ttrap 5 "word:","tocol",">","\\","in:"
- if @STATUS = "2" or @STATUS = "3" or @STATUS = "4" goto .LOG50
- if @STATUS not = "1" goto .LOG55
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,15
- put " "
- cursor 12,15
- put "Sending Password"
- cleol
- set @SCRLREG = "0"
- end
- tsend @PASSWORD, CR # enter PASSWORD
- ttrap 10 "tocol",">","\\","Invalid"
- if @STATUS = "0" or @STATUS ="4" goto .LOG55
- .LOG50
- if @USERIF = "0" or @SCRFILE NOT = "AutoPoll" return 0
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " *"
- cursor 12,15
- put "Logged on"
- cleol
- set @SCRLREG = "0"
- return 0 # got a system prompt
- #
- # Incorrect USERID/PASSWORD - perhaps it was corrupted in transit
- #
- .LOG55
- if @SCRFILE = "AutoPoll" fwrite 4, " * Re-trying LOGIN - noise may have corrupted Username/Password exchange"
- if reps goto .LOG20
- if @SCRFILE = "AutoPoll" fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - Userid/Password not valid or noisy line"
- else return 1
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X"
- cursor 12,15
- put "CHECK SETUP ",@su_fil," - bad UserID/Password or line noise"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- #
- # LOGOFF the remote system
- #
- .LOGOFF
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 14,0
- put " "
- cursor 14,0
- put "--> "
- cursor 14,15
- put "Looking for operating system prompt"
- set @SCRLREG = "0"
- end
- reps 4 # try 4 times
- #
- .LGF10
- tsend CR # get system prompt
- ttrap 10 "in:","word:","ogout at","tocol",">","\\"
- if @STATUS = "1" or @STATUS = "2" or @STATUS = "3" goto .LGF20
- if @STATUS = "4" tsend ";DISC.",CR
- if @STATUS = "5" or @STATUS = "6" tsend "\033\014"
- tsend "\021"
- #
- if reps goto .LGF10
- #
- # Unable to get anything recognizable - abort
- #
- if @SCRFILE = "AutoPoll" fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - LOGOFF Failed: Remote not responding as expected for ",@SYSTYPE
- else return 1
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 14,0
- put " "
- cursor 14,0
- put " X"
- cursor 14,15
- put "CHECK SETUP ",@su_fil," - Could not find operating system prompt"
- cleol
- if @SCRFILE = "AutoPoll" set @SCRLREG = "0"
- end
- return -2
- #
- .LGF20 # VMS logout
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 14,0
- put " "
- cursor 14,0
- put " *"
- cursor 14,15
- put "Logged off"
- cleol
- set @SCRLREG = "0"
- end
- return 0
- #
- #
- # UPLOAD a file to the remote system
- #
- .UPLOAD
- if @SCRFILE = "AutoPoll"
- werror "UPLOAD not supported by AutoPoll"
- fwrite 4, " >> UPLOAD not supported"
- return -2
- end
- return 1
- #
- # START file transfer on remote system
- #
- .TRANSFER
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 13,0
- put " "
- cursor 13,0
- put "--> "
- cursor 13,15
- put "Waiting for BLAST protocol"
- cleol
- set @SCRLREG = "0"
- end
- reps 4
- #
- .TRANS10
- tsend CR
- ttrap 5 "tocol",">","\\"
- if @STATUS = "1" return 0
- .TRANS15
- if reps
- tsend "\021\033\030"
- goto .TRANS10
- end
- #
- # Unable to get anything recognizable on remote computer - abort
- #
- if @SCRFILE = "AutoPoll" fwrite 4, " >> CHECK REMOTE SYSTEM - Unable to get ",@SYSTYPE," system prompt after login"
- else return 1
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 13,0
- put " "
- cursor 13,0
- put " X "
- cursor 13,15
- put "CHECK REMOTE - System not responding in time"
- cleol
- set @SCRLREG = "0"
- end
- return -3
- .END
- :
- #########################################################
- #
- # AT&T Unix and similar systems
- #
- :Unix
- :Xenix
- :AIX
- :Ultrix
- :SunOS
- :A/UX
- :Demo
- #
- # LOGON to remote UNIX(-like) system
- #
- .LOGON
- if not null @USERID goto .LOG10
- if @SCRFILE not = "AutoPoll"
- ask "enter account", @USERID
- if null @USERID return 0
- goto .LOG10
- end
- fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - No USERID specified"
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X"
- cursor 12,15
- put "SETUP FILE ",@su_fil," - No USERID specified"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- .LOG10
- if not null @PASSWORD goto .LOG15
- if @SCRFILE not = "AutoPoll"
- ask noecho "enter password", @PASSWORD
- if null @PASSWORD return 0
- goto .LOG15
- end
- fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - No PASSWORD specified"
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X"
- cursor 12,15
- put "SETUP FILE ",@su_fil," - No PASSSWORD specified"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- .LOG15
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put "--> "
- set @SCRLREG = "0"
- end
- reps 5
- .LOG20
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,15
- put " "
- cursor 12,15
- put "Looking for ",@SYSTYPE," logon prompt"
- cleol
- set @SCRLREG = "0"
- end
- tsend CR, CR
- ttrap 5 "ogin:","word:","$","#","%","ogin incorrect"
- if @STATUS = "1" goto .LOG30
- if @STATUS = "2"
- tsend CR
- goto .LOG20
- end
- if @STATUS = "3" or @STATUS = "4" or @STATUS = "5"
- tsend "exit", CR
- goto .LOG20
- end
- .LOG25
- tsend "\021\377"
- if @SCRFILE = "AutoPoll" fwrite 4, " * Attempting to get ",@SYSTYPE," system's attention"
- if reps goto .LOG20
- #
- # Can't log in, inform user and exit
- #
- if @SCRFILE = "AutoPoll" fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - Remote not responding with Userid prompt for ",@SYSTYPE
- else return 1
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X "
- cursor 12,15
- put "CHECK SETUP ",@su_fil," - Wrong System Type?"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- #
- .LOG30
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,15
- put " "
- cursor 12,15
- put "Sending UserId"
- cleol
- set @SCRLREG = "0"
- end
- tsend @USERID, CR # enter USERID
- ttrap 10 "word:","$","#","%","ogin incorrect"
- if @STATUS = "2" or @STATUS = "3" or @STATUS = "4" goto .LOG50
- if @STATUS = "0" or @STATUS = "5" goto .LOG25
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,15
- put " "
- cursor 12,15
- put "Sending Password"
- cleol
- set @SCRLREG = "0"
- end
- tsend @PASSWORD, CR # enter PASSWORD
- ttrap 20 "$","#","%","your name","ogin incorrect"
- if @STATUS = "1" or @STATUS = "2" or @STATUS = "3" goto .LOG70
- if @STATUS = "4" goto .LOG50
- #
- # Incorrect USERID/PASSWORD - perhaps it was corrupted in transit
- #
- if @SCRFILE = "AutoPoll" fwrite 4, " * Re-trying LOGIN - noise may have corrupted Username/Password exchange"
- if reps goto .LOG20
- if @SCRFILE = "AutoPoll" fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - Userid/Password not valid or noisy line"
- else return 1
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X"
- cursor 12,15
- put "CHECK SETUP ",@su_fil," - bad UserID/Password or line noise"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- .LOG50
- upper @SYSTYPE
- if @SYSTYPE not = "DEMO" goto .LOG70
- if @SCRFILE = "AutoPoll" set @value = @SCRFILE
- else ask "Please enter your name" @value
- if null @value goto .LOG50
- tsend @value, CR
- ttrap 10 "$","#","%","company"
- if @STATUS not = "4" goto .LOG50
- .LOG60
- if @SCRFILE not = "AutoPoll" ask "Please enter your company name" @value
- if null @value goto .LOG60
- tsend @value, CR
- .LOG70
- if @USERIF = "0" or @SCRFILE NOT = "AutoPoll" return 0
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " *"
- cursor 12,15
- put "Logged on"
- cleol
- set @SCRLREG = "0"
- return 0 # got a system prompt
- #
- # LOGOFF the remote system
- #
- .LOGOFF
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 14,0
- put " "
- cursor 14,0
- put "--> "
- cursor 14,15
- put "Looking for operating system prompt"
- set @SCRLREG = "0"
- end
- reps 4 # try 4 times
- #
- .LGF10
- tsend CR # get system prompt
- ttrap 5 "ogin:","word:","$","#","%","ogin incorrect",">"
- if @STATUS = "1" or @STATUS = "2" or @STATUS = "6" goto .LGF25
- if @STATUS not = "0" goto .LGF20
- #
- if reps
- tsend "\021\377"
- goto .LGF10
- end
- #
- # Unable to get anything recognizable - abort
- #
- if @SCRFILE not = "AutoPoll" return 1
- fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - LOGOFF Failed: Remote not responding as expected for ",@SYSTYPE
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 14,0
- put " "
- cursor 14,0
- put " X"
- cursor 14,15
- put "CHECK SETUP ",@su_fil," - Could not find operating system prompt"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- #
- .LGF20 # VMS logout
- tsend "exit",CR
- .LGF25
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 14,0
- put " "
- cursor 14,0
- put " *"
- cursor 14,15
- put "Logged off"
- cleol
- set @SCRLREG = "0"
- end
- return 0
- #
- #
- # UPLOAD a file to the remote system
- #
- .UPLOAD
- if @SCRFILE = "AutoPoll"
- werror "UPLOAD not supported"
- fwrite 4, " >> UPLOAD not supported"
- return -2
- end
- ask "enter remote filename or <RETURN> to upload to system", @remotefn
- if null @remotefn goto .UPL20
- tsend cr
- ttrap 5 "$","#","%"
- if 0 return 1
- #
- # If no remote filename given, assume file already open on receiving system
- #
- tsend "ed ", @remotefn, cr # start the ed
- ttrap 2
- tsend "a", cr # put it into append mode
- .UPL20
- tupload @filename
- wait 2 idle
- #
- if null @remotefn return 0
- tsend cr, ".", cr
- ttrap 2
- tsend "w", cr
- ttrap 2
- tsend "q", cr
- ttrap 8 "$","%","#"
- if 1 or 2 return 0
- if 3 return 0
- return 1
- #
- # START file transfer on remote system
- #
- .TRANSFER
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 13,0
- put " "
- cursor 13,0
- put "--> "
- cursor 13,15
- put "Looking for operating system prompt"
- set @SCRLREG = "0"
- end
- reps 4
- .TRANS10
- tsend CR
- .TRANS12
- ttrap 10 "$","#","%","protocol","ppp","not found",">"
- if @STATUS = "4" or @STATUS = "5" return 0
- if @STATUS = "1" or @STATUS = "2" or @STATUS = "3" goto .TRANS20
- if @STATUS = "0" or @SCRFILE = not "AutoPoll" goto .TRANS15
- fwrite 4, " * CHECK REMOTE SYSTEM - blast executable(s) not in PATH"
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 13,0
- put " "
- cursor 13,0
- put " X"
- cursor 13,15
- put "CHECK REMOTE SYSTEM - blast executable(s) not in PATH"
- cleol
- set @SCRLREG = "0"
- end
- return -3
- .TRANS15
- if reps
- tsend "\021\377"
- goto .TRANS10
- end
- #
- # Unable to get anything recognizable on remote computer - abort
- #
- if @SCRFILE not = "AutoPoll" return 1
- fwrite 4, " >> CHECK REMOTE SYSTEM - Unable to get ",@SYSTYPE," system prompt after login"
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 13,0
- put " "
- cursor 13,0
- put " X "
- cursor 13,15
- put "CHECK REMOTE - System not responding in time"
- cleol
- set @SCRLREG = "0"
- end
- return -3
- .TRANS20
- tsend "blast -h",CR # invoke BLAST in host mode
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 13,15
- put " "
- cursor 13,15
- put "Waiting for BLAST protocol"
- cleol
- set @SCRLREG = "0"
- end
- goto .TRANS12
- .END
- :
- #########################################################
- #
- # Digital Equipment Corp (DEC) VAX VMS
- #
- :VMS
- #
- # LOGON to the remote VAX
- #
- .LOGON
- if not null @USERID goto .LOG10
- if @SCRFILE not = "AutoPoll"
- ask "enter account", @USERID
- if null @USERID return 0
- goto .LOG10
- end
- fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - No USERID specified"
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X"
- cursor 12,15
- put "SETUP FILE ",@su_fil," - No USERID specified"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- .LOG10
- if not null @PASSWORD goto .LOG15
- if @SCRFILE not = "AutoPoll"
- ask noecho "enter password", @PASSWORD
- if null @PASSWORD return 0
- goto .LOG15
- end
- fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - No PASSWORD specified"
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X"
- cursor 12,15
- put "SETUP FILE ",@su_fil," - No PASSWORD specified"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- .LOG15
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put "--> "
- set @SCRLREG = "0"
- end
- reps 5
- .LOG20
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,15
- put " "
- cursor 12,15
- put "Looking for ",@SYSTYPE," Username prompt"
- cleol
- set @SCRLREG = "0"
- end
- tsend CR, CR
- ttrap 5 "name:","word:","$","authorization fail"
- if @STATUS = "1" goto .LOG30
- if @STATUS = "2"
- tsend CR
- goto .LOG20
- end
- if @STATUS = "3"
- tsend "LOGOFF", CR
- goto .LOG20
- end
- .LOG25
- tsend "\021\031"
- if @SCRFILE = "AutoPoll" fwrite 4, " * Attempting to get ",@SYSTYPE," system's attention"
- if reps goto .LOG20
- #
- # Can't log in, inform user and exit
- #
- if @SCRFILE = "AutoPoll" fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - Remote not responding with Userid prompt for ",@SYSTYPE
- else return 1
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X "
- cursor 12,15
- put "CHECK SETUP ",@su_fil," - Wrong System Type?"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- #
- .LOG30
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,15
- put " "
- cursor 12,15
- put "Sending UserId"
- cleol
- set @SCRLREG = "0"
- end
- tsend @USERID, CR # enter USERID
- ttrap 10 "word:","$","authorization fail" # wait for PASSWORD prompt
- if @STATUS = "2" goto .LOG50
- if @STATUS = "0" or @STATUS = "3" goto .LOG25
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,15
- put " "
- cursor 12,15
- put "Sending Password"
- cleol
- set @SCRLREG = "0"
- end
- tsend @PASSWORD, CR # enter PASSWORD
- ttrap 20 "$","authorization fail"
- if @STATUS = "1"
- .LOG50
- if @USERIF = "0" or @SCRFILE NOT = "AutoPoll" return 0
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " *"
- cursor 12,15
- put "Logged on"
- cleol
- set @SCRLREG = "0"
- return 0 # got a system prompt
- end
- #
- # Incorrect USERID/PASSWORD - perhaps it was corrupted in transit
- #
- if @SCRFILE = "AutoPoll" fwrite 4, " * Re-trying LOGIN - noise may have corrupted Username/Password exchange"
- if reps goto .LOG20
- if @SCRFILE = "AutoPoll" fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - Userid/Password not valid or noisy line"
- else return 1
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X"
- cursor 12,15
- put "CHECK SETUP ",@su_fil," - bad Username/Password or line noise"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- #
- # LOGOFF the remote system
- #
- .LOGOFF
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 14,0
- put " "
- cursor 14,0
- put "--> "
- cursor 14,15
- put "Looking for operating system prompt"
- set @SCRLREG = "0"
- end
- reps 4 # try 4 times
- #
- .LGF10
- tsend CR # get system prompt
- ttrap 5 "$","name:","word:","authorization fail"
- if @STATUS = "1" goto .LGF20 # VMS sys prompt
- if @STATUS = "2" or @STATUS = "4" goto .LGF25
- #
- if reps
- tsend "\021\031"
- goto .LGF10
- end
- #
- # Unable to get anything recognizable - abort
- #
- if @SCRFILE = "AutoPoll" fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - LOGOFF Failed: Remote not responding as expected for ",@SYSTYPE
- else return 1
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 14,0
- put " "
- cursor 14,0
- put " X"
- cursor 14,15
- put "CHECK SETUP ",@su_fil," - Could not find operating system prompt"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- #
- .LGF20 # VMS logout
- tsend "LOGOFF",CR
- .LGF25
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 14,0
- put " "
- cursor 14,0
- put " *"
- cursor 14,15
- put "Logged off"
- cleol
- set @SCRLREG = "0"
- end
- return 0
- #
- #
- # UPLOAD a file to the remote system
- #
- .UPLOAD
- if @SCRFILE = "AutoPoll"
- werror "UPLOAD not supported by AutoPoll"
- fwrite 4, " >> UPLOAD not supported"
- return -2
- end
- ask "enter filename to upload", @filename
- if null @filename return 0
- if exist @filename goto .UPL10
- werror "can't open ", @filename
- return 1
- #
- .UPL10
- ask "enter remote filename or <RETURN> to upload to system", @remotefn
- if null @remotefn goto .UPL20
- tsend "\031",cr
- ttrap 5 "$"
- if 0 return 1
- #
- # If no remote filename given, assume file already open on receiving system
- #
- tsend "create ",@remotefn,cr
- ttrap 2
- .UPL20
- tupload @filename
- wait 2 idle
- #
- if null @remotefn return 0
- tsend "\032"
- ttrap 5 "$"
- if 1 return 0
- return 1
- #
- # START file transfer on remote system
- #
- .TRANSFER
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 13,0
- put " "
- cursor 13,0
- put "--> "
- cursor 13,15
- put "Looking for operating system prompt"
- set @SCRLREG = "0"
- end
- reps 4
- #
- .TRANS10
- tsend CR
- ttrap 10 "$","protocol","ppp","%DCL-"
- if @STATUS = "2" or @STATUS = "3" return 0
- if @STATUS = "1" goto .TRANS20
- if @STATUS = "4"
- if @SCRFILE = "AutoPoll" fwrite 4, " * CHECK REMOTE SYSTEM - BLAST symbol incorrectly defined"
- else goto .TRANS15
- if @USERIF = "0" goto .TRANS15
- set @SCRLREG = "1"
- cursor 13,15
- put " "
- cursor 13,15
- put "CHECK REMOTE SYSTEM - BLAST symbol incorrectly defined"
- cleol
- set @SCRLREG = "0"
- end
- .TRANS15
- if reps
- tsend "\021\031"
- goto .TRANS10
- end
- #
- # Unable to get anything recognizable on remote computer - abort
- #
- if @SCRFILE = "AutoPoll" fwrite 4, " >> CHECK REMOTE SYSTEM - Unable to get ",@SYSTYPE," system prompt after login"
- else return 1
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 13,0
- put " "
- cursor 13,0
- put " X "
- cursor 13,15
- put "CHECK REMOTE - System not responding in time"
- cleol
- set @SCRLREG = "0"
- end
- return -3
- .TRANS20
- tsend "BLAST /H",CR # invoke BLAST in host mode
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 13,15
- put " "
- cursor 13,15
- put "Waiting for BLAST protocol"
- cleol
- set @SCRLREG = "0"
- end
- goto .TRANS10
- .END
- :
- #########################################################
- #
- # Data General AOS & AOS/VS systems
- #
- :AOS
- #
- # LOGON to the remote DG
- #
- .LOGON
- if not null @USERID goto .LOG10
- if @SCRFILE not = "AutoPoll"
- ask "enter account", @USERID
- if null @USERID return 0
- goto .LOG10
- end
- fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - No USERID specified"
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X"
- cursor 12,15
- put "SETUP FILE ",@su_fil," - No USERID specified"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- .LOG10
- if not null @PASSWORD goto .LOG15
- if @SCRFILE not = "AutoPoll"
- ask noecho "enter PASSWORD", @PASSWORD
- if null @PASSWORD return 0
- goto .LOG15
- end
- fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - No PASSWORD specified"
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X"
- cursor 12,15
- put "SETUP FILE ",@su_fil," - No PASSWORD specified"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- .LOG15
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put "--> "
- set @SCRLREG = "0"
- end
- reps 5
- .LOG20
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,15
- put " "
- cursor 12,15
- put "Looking for ",@SYSTYPE," Username prompt"
- cleol
- set @SCRLREG = "0"
- end
- tsend LF
- ttrap 5 "name:","word:","console locking",")"
- if @STATUS = "1" goto .LOG30
- if @STATUS = "2" goto .LOG40
- if @STATUS = "3"
- wait 11
- goto .LOG20
- end
- if @STATUS = "4"
- tsend "BYE", LF
- goto .LOG20
- end
- .LOG25
- tsend "\021"
- if @SCRFILE = "AutoPoll" fwrite 4, " * Attempting to get ",@SYSTYPE," system's attention"
- if reps goto .LOG20
- #
- # Can't log in, inform user and exit
- #
- if @SCRFILE not = "AutoPoll" return 1
- fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - Remote not responding with USERID prompt for ",@SYSTYPE
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X "
- cursor 12,15
- put "CHECK SETUP ",@su_fil," - Wrong System Type?"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- #
- .LOG30
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,15
- put " "
- cursor 12,15
- put "Sending USERID"
- cleol
- set @SCRLREG = "0"
- end
- tsend @USERID, LF # enter USERID
- ttrap 10 "word:",")" # wait for PASSWORD prompt
- if @STATUS = "2" goto .LOG50
- if @STATUS = "0" goto .LOG25
- #
- .LOG40
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,15
- put " "
- cursor 12,15
- put "Sending Password"
- cleol
- set @SCRLREG = "0"
- end
- tsend @PASSWORD, LF # enter PASSWORD
- ttrap 20 ")","name - pass" # trap for AOS prompt
- if @STATUS = "1"
- .LOG50
- if @USERIF = "0" or @SCRFILE not = "AutoPoll" return 0
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " *"
- cursor 12,15
- put "Logged on"
- cleol
- set @SCRLREG = "0"
- return 0 # got a system prompt
- end
- #
- # Incorrect USERID/PASSWORD - perhaps it was corrupted in transit
- #
- if @SCRFILE = "AutoPoll" fwrite 4, " * Re-trying LOGIN - noise may have corrupted Username/Password exchange"
- if reps goto .LOG20
- if @SCRFILE = "AutoPoll" fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - USERID/Password not valid or noisy line"
- else return 1
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X"
- cursor 12,15
- put "CHECK SETUP ",@su_fil," - bad Username/Password or line noise"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- #
- # LOGOFF the remote system
- #
- .LOGOFF
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 14,0
- put " "
- cursor 14,0
- put "--> "
- cursor 14,15
- put "Looking for operating system prompt"
- set @SCRLREG = "0"
- end
- reps 4 # try 4 times
- #
- .LGF10
- tsend LF # get system prompt
- ttrap 5 ")","name:","word:","console locking"
- if @STATUS = "1" goto .LGF20 # AOS sys prompt
- if @STATUS = "2" or @STATUS = "4" goto .LGF25
- #
- if reps
- tsend "\021\003\002"
- goto .LGF10
- end
- #
- # Unable to get anything recognizable - abort
- #
- if @SCRFILE = "AutoPoll" fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - LOGOFF Failed: Remote not responding as expected for ",@SYSTYPE
- else return 1
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 14,0
- put " "
- cursor 14,0
- put " X"
- cursor 14,15
- put "CHECK SETUP ",@su_fil," - Could not find operating system prompt"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- #
- .LGF20 # AOS logout
- tsend "BYE", LF
- .LGF25
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 14,0
- put " "
- cursor 14,0
- put " *"
- cursor 14,15
- put "Logged off"
- cleol
- set @SCRLREG = "0"
- end
- return 0
- #
- # UPLOAD a file to the remote system
- #
- .UPLOAD
- if @SCRFILE = "AutoPoll"
- werror "UPLOAD not supported by AutoPoll"
- fwrite 4, " >> UPLOAD not supported"
- return -2
- end
- ask "enter filename to upload", @filename
- if null @filename return 0
- if exist @filename goto .UPL10
- werror "can't open ", @filename
- return 1
- #
- .UPL10
- ask "enter remote filename or <RETURN> to upload to system", @remotefn
- if null @remotefn goto .UPL20
- tsend LF
- ttrap 5 ")"
- if 0 return 1
- #
- # If no remote filename given, assume file already open on receiving system
- #
- tsend "CHAR/NAS", LF
- ttrap 5 ")"
- if 1 goto .UPL20
- ttrap 2
- return 1
- .UPL20
- tsend "CRE/I ", @remotefn, LF # create file w/insert
- ttrap 10 "))","EXISTS"
- if 0 or 2
- tsend "CHAR/OFF/NAS", LF
- return 1
- end
- #
- tupload @filename
- wait 2 idle
- #
- if null @remotefn return 0
- tsend LF
- ttrap 5 "))"
- if 1
- tsend ")", LF
- ttrap 5 ")"
- if 1
- tsend "CHAR/OFF/NAS", LF
- return 0
- end
- return 0
- end
- #else error
- return 1
- #
- # START file transfer on remote system
- #
- .TRANSFER
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 13,0
- put " "
- cursor 13,0
- put "--> "
- cursor 13,15
- put "Looking for operating system prompt"
- set @SCRLREG = "0"
- end
- reps 4
- #
- .TRANS10
- tsend LF
- ttrap 10 ")","protocol","ppp","Error" # see what's happening
- if @STATUS = "2" or @STATUS = "3" return 0
- if @STATUS = "1" goto .TRANS20
- if @STATUS = "0" got .TRANS15
- if @SCRFILE = "AutoPoll" fwrite 4, " * CHECK REMOTE SYSTEM - BLAST not in SEARCHLIST or not installed"
- else goto .TRANS15
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 13,15
- put " "
- cursor 13,15
- put "CHECK REMOTE setup.cli - BLAST not found in SEARCHLIST"
- cleol
- set @SCRLREG = "0"
- end
- .TRANS15
- if reps
- tsend "\021\003\001"
- goto .TRANS10
- end
- #
- # Unable to get anything recognizable on remote computer - abort
- #
- if @SCRFILE = "AutoPoll" fwrite 4, " >> CHECK REMOTE SYSTEM - Unable to get ",@SYSTYPE," system prompt after login"
- else return 1
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 13,0
- put " "
- cursor 13,0
- put " X "
- cursor 13,15
- put "CHECK REMOTE - System not responding in time"
- cleol
- set @SCRLREG = "0"
- end
- return -3
- .TRANS20
- tsend "X BLAST /H", LF # invoke BLAST in host mode
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 13,15
- put " "
- cursor 13,15
- put "Waiting for BLAST protocol"
- cleol
- set @SCRLREG = "0"
- end
- goto .TRANS10
- .END
- :
- ########################################
- #
- # Data General CEO AOS & AOS/VS systems running CEO
- #
- :CEO
- #
- .LOGON
- if not null @USERID goto .LOG10
- if @SCRFILE not = "AutoPoll"
- ask "enter account", @USERID
- if null @USERID return 0
- goto .LOG10
- end
- fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - No USERID specified"
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X"
- cursor 12,15
- put "SETUP FILE ",@su_fil," - No USERID specified"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- .LOG10
- if not null @PASSWORD goto .LOG15
- if @SCRFILE not = "AutoPoll"
- ask noecho "enter PASSWORD", @PASSWORD
- if null @PASSWORD return 0
- goto .LOG15
- end
- fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - No PASSWORD specified"
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X"
- cursor 12,15
- put "SETUP FILE ",@su_fil," - No PASSWORD specified"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- .LOG15
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put "--> "
- set @SCRLREG = "0"
- end
- reps 5
- .LOG20
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,15
- put " "
- cursor 12,15
- put "Looking for ",@SYSTYPE," Username prompt"
- cleol
- set @SCRLREG = "0"
- end
- tsend LF # get response from remote
- ttrap 5 "name:","word:","console locking",")","FS01"
- if 1 goto .LOG30
- if 3 wait 11
- if 4 tsend "BYE", LF
- if 5 goto .LOG70
- .LOG25
- tsend "\021"
- if @SCRFILE = "AutoPoll" fwrite 4, " * Attempting to get ",@SYSTYPE," system's attention"
- if reps goto .LOG20
- #
- # Can't log in, inform user and exit
- #
- if @SCRFILE not = "AutoPoll" return 1
- fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - Remote not responding with USERID prompt for ",@SYSTYPE
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X "
- cursor 12,15
- put "CHECK SETUP ",@su_fil," - Wrong System Type?"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- #
- .LOG30
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,15
- put " "
- cursor 12,15
- put "Sending USERID"
- cleol
- set @SCRLREG = "0"
- end
- tsend @USERID, LF # enter USERID
- ttrap 10 "word:","FS01" # wait for PASSWORD prompt
- if @STATUS = "2" goto .LOG50
- if @STATUS = "0" goto .LOG25
- .LOG40
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 12,15
- put " "
- cursor 12,15
- put "Sending Password"
- cleol
- set @SCRLREG = "0"
- end
- tsend @PASSWORD, LF # enter PASSWORD
- ttrap 20 "FS01","name - pass" # trap for AOS prompt
- if @STATUS = "1"
- .LOG50
- if @USERIF = "0" or @SCRFILE not = "AutoPoll" return 0
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " *"
- cursor 12,15
- put "Logged on"
- cleol
- set @SCRLREG = "0"
- return 0 # got a system prompt
- end
- #
- # Incorrect USERID/PASSWORD - perhaps it was corrupted in transit
- #
- if @SCRFILE = "AutoPoll" fwrite 4, " * Re-trying LOGIN - noise may have corrupted Username/Password exchange"
- if reps goto .LOG20
- if @SCRFILE = "AutoPoll" fwrite 4, " >> CHECK SETUP FILE (",@su_fil,") - USERID/Password not valid or noisy line"
- else return 1
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 12,0
- put " "
- cursor 12,0
- put " X"
- cursor 12,15
- put "CHECK SETUP ",@su_fil," - bad Username/Password or line noise"
- cleol
- set @SCRLREG = "0"
- end
- return -2
- #
- # LOGOFF the remote system
- #
- .LOGOFF
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 14,0
- put " "
- cursor 14,0
- put "--> "
- cursor 14,15
- put "Looking for CEO prompts"
- set @SCRLREG = "0"
- end
- reps 10 # try 10 times
- .LGF10
- tsend "\021\036\173" # get logoff prompt
- ttrap 5,"exit?","\136\136{","menu? (Y/N)","Execute? (Y/N)","choice:","Pick one","name:",")"
- if 0
- wait 2 idle
- if reps goto .LGF10
- return 1
- end
- if 1 # CEO logoff prompt
- tsend "Y", LF
- ttrap 10,"NEW-LINE",")"
- if 0 goto .LGF10
- if 2 goto .LGF20
- goto .LGF25
- end
- if 2
- tsend LF,LF
- wait 2 idle
- goto .LGF10
- end
- if 3
- tsend "Y",LF # sending mail, exit
- wait 2 idle
- goto .LGF10
- end
- if 4
- tsend "N",LF # sending mail, exit
- wait 2 idle
- goto .LGF10
- end
- if 5
- goto .LGF10
- end
- if 6
- goto .LGF10
- end
- if 7
- return 0 # logon prompt
- end
- if 8
- goto .LGF20
- end
- if 9
- goto .LGF10
- end
- return -2
- .LGF20 # AOS logout
- tsend "BYE", LF
- .LGF25
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 14,0
- put " "
- cursor 14,0
- put " *"
- cursor 14,15
- put "Logged off"
- cleol
- set @SCRLREG = "0"
- end
- return 0
- #
- # UPLOAD a file to the remote system
- #
- .UPLOAD
- if @SCRFILE = "AutoPoll"
- werror "UPLOAD not supported by AutoPoll"
- fwrite 4, " >> UPLOAD not supported"
- return -2
- end
- ask "enter filename to upload", @filename
- if null @filename return 0
- if exist @filename goto .UPL10
- werror "can't open ", @filename
- return 1
- .UPL10
- ask "enter remote filename or <RETURN> to upload to system", @remotefn
- if null @remotefn goto .UPL20
- tsend LF
- ttrap 5 ")"
- if 0 return 1
- #
- # If no remote filename given, assume file already open on receiving system
- tsend "CHAR/NAS",LF
- ttrap 5 ")"
- if 1 goto .UPL20
- ttrap 2
- return 1
- .UPL20
- tsend "CRE/I ", @remotefn,LF # create file w/insert
- ttrap 10 "))","EXISTS"
- if 0 or 2
- tsend "CHAR/OFF/NAS",LF
- return 1
- end
- tupload @filename
- wait 2 idle
- if null @remotefn return 0
- tsend LF
- ttrap 5 "))"
- if 1
- tsend ")",LF
- ttrap 5 ")"
- if 1
- tsend "CHAR/OFF/NAS",LF
- return 0
- end
- return 0
- end
- #else error
- return 1
- end
- #
- # START file transfer on remote system
- .TRANSFER
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 13,0
- put " "
- cursor 13,0
- put "--> "
- cursor 13,15
- put "Looking for operating system prompt"
- set @SCRLREG = "0"
- end
- reps 3
- .TRANS10
- tsend "\036\162"
- ttrap 10 "What command",")","protocol","ppp","Error" # see what's happening
- if @STATUS = "3" or @STATUS = "4" return 0
- if @STATUS = "1"
- tsend "CLI", LF
- goto .TRANS15
- end
- if @STATUS = "2" goto .TRANS20
- if @STATUS = "0" got .TRANS15
- if @SCRFILE not = "AutoPoll" goto .TRANS15
- fwrite 4, " * CHECK REMOTE SYSTEM - BLAST not in SEARCHLIST or not installed"
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 13,15
- put " "
- cursor 13,15
- put "CHECK REMOTE setup.cli - BLAST not found in SEARCHLIST"
- cleol
- set @SCRLREG = "0"
- end
- .TRANS15
- if reps
- tsend "\021"
- goto .TRANS10
- end
- #
- # Unable to get anything recognizable on remote computer - abort
- #
- if @SCRFILE not = "AutoPoll" return 1
- fwrite 4, " >> CHECK REMOTE SYSTEM - Unable to get ",@SYSTYPE," system prompt after login"
- if @USERIF = "1"
- set @SCRLREG = "1"
- cursor 13,0
- put " "
- cursor 13,0
- put " X "
- cursor 13,15
- put "CHECK REMOTE - System not responding in time"
- cleol
- set @SCRLREG = "0"
- end
- return -3
- .TRANS20
- tsend "X BLAST /H ; BYE", LF # invoke BLAST in host mode
- if @USERIF = "1" and @SCRFILE = "AutoPoll"
- set @SCRLREG = "1"
- cursor 13,15
- put " "
- cursor 13,15
- put "Waiting for BLAST protocol"
- cleol
- set @SCRLREG = "0"
- end
- goto .TRANS10
- .END
-
- :
- #
- ########################################
- #
- # IBM MVS/TSO routines
- #
- # NOTE: This script assumes you are using the
- # standard prompt. Problems may occur
- # otherwise.
- #
- :MVS/TSO
- #
- .LOGON
- #
- # Initialize flag, get necessary information
- #
- #
- if not null @userid goto .LOG10 # verify existence of userid
- ask "enter Login ID", @userid
- if null @userid return 0 # return ok no error
- #
- .LOG10 # ask for password
- if null @password
- ask noecho "enter password", @password
- end
- #
- # Try to log in to the remote computer
- #
- reps 5 # repeat login procedure up to
- # 5 times
- #
- .LOG20
- tsend cr # get response from remote
- ttrap 10 "LOGON","ID","WORD"
- if 1
- ttrap 3
- tsend "LOGON",cr
- ttrap 5 "ID"
- if 1 goto .LOG30
- end
- if 2 goto .LOG30
- if 3 goto .LOG40
- if reps goto .LOG20
- #
- # Can't log in, inform user and exit
- #
- return 1
- #
- .LOG30
- ttrap 4
- tsend @userid, cr # enter userid
- ttrap 10 "WORD" # wait for password prompt
- if 1 goto .LOG40
- if reps goto .LOG20
- return 1
- #
- .LOG40
- ttrap 4
- tsend @password,cr # enter password
- ttrap 20 "READY","INCORRECT" # trap for unix xenix prompt
- if 1 return 0 # got a system prompt
- #
- # Incorrect userid/password - perhaps it was garbaged.
- # If we've only tried once, try again, otherwise exit.
- #
- if reps goto .LOG20
- return 1
- #
- # LOGOFF the remote system
- #
- .LOGOFF
- reps 4 # try 4 times
- #
- .LGF10
- tsend cr # get system prompt
- ttrap 10 "READY"
- if 1 goto .LGF20
- #
- if reps goto .LGF10
- #
- # Unable to get anything recognizable - abort
- #
- return 1
- #
- .LGF20 # TSO logout
- tsend "LOGOFF",cr
- return 0
- #
- #
- # UPLOAD a file to the remote system
- #
- .UPLOAD
- #
- .UPL10
- ask "enter remote filename or <RETURN> to upload to system", @remotefn
- if null @remotefn goto .UPL20
- tsend cr
- ttrap 5 "READY"
- if 0 return 1
- #
- # If no remote filename given, assume file already open on receiving system
- #
- reps 2
- ttrap 2
- tsend "EDIT '",@userid,".",@remotefn,"' TEXT NONUM",cr
- ttrap 10 "INPUT","EDIT"
- if 1 goto .UPL20
- if 2 tsend cr
- if 0 return 1
- .UPL20
- ttrap 2
- set @HLINDLY = @LINEDLY
- set @LINEDLY = "15"
- tupload @filename
- set @LINEDLY = @HLINDLY
- wait 2 idle
- #
- if null @remotefn return 0
- #
- .UPL25
- tsend cr
- ttrap 10 "EDIT","INPUT","READY"
- if 1 goto .UPL30
- if 0 or 3 return 1
- if reps goto .UPL25
- .UPL30
- tsend "END S",cr
- ttrap 10 "READY"
- if 1 return 0
- return 1
- end
- #
- # START file transfer on remote system
- #
- .TRANSFER
- reps 3
- #
- .TRANS10
- tsend cr
- ttrap 5 "READY","protocol","ppp" # see what's happening
- if 1 goto .TRANS20 # we need to invoke BLAST
- if 2 or 3 return 0 # BLAST is already started
- if reps goto .TRANS10
- #
- # Unable to get anything recognizable on remote computer - abort
- #
- return 1
- #
- .TRANS20
- tsend "BLAST",cr # invoke BLAST in host mode
- ttrap 20 "ppp", "protocol","READY"
- #
- if 1 or 2 return 0 # BLAST started!
- if reps goto .TRANS20
- #
- #
- return 1
- .END
- :
- ########################################
- #
- # IBM VM/CMS routines
- #
- # NOTE: This script assumes you are using the
- # standard prompt. Problems may occur
- # otherwise.
- #
- :VM/CMS
- #
- .LOGON
- #
- # Initialize flag, get necessary information
- #
- #
- if not null @userid goto .LOG10 # verify existence of userid
- ask "enter login", @userid
- if null @userid return 0 # return ok no error
- #
- .LOG10 # ask for password
- if null @password
- ask noecho "enter password", @password
- end
- #
- # Try to log in to the remote computer
- #
- reps 5 # repeat login procedure up to
- # 5 times
- #
- .LOG20
- tsend "h",cr # get response from remote
- ttrap 10 "restart"
- if 1 goto .LOG30
- if reps goto .LOG20
- #
- # Can't log in, inform user and exit
- #
- return 1
- #
- .LOG30
- ttrap 4
- tsend "l ",@userid, cr # enter userid
- ttrap 10 "word:" # wait for password prompt
- if 1 goto .LOG40
- if reps goto .LOG20
- return 1
- #
- .LOG40
- ttrap 4
- tsend @password,cr # enter password
- ttrap 20 "." # trap for system prompt
- if 1 return 0 # got a system prompt
- #
- # Incorrect userid/password - perhaps it was garbaged.
- # If we've only tried once, try again, otherwise exit.
- #
- if reps goto .LOG20
- return 1
- #
- # LOGOFF the remote system
- #
- .LOGOFF
- reps 4 # try 4 times
- #
- .LGF10
- tsend cr # get system prompt
- ttrap 10 "CMS"
- if 1 goto .LGF20
- #
- if reps goto .LGF10
- #
- # Unable to get anything recognizable - abort
- #
- return 1
- #
- .LGF20 # TSO logout
- tsend "LOGOFF",cr
- return 0
- #
- #
- # UPLOAD a file to the remote system
- #
- .UPLOAD
- ask "enter filename to upload", @filename
- if null @filename return 0
- if exist @filename goto .UPL10
- werror "can't open ", @filename
- return 1
- #
- .UPL10
- ask "enter remote filename or <RETURN> to upload to system", @remotefn
- if null @remotefn goto .UPL20
- tsend cr
- ttrap 5 "cms","CMS"
- if 0 return 1
- #
- # If no remote filename given, assume file already open on receiving system
- #
- reps 2
- ttrap 2
- tsend "EDIT ",@remotefn," TEXT",cr
- ttrap 10 "NEW FILE"
- if 1 goto .UPL20
- if 0 return 1
- .UPL20
- ttrap 2
- tsend "INPUT",cr
- ttrap 10 "INPUT"
- if 1 goto .UPL25
- return 1
- .UPL25
- ttrap 4
- set @HLINDLY = @LINEDLY
- set @LINEDLY = "5"
- tupload @filename
- set @LINEDLY = @HLINDLY
- wait 2 idle
- #
- if null @remotefn return 0
- #
- tsend cr
- ttrap 2
- tsend "SAVE",cr
- ttrap 2
- tsend "QUIT",cr
- return 0
- #
- # START file transfer on remote system
- #
- .TRANSFER
- reps 3
- #
- .TRANS10
- tsend cr
- ttrap 5 "CMS",";start","ppp" # see what's happening
- if 1 goto .TRANS20 # we need to invoke BLAST
- if 2 or 3 return 0 # BLAST is already started
- if reps goto .TRANS10
- #
- # Unable to get anything recognizable on remote computer - abort
- #
- return 1
- #
- .TRANS20
- tsend "BLAST",cr # invoke BLAST in host mode
- ttrap 20 "ppp", ";start","CMS"
- #
- if 1 or 2 return 0 # BLAST started!
- if reps goto .TRANS20
- #
- #
- return 1
- .END
- :
- ########################################
- #
- # PRIME PRIMOS
- #
- # NOTE: This script assumes you are using the
- # standard brief (OK) prompt. Problems may occur
- # otherwise.
- #
- :Primos
- #
- .LOGON
- #
- # Initialize flag, get necessary information
- #
- #
- if not null @userid goto .LOG10 # verify existence of userid
- ask "enter login", @userid
- if null @userid
- return 0 # return ok no error
- end
- #
- .LOG10 # ask for password
- if null @password
- ask noecho "enter password", @password
- end
- #
- # Try to log in to the remote computer
- #
- reps 5 # repeat login procedure up to
- # 5 times
- #
- .LOG20
- tsend cr,"H",cr # get response from remote
- ttrap 5 "ER","LOGIN","Login"
- if not 0 goto .LOG30
- if reps goto .LOG20
- #
- # Can't log in, inform user and exit
- #
- return 1
- #
- .LOG30
- tsend cr,"login ",@userid, cr # enter userid
- ttrap 10 "WORD","word","OK" # wait for password prompt
- if 1 or 2 goto .LOG40
- if 3 return 0 # no password for username
- if reps goto .LOG20
- return 1
- #
- .LOG40
- tsend @password,cr # enter password
- ttrap 30 "OK" # trap for prime prompt
- if 1 return 0 # got a system prompt
- #
- # Incorrect userid/password - perhaps it was garbaged.
- # If we've only tried once, try again, otherwise exit.
- #
- if reps goto .LOG20
- return 1
- #
- # LOGOFF the remote system
- #
- .LOGOFF
- reps 4 # try 4 times
- #
- .LGF10
- tsend "rdy",cr # get system prompt
- ttrap 10 "OK"
- if 1 goto .LGF20
- #
- if reps goto .LGF10
- #
- # Unable to get anything recognizable - abort
- #
- return 1
- #
- .LGF20 # prime logout
- tsend "log",cr
- return 0
- #
- #
- # UPLOAD a file to the remote system
- #
- .UPLOAD
- ask "enter filename to upload", @filename
- if null @filename return 0
- if exist @filename goto .UPL10
- werror "can't open ", @filename
- return 1
- #
- .UPL10
- ask "enter remote filename or <RETURN> to upload to system", @remotefn
- if null @remotefn goto .UPL20
- tsend "rdy",cr
- ttrap 5 "OK"
- if 0 return 1
- #
- # If no remote filename given, assume file already open on receiving system
- #
- tsend "ED",cr
- ttrap 2
- .UPL20
- tupload @filename
- wait 2 idle
- #
- if null @remotefn return 0
- tsend cr
- ttrap 5 "EDIT"
- if 0 return 1
- tsend "FILE ",@remotefn,cr
- ttrap 10 "OK"
- if 1 return 0
- return 1
- end
- #
- # START file transfer on remote system
- #
- .TRANSFER
- reps 3
- #
- .TRANS10
- tsend "rdy",cr
- ttrap 5 "OK","protocol","ppp" # see what's happening
- if 1 goto .TRANS20 # we need to invoke BLAST
- if 2 or 3 return 0 # BLAST is already started
- if reps goto .TRANS10
- #
- # Unable to get anything recognizable on remote computer - abort
- #
- return 1
- #
- .TRANS20
- tsend "RESUME BLAST -H ",cr # invoke BLAST in host mode
- ttrap 30 "ppp", "protocol","OK","ER"
- if 1 or 2 return 0 # BLAST started!
- #
- tsend "SEG BLAST -H ",@BAUDRATE,cr # invoke BLAST in host mode
- ttrap 30 "ppp", "protocol","OK","ER"
- #
- if 1 or 2 return 0 # BLAST started!
- if reps goto .TRANS20
- #
- #
- return 1
- .END
- :
- ########################################
- #
- # HP 1000 RTE
- #
- # NOTE: This script assumes you are using the
- # standard prompt. Problems may occur
- # otherwise.
- #
- :HP1000
- #
- .LOGON
- #
- # Initialize flag, get necessary information
- #
- #
- if not null @userid goto .LOG10 # verify existence of userid
- ask "enter account",@userid
- if null @userid
- return 0 # return ok no error
- end
- #
- .LOG10 # ask for password
- if null @password
- ask noecho "enter password", @password
- end
- #
- # Try to log in to the remote computer
- #
- reps 5 # repeat login procedure up to
- # 5 times
- #
- .LOG20
- tsend cr # get response from remote
- ttrap 5 ":"
- if 1 goto .LOG30
- if reps goto .LOG20
- #
- # Can't log in, inform user and exit
- #
- return 1
- #
- .LOG30
- tsend @userid,cr # enter userid
- ttrap 10 "WORD",">" # wait for password prompt
- if 1 goto .LOG40
- if 2 return 0 # no password for username
- if reps goto .LOG20
- return 1
- #
- .LOG40
- tsend @password,cr # enter password
- ttrap 20 ">" # trap for HP prompt
- if 1 return 0 # got a system prompt
- #
- # Incorrect userid/password - perhaps it was garbaged.
- # If we've only tried once, try again, otherwise exit.
- #
- if reps goto .LOG20
- return 1
- #
- # LOGOFF the remote system
- #
- .LOGOFF
- reps 4 # try 4 times
- #
- .LGF10
- tsend cr # get system prompt
- ttrap 10 ">"
- if 1 goto .LGF20 # OK log off
- #
- if reps goto .LGF10
- #
- # Unable to get anything recognizable - abort
- #
- return 1
- #
- .LGF20 # hp logout
- tsend "ex,sp",cr
- return 0
- #
- #
- # UPLOAD a file to the remote system
- #
- .UPLOAD
- ask "enter filename to upload", @filename
- if null @filename return 0
- if exist @filename goto .UPL10
- werror "can't open ", @filename
- return 1
- #
- .UPL10
- ask "enter remote filename or <RETURN> to upload to system", @remotefn
- if null @remotefn goto .UPL20
- tsend cr
- ttrap 5 ">"
- if 0 return 1
- #
- # If no remote filename given, assume file already open on receiving system
- #
- tsend "CO 1 ",@remotefn,cr
- ttrap 5 "..."
- if 1 goto .UPL20
- return 1
- .UPL20
- ttrap 2
- set @HLINDLY = @LINEDLY
- set @LINEDLY = "3"
- tupload @filename
- set @LINEDLY = @HLINDLY
- wait 2 idle
- #
- if null @remotefn return 0
- tsend "^D"
- ttrap 5 ">"
- if 1 return 0
- return 1
- end
- #
- # START file transfer on remote system
- #
- .TRANSFER
- reps 3
- #
- .TRANS10
- tsend cr
- ttrap 5 ">","protocol","ppp" # see what's happening
- if 1 or 2 goto .TRANS20 # we need to invoke BLAST
- if 3 return 0 # BLAST is already started
- if reps goto .TRANS10
- #
- # Unable to get anything recognizable on remote computer - abort
- #
- return 1
- #
- .TRANS20
- tsend "BLAST",cr # invoke BLAST in host mode
- ttrap 10 "ppp", "protocol",">"
- #
- if 1 or 2 return 0 # BLAST started!
- if reps goto .TRANS20
- #
- #
- return 1
- .END
- :
- ########################################
- #
- # HP3000 MPE
- #
- # NOTE: This script assumes you are using the
- # standard prompt. Problems may occur
- # otherwise.
- #
- :HP3000
- #
- .LOGON
- #
- # Initialize flag, get necessary information
- #
- #
- if not null @userid goto .LOG10 # verify existence of userid
- ask "enter USER.ACCT",@userid
- if null @userid
- return 0 # return ok no error
- end
- #
- .LOG10 # ask for password
- if null @password
- ask noecho "enter password", @password
- end
- #
- # Try to log in to the remote computer
- #
- reps 5 # repeat login procedure up to
- # 5 times
- #
- .LOG20
- tsend cr,"\006",cr,cr # get response from remote
- ttrap 5 ":"
- if 1 goto .LOG30
- if reps goto .LOG20
- #
- # Can't log in, inform user and exit
- #
- return 1
- #
- .LOG30
- tsend "HELLO ",@userid,";TERM=18",cr # enter userid
- ttrap 10 "WORD","HP3000" # wait for password prompt
- if 1 goto .LOG40
- if 2 return 0 # no password for username
- if reps goto .LOG20
- return 1
- #
- .LOG40
- tsend @password,cr # enter password
- ttrap 20 "HP3000" # trap for HP prompt
- if 1 return 0 # got a system prompt
- #
- # Incorrect userid/password - perhaps it was garbaged.
- # If we've only tried once, try again, otherwise exit.
- #
- if reps goto .LOG20
- return 1
- #
- # LOGOFF the remote system
- #
- .LOGOFF
- reps 4 # try 4 times
- #
- .LGF10
- tsend BREAK,cr # get system prompt
- ttrap 10 ":"
- if 1 goto .LGF20 # OK log off
- #
- if reps goto .LGF10
- #
- # Unable to get anything recognizable - abort
- #
- return 1
- #
- .LGF20 # hp logout
- tsend "BYE",cr
- return 0
- #
- #
- # UPLOAD a file to the remote system
- #
- .UPLOAD
- ask "enter filename to upload", @filename
- if null @filename return 0
- if exist @filename goto .UPL10
- werror "can't open ", @filename
- return 1
- #
- .UPL10
- ask "enter remote filename or <RETURN> to upload to system", @remotefn
- if null @remotefn goto .UPL20
- tsend cr
- ttrap 5 ":"
- if 0 return 1
- #
- # If no remote filename given, assume file already open on receiving system
- #
- tsend "EDITOR",cr
- ttrap 10 "/","CIERR"
- if 1 goto .UPL15
- return 1
- .UPL15
- tsend "A",cr
- ttrap 4
- .UPL20
- set @HLINDLY = @LINEDLY
- set @LINEDLY = "10"
- tupload @filename
- set @LINEDLY = @HLINDLY
- wait 2 idle
- tsend "\031"
- ttrap 5 "/"
- if 1
- tsend "K ",@remotefn,",UNN",cr
- ttrap 10 "/","OLD"
- if 1
- tsend "EXIT",cr
- return 0
- end
- if 2
- tsend "no"
- ttrap 10 "/"
- if 1 tsend "exit",cr
- ttrap 10 "CLEAR"
- if 1 tsend "Y",cr
- return 1
- end
- return 1
- #
- if null @remotefn return 0
- tsend "\031"
- ttrap 5 ":"
- if 1 return 0
- return 1
- end
- #
- # START file transfer on remote system
- #
- .TRANSFER
- reps 3
- #
- .TRANS10
- tsend BREAK,cr
- ttrap 5 ":","protocol","ppp" # see what's happening
- if 1 goto .TRANS20 # we need to invoke BLAST
- if 2 or 3 return 0 # BLAST is already started
- if reps goto .TRANS10
- #
- # Unable to get anything recognizable on remote computer - abort
- #
- return 1
- #
- .TRANS20
- tsend "RUN BLAST",cr # invoke BLAST in host mode
- ttrap 10 "ppp", "protocol","$","%"
- #
- if 1 or 2 return 0 # BLAST started!
- if reps goto .TRANS20
- #
- #
- return 1
- .END
-