home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / BLST10_2.ZIP / SAMPLES / SEND.SCR < prev    next >
Encoding:
Text File  |  1990-08-22  |  1.8 KB  |  61 lines

  1. #    SEND.SCR
  2. #
  3. #    This BLASTscript sends files in the background that were queued
  4. #    up in the forground through the SEND.BAT MS-DOS batch file.
  5. #
  6. #    The BLASTscript CHK4FILE.SCR is called and returns only when there
  7. #    is a file that needs to be sent. What is returned by CHK4FILE.SCR
  8. #    is the name of a file that is in the BLAST Command File format.
  9. #  
  10. #
  11. #
  12. EFWAIT ON
  13. #
  14. set @GROUND = "FOREGROUND"
  15. set @InEF = "0"                # set to "1" when in BLAST Transfer
  16. set @Lsync = "0"            # set to "1" when outstanding local msg
  17. set @Rsync = "0"            # set to "1" when outstanding remote msg
  18. set @Waiting = "0"            # set to "1" when Waiting for loc/rem msgs
  19. #
  20. call Chk4File                # wait for a file to be sent
  21. .eftrans
  22. Filetransfer                # start up file transfer (must have system type defined)
  23. If @EFERROR not = "0" goto .errlgn    # check for error logging on
  24. EFWAIT                    # wait for remote BLAST message
  25. set @InEF = "1"                # now we are in Error-Free Mode
  26. .again                
  27. File                    # Tell BLAST that we have a command file
  28. @EfFile                    # and give the command file's name
  29. #
  30. #  send a message to the remote for
  31. #  script file sync.
  32. #
  33. m
  34. LSYNC1
  35. #
  36. # get a message from the remote for
  37. #  script file sync.
  38. #
  39. g
  40. ;RSYNC1
  41.  
  42.  
  43. #    Must have two blank lines after the ;RSYNC because we are faking out
  44. #    a GET FILE command to tell the remote to send me a message
  45. #
  46. #
  47. let @Lsync = @Lsync + 1            # indicate that the message is being sent
  48. let @Rsync = @Rsync + 1            # indicate that the message is being rcv'd 
  49. set @Waiting = "1"            # indicate that we are waiting on messages
  50. call Chk4File                # check for another command file
  51. if @InEF = "0" goto .eftrans        # if not in Error-Free mode restart
  52. goto .again                # go give BLAST the name of a new command file
  53. #
  54. #
  55. # Error handling for Filetransfer logon would go here
  56. #
  57. .errlgn
  58. Display "Can't log onto remote system"
  59. quit
  60.     
  61.