home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / REFLECT.ZIP / UPLOAD.VAX < prev    next >
Encoding:
Text File  |  1989-06-16  |  6.7 KB  |  243 lines

  1. ;-------------------------------------------------------------------------
  2. ;
  3. ;  program  - UPLOAD.VAX
  4. ;  version  - 2.20
  5. ;  date        - 12/31/87
  6. ;  purpose  - This command file    uploads    the executable image of
  7. ;          the 'C' version of Walker, Richer    & Quinn's VAX file
  8. ;          program, VAXLINK.
  9. ;
  10. ; modifications:
  11. ;          1.03  Fixed bug with V1 -    was used for char delay    and VMS
  12. ;            version
  13. ;          2.00  Replace the    hex upload of the VAXLINK program, with    a
  14. ;            KERMIT type    upload.
  15. ;          2.10  Check for presence of WRQUPLOA.MAR before attempting
  16. ;            transmit.  If not present, give error message.
  17. ;          2.20  Allow upload.vax to    be invoked from    another    command
  18. ;            file without displaying verification prompt.
  19. ;          3.40  Self protection: set literal-escape    to "\\"
  20. ;
  21. ;-------------------------------------------------------------------------
  22. continue on
  23. ;
  24. ;    initialize error flag
  25. ;
  26. let v7 = ""
  27. let v8 = ""
  28. ;
  29. let v9 = value(literal-escape)
  30. set literal-escape "\\"
  31. ;
  32. ;    print upload banner
  33. ;
  34. display     "^[[>0s^[[2J"
  35. display    "^m^j"
  36. display    ")0^Nlqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk^M^J"
  37. display    "x^O ^[[7m   ^[[m"
  38. display      "^[[7m START UPLOAD HOST FILE TRANSFER PROGRAM TO VAX    ^[[m ^Nx^M^J"
  39. display     "mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj^O^M^J"
  40. if mid(pack(upper(v0)),1,3)<>'YES'
  41.   let v1 = ''
  42.   display  "^m^j^jDo you want to proceed with the file transfer upload <NO>? "
  43.   accept v1
  44.   let v1 = mid(v1,1,1)
  45.   if upper(v1) <> 'Y'
  46.     display "^m^j^jUpload aborted per user request.^m^j^j"
  47.     transmit "^m"
  48.     goto quit
  49.   endif
  50. endif
  51. ;
  52. ; read the host    prompt into v1
  53. ;
  54. transmit "^m^m"
  55. wait 00:00:10 for "^j^m"
  56. readhost 00:00:05 v1
  57. if not found
  58.    let v7 = "Host didn't respond to carriage return."
  59.    goto    timeout
  60. endif
  61. ;
  62. ; set the host prompt
  63. ;
  64. let v2 = "WRQ>>> "
  65. transmit "set prompt = \"$2\"^m"
  66. wait 00:00:25 for "^m^j"
  67. wait 00:00:05 for v2
  68. if not found
  69.    let v1 = ""
  70. endif
  71. ;
  72. ; check    vax/vms    version    number
  73. ;
  74. transmit 'write sys$output f$getsyi("version")^m'
  75. wait 00:00:10 for "^j^m"
  76. readhost 00:00:10 v4
  77. wait 0:0:10 for    v2
  78. if not found
  79.    let v7 =  "Couldn't determine version of VMS."
  80.    goto    timeout
  81. endif
  82. let V3 = mid(V4,2,2)
  83. let v4 = mid(V4,1,4)
  84. if V3 <    4
  85.     display    "^m^jThe VAXLINK file transfer program requires version 4.0^m^j"
  86.     display    "or greater to run. Unfortunately your VAX is running^m^j"
  87.     display    "version $4. Please contact our technical support^m^j"
  88.     display    "department at 1-206-325-4357 for assistance.^m^j^j"
  89.     goto leave
  90. endif
  91. ;
  92. ;    U P L O    A D   k    e r m i    t
  93. ;
  94. ;
  95. ;    Delete any existing copies
  96. ;
  97. transmit "delete wrquploa.mar;*^m"
  98. wait 0:0:30 for    v2
  99. if not found
  100.    let v7 = "No response when attempting to delete old upload file from VAX."
  101.    goto    timeout
  102. endif
  103. ;
  104. ;    Send UPLOAD program
  105. ;
  106. if not exist("wrquploa.mar")
  107.     let    v7="No WRQUPLOA.MAR file found in " & $dir & " directory."
  108.     let    v8="Please make sure all files are installed in this directory."
  109.     goto  timeout
  110. Endif
  111. transmit "copy tt: wrquploa.mar^m"
  112. wait 00:00:30 for "^m^j"
  113. if not found
  114.    let v7 = "No response when attempting to issue copy tt: command."
  115.    goto    timeout
  116. endif
  117. transmit wrquploa.mar prompt "^j"
  118. transmit "^z"
  119. wait 04:00 for v2
  120. if not found
  121.    let v7 = "Transmit of file failed after EOF."
  122.    goto    timeout
  123. endif
  124. ;
  125. ;    A s s e    m b l e      W R Q    u p l o    a d
  126. ;
  127. transmit "macro wrquploa.mar^m"
  128. wait 00:04:00 for "wrquploa.mar"
  129. wait 00:04:00 for v2
  130. if not found
  131.    let v7 = "No response after attempt to invoke MACRO."
  132.    let v8= "Please make sure MACRO program available on VAX."
  133.    goto    timeout
  134. endif
  135. transmit "write sys$output $severity^m"
  136. wait 00:00:10 for "^j^m"
  137. readhost 00:00:10 v4
  138. wait 00:10:00 for v2
  139. if not found
  140.    let v7 = "Couldn't read severity after MACRO."
  141.    goto    timeout
  142. endif
  143. let v4 = mid(v4,1,1)
  144. if v4 <> 1
  145.    let v7 = "MACRO of upload program failed."
  146.    let v8 = "An error may have occurred while transmitting program."
  147.    goto    timeout
  148. endif
  149. ;
  150. ;    L i n k      W R Q    u p l o    a d
  151. ;
  152. transmit "link wrquploa^m"
  153. wait 00:04:00  for v2
  154. if not found
  155.    let v7 = "No response after invoking LINK."
  156.    let v8 = "Make sure VAX linker is available."
  157.    goto    timeout
  158. endif
  159. transmit "write sys$output $severity^m"
  160. wait 00:10:00 for "^j^m"
  161. readhost 00:00:10 v4
  162. wait 00:10:00 for v2
  163. if not found
  164.    let v7 =  "Couldn't read severity after LINK."
  165.    goto    timeout
  166. endif
  167. let v4 = mid(v4,1,1)
  168. if v4 <> 1
  169.    let v7 =  "Error linking file transfer upload program."
  170.    goto    timeout
  171. endif
  172. ;
  173. ;    U p l o    a d   V    a x l i    n k
  174. ;
  175. if not exist("vaxlink.exe")
  176.     let    v7 = "Couldn't find VAXLINK.EXE program in "& $dir &" directory."
  177.     let    v8 = "Please make sure all files installed in this directory."
  178.     goto timeout
  179. endif
  180. transmit "run wrquploa^m"
  181. wait 00:01:00 for "go^m^j"
  182. if not found
  183.    let v7 =  "No response after invoking upload program."
  184.    goto    timeout
  185. endif
  186. ksend vaxlink.exe binary
  187. if error
  188.    wait    00:00:03
  189.    transmit "^c"
  190.    wait    00:00:15 for v2
  191.    let v7 =  "Error uploading VAXLINK to host.  Try renaming"
  192.    let v8 =  "AUTOEXEC.BAT and CONFIG.SYS files, reboot and try again."
  193.    goto    timeout
  194. endif
  195. ;
  196. ; E x i    t
  197. ;
  198. wait 00:00:10 for v2
  199. if not found
  200.    let v7 =  "VAX prompt not received after kermit upload"
  201.    goto    timeout
  202. endif
  203. display    "^m^j"
  204. display    ")0^Nlqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk^M^J"
  205. display    "x^O ^[[7m   ^[[m"
  206. display      "^[[7m     UPLOAD TO HOST SUCCESSFULLY COMPLETED         ^[[m ^Nx^M^J"
  207. display     "mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj^O^M^J^J"
  208. set character-delay 0
  209. transmit "delete wrquploa.*;*/log^m"
  210. :fixprompt
  211. transmit "^m"
  212. wait 00:01:00 for v2
  213. if length(v1) <> 0
  214.   transmit "set prompt = \"" & V1 & "\"^m"
  215. else
  216.   transmit "set prompt^m"
  217. endif
  218. :quit
  219. set literal-escape "$9$9"
  220. continue off
  221. stop
  222. ;
  223. ; D i s    p l a y      E r r    o r   M    e s s a    g e s
  224. ;
  225. :timeout
  226. display    "^m^j"
  227. display    ")0^Nlqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk^M^J"
  228. display    "x^O ^[[7m   ^[[m"
  229. display      "^[[7m             UPLOAD TO HOST FAILED                 ^[[m ^Nx^M^J"
  230. display     "mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj^O^M^J^J"
  231. display    "Error was:^m^j"
  232. display    " "&v7&"^m^j"
  233. display    " "&v8&"^m^j^j"
  234. display    "REFLECTION Serial number is: "    & $serial & "^m^j^j"
  235. display    "Please try the upload again. If the problem persists, ^m^j"
  236. display    "PLEASE NOTE THE ERROR MESSAGE AND SERIAL NUMBER ABOVE!! and^m^j"
  237. display    "call Walker, Richer & Quinn technical support from a phone^m^j"
  238. display    "located near the PC.  The technical representative may need^m^j"
  239. display    "you to repeat the upload in order to resolve the problem.^m^j"
  240. display    "Technical Support Hotline: (206) 325-4357.^m^j"
  241. set character-delay 3
  242. goto fixprompt
  243.