home *** CD-ROM | disk | FTP | other *** search
- ;-------------------------------------------------------------------------
- ;
- ; program - UPLOAD.VAX
- ; version - 2.20
- ; date - 12/31/87
- ; purpose - This command file uploads the executable image of
- ; the 'C' version of Walker, Richer & Quinn's VAX file
- ; program, VAXLINK.
- ;
- ; modifications:
- ; 1.03 Fixed bug with V1 - was used for char delay and VMS
- ; version
- ; 2.00 Replace the hex upload of the VAXLINK program, with a
- ; KERMIT type upload.
- ; 2.10 Check for presence of WRQUPLOA.MAR before attempting
- ; transmit. If not present, give error message.
- ; 2.20 Allow upload.vax to be invoked from another command
- ; file without displaying verification prompt.
- ; 3.40 Self protection: set literal-escape to "\\"
- ;
- ;-------------------------------------------------------------------------
- continue on
- ;
- ; initialize error flag
- ;
- let v7 = ""
- let v8 = ""
- ;
- let v9 = value(literal-escape)
- set literal-escape "\\"
- ;
- ; print upload banner
- ;
- display "^[[>0s^[[2J"
- display "^m^j"
- display ")0^Nlqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk^M^J"
- display "x^O ^[[7m ^[[m"
- display "^[[7m START UPLOAD HOST FILE TRANSFER PROGRAM TO VAX ^[[m ^Nx^M^J"
- display "mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj^O^M^J"
- if mid(pack(upper(v0)),1,3)<>'YES'
- let v1 = ''
- display "^m^j^jDo you want to proceed with the file transfer upload <NO>? "
- accept v1
- let v1 = mid(v1,1,1)
- if upper(v1) <> 'Y'
- display "^m^j^jUpload aborted per user request.^m^j^j"
- transmit "^m"
- goto quit
- endif
- endif
- ;
- ; read the host prompt into v1
- ;
- transmit "^m^m"
- wait 00:00:10 for "^j^m"
- readhost 00:00:05 v1
- if not found
- let v7 = "Host didn't respond to carriage return."
- goto timeout
- endif
- ;
- ; set the host prompt
- ;
- let v2 = "WRQ>>> "
- transmit "set prompt = \"$2\"^m"
- wait 00:00:25 for "^m^j"
- wait 00:00:05 for v2
- if not found
- let v1 = ""
- endif
- ;
- ; check vax/vms version number
- ;
- transmit 'write sys$output f$getsyi("version")^m'
- wait 00:00:10 for "^j^m"
- readhost 00:00:10 v4
- wait 0:0:10 for v2
- if not found
- let v7 = "Couldn't determine version of VMS."
- goto timeout
- endif
- let V3 = mid(V4,2,2)
- let v4 = mid(V4,1,4)
- if V3 < 4
- display "^m^jThe VAXLINK file transfer program requires version 4.0^m^j"
- display "or greater to run. Unfortunately your VAX is running^m^j"
- display "version $4. Please contact our technical support^m^j"
- display "department at 1-206-325-4357 for assistance.^m^j^j"
- goto leave
- endif
- ;
- ; U P L O A D k e r m i t
- ;
- ;
- ; Delete any existing copies
- ;
- transmit "delete wrquploa.mar;*^m"
- wait 0:0:30 for v2
- if not found
- let v7 = "No response when attempting to delete old upload file from VAX."
- goto timeout
- endif
- ;
- ; Send UPLOAD program
- ;
- if not exist("wrquploa.mar")
- let v7="No WRQUPLOA.MAR file found in " & $dir & " directory."
- let v8="Please make sure all files are installed in this directory."
- goto timeout
- Endif
- transmit "copy tt: wrquploa.mar^m"
- wait 00:00:30 for "^m^j"
- if not found
- let v7 = "No response when attempting to issue copy tt: command."
- goto timeout
- endif
- transmit wrquploa.mar prompt "^j"
- transmit "^z"
- wait 04:00 for v2
- if not found
- let v7 = "Transmit of file failed after EOF."
- goto timeout
- endif
- ;
- ; A s s e m b l e W R Q u p l o a d
- ;
- transmit "macro wrquploa.mar^m"
- wait 00:04:00 for "wrquploa.mar"
- wait 00:04:00 for v2
- if not found
- let v7 = "No response after attempt to invoke MACRO."
- let v8= "Please make sure MACRO program available on VAX."
- goto timeout
- endif
- transmit "write sys$output $severity^m"
- wait 00:00:10 for "^j^m"
- readhost 00:00:10 v4
- wait 00:10:00 for v2
- if not found
- let v7 = "Couldn't read severity after MACRO."
- goto timeout
- endif
- let v4 = mid(v4,1,1)
- if v4 <> 1
- let v7 = "MACRO of upload program failed."
- let v8 = "An error may have occurred while transmitting program."
- goto timeout
- endif
- ;
- ; L i n k W R Q u p l o a d
- ;
- transmit "link wrquploa^m"
- wait 00:04:00 for v2
- if not found
- let v7 = "No response after invoking LINK."
- let v8 = "Make sure VAX linker is available."
- goto timeout
- endif
- transmit "write sys$output $severity^m"
- wait 00:10:00 for "^j^m"
- readhost 00:00:10 v4
- wait 00:10:00 for v2
- if not found
- let v7 = "Couldn't read severity after LINK."
- goto timeout
- endif
- let v4 = mid(v4,1,1)
- if v4 <> 1
- let v7 = "Error linking file transfer upload program."
- goto timeout
- endif
- ;
- ; U p l o a d V a x l i n k
- ;
- if not exist("vaxlink.exe")
- let v7 = "Couldn't find VAXLINK.EXE program in "& $dir &" directory."
- let v8 = "Please make sure all files installed in this directory."
- goto timeout
- endif
- transmit "run wrquploa^m"
- wait 00:01:00 for "go^m^j"
- if not found
- let v7 = "No response after invoking upload program."
- goto timeout
- endif
- ksend vaxlink.exe binary
- if error
- wait 00:00:03
- transmit "^c"
- wait 00:00:15 for v2
- let v7 = "Error uploading VAXLINK to host. Try renaming"
- let v8 = "AUTOEXEC.BAT and CONFIG.SYS files, reboot and try again."
- goto timeout
- endif
- ;
- ; E x i t
- ;
- wait 00:00:10 for v2
- if not found
- let v7 = "VAX prompt not received after kermit upload"
- goto timeout
- endif
- display "^m^j"
- display ")0^Nlqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk^M^J"
- display "x^O ^[[7m ^[[m"
- display "^[[7m UPLOAD TO HOST SUCCESSFULLY COMPLETED ^[[m ^Nx^M^J"
- display "mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj^O^M^J^J"
- set character-delay 0
- transmit "delete wrquploa.*;*/log^m"
- :fixprompt
- transmit "^m"
- wait 00:01:00 for v2
- if length(v1) <> 0
- transmit "set prompt = \"" & V1 & "\"^m"
- else
- transmit "set prompt^m"
- endif
- :quit
- set literal-escape "$9$9"
- continue off
- stop
- ;
- ; D i s p l a y E r r o r M e s s a g e s
- ;
- :timeout
- display "^m^j"
- display ")0^Nlqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk^M^J"
- display "x^O ^[[7m ^[[m"
- display "^[[7m UPLOAD TO HOST FAILED ^[[m ^Nx^M^J"
- display "mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj^O^M^J^J"
- display "Error was:^m^j"
- display " "&v7&"^m^j"
- display " "&v8&"^m^j^j"
- display "REFLECTION Serial number is: " & $serial & "^m^j^j"
- display "Please try the upload again. If the problem persists, ^m^j"
- display "PLEASE NOTE THE ERROR MESSAGE AND SERIAL NUMBER ABOVE!! and^m^j"
- display "call Walker, Richer & Quinn technical support from a phone^m^j"
- display "located near the PC. The technical representative may need^m^j"
- display "you to repeat the upload in order to resolve the problem.^m^j"
- display "Technical Support Hotline: (206) 325-4357.^m^j"
- set character-delay 3
- goto fixprompt