home *** CD-ROM | disk | FTP | other *** search
/ RBBS in a Box Volume 1 #2 / RBBS_vol1_no2.iso / add2 / jmd4tlx.zip / JXFER.DOC < prev    next >
Text File  |  1989-03-20  |  15KB  |  382 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.                      ENHANCED JMODEM FILE TRANSFERS
  28.  
  29.                                  using
  30.  
  31.                         THE TELIX SALT LANGUAGE
  32.  
  33.                                    by
  34.  
  35.                           Michael K. Bozovich
  36.  
  37.                                 03/20/89
  38.  
  39.  
  40.  
  41.  
  42.  
  43.     -----PHILOSOPHY------------------------------------------------------
  44.  
  45.  
  46.     When I first began using the Jmodem protocol, I was blown away!
  47.     I had been using Zmodem and thought that there was no way to beat
  48.     it's file transfer rate.  At the same time, I was dismayed by the
  49.     limitation of one file per transfer.  After considering this dilemma,
  50.     I set out to to enhance the capabilities of the basic Jmodem driver
  51.     in the hopes that the use of this advanced protocol would become
  52.     widespread.  This set of scripts is at least a step in the right
  53.     direction. . .
  54.  
  55.  
  56.     This set of TELIX 3.11 script files will allow the seamless (almost)
  57.     integration of the JMODEM protocol into the TELIX program.
  58.  
  59.  
  60.  
  61.  
  62.     -----PROGRAMS--------------------------------------------------------
  63.  
  64.  
  65.  
  66.     The files in this package should consist of:
  67.  
  68.  
  69.           JXFER.DOC          // These instructions.
  70.  
  71.           JUP.SLT            // Source code for the upload stub.
  72.           JUP.SLC            // Compiled upload stub.
  73.  
  74.           JDOWN.SLT          // Source code for the download stub.
  75.           JDOWN.SLC          // Compiled download stub.
  76.  
  77.           JXFER.SLT          // Source code for the "inner workings".
  78.           JXFER.SLC          // Compiled "inner workings".
  79.  
  80.           JSIZE.C            // Source code for the "kludge".
  81.           JSIZE.EXE          // Compiled "kludge".
  82.  
  83.           JMODEM.COM         // The Jmodem driver.
  84.           JMODEM.DOC         // The Jmodem Documentation.
  85.  
  86.  
  87.  
  88.  
  89.     -----INSTALLATION----------------------------------------------------
  90.  
  91.  
  92.     A. The first step in integrating Jmodem is to tell TELIX the following
  93.        in the "File transfer protocols" Setup screen:
  94.  
  95.           1.  Key               -  Whatever you like. (I use "J".)
  96.           2.  Protocol Name     - "Jmodem"
  97.           3.  Upload Filename   - "JUP"
  98.           4.  Download Filename - "JDOWN"
  99.           5.  BAT or Script     - "Script"
  100.           6.  DL Name           - "N"
  101.  
  102.  
  103.     Your screen should resemble this:
  104.  
  105.     ╒═╡ File transfer protocols ╞══════════════════════════════════════════╕
  106.     │                                                                      │
  107.     │ External           Key   Protocol    Upload   Download  BAT or   DL  │
  108.     │ Protocols                Name       Filename  Filename  Script  Name │
  109.     │                                                                      │
  110.     │ A.................  J    Jmodem        JUP    JDOWN     Script   N   │
  111.     │                                                                      │
  112.     │ B.................                                                   │
  113.     │                                                                      │
  114.  
  115.  
  116.  
  117.     B. The next step is making sure that all of the necessary files are where
  118.        they belong:
  119.  
  120.           1.  The following files belong in the "Script directory".
  121.               This is where you told TELIX to look for script files.
  122.               (Option "C" in the filename/path setup.)
  123.  
  124.                               JUP.SLC
  125.                               JDOWN.SLC
  126.                               JXFER.SLC
  127.  
  128.           2.  These files must reside somewhere in the DOS PATH.
  129.               If they are not there, don't say I didn't tell you!
  130.  
  131.                               JMODEM.COM
  132.                               JSIZE.EXE
  133.  
  134.  
  135.     C. That's all there is to it.  You can begin using JMODEM with
  136.        TELIX as though it came with the package!
  137.  
  138.  
  139.     -----USAGE-----------------------------------------------------------
  140.  
  141.     These script files provide much more versatility than the standard
  142.     "BATCH file" method of adding an external protocol.  These are some
  143.     points to consider:
  144.  
  145.           1.  UPLOAD -
  146.  
  147.               Although some BBS's don't support it (yet), for those that
  148.               do, you can now use JMODEM to Batch Upload as many filespecs
  149.               as you can fit in the "upload box".  You are free to use
  150.               wildcards as well.  All I ask (and the script file requires!),
  151.               is that you include ONE OR MORE SPACES between multiple
  152.               filespecs.
  153.  
  154.           2.  DOWNLOAD -
  155.  
  156.               Although TELIX doesn't allow multiple filespecs to be
  157.               entered in the "download box", the JDOWN script file
  158.               will accept them without a hitch.  This was accomplished
  159.               by supplying an emulation of the "download box".  This
  160.               WILL NOT WORK if you didn't tell TELIX to not prompt
  161.               for the download file name as instructed above!
  162.  
  163.               You MAY NOT use wildcards in your download filespecs.
  164.               If you attempt to do so, the script will gripe about
  165.               it and grind to a halt.  Sorry. I will include this
  166.               feature as soon as JMODEM recognizes the name of the
  167.               incoming file.
  168.  
  169.           3.  PERFORMANCE LOGGING -
  170.  
  171.               In addition to the features described above, this set
  172.               of scripts will create and maintain a log file of all
  173.               attempted JMODEM transfers.  If you have defined a
  174.               TELIX environment variable as described in the TELIX
  175.               documentation, the file will be placed there.  If not,
  176.               the file will be written indiscriminately to whatever
  177.               drive and subdirectory you happen to be in at the time.
  178.  
  179.               This file is named JMODEM.LOG (catchy, eh?), and is
  180.               based on the log file produced by the DSZ.COM program.
  181.  
  182.               Here is a sample:
  183.  
  184.                           TELIX JMODEM File Transfer Log
  185.  
  186.      S   7504   2400 bps      0 cps     17s 03-19-89 *ABORTED* \config.sys
  187.      R   8388   2400 bps    247 cps     34s 03-19-89 COMPLETED c:\dl\any.zip
  188.      S  15112   2400 bps      0 cps     17s 03-19-89 *ABORTED* a:\autoexec.bat
  189.      R  26796   2400 bps    245 cps    109s 03-19-89 COMPLETED f:\dl\foo.zip
  190.      R  18208   2400 bps    247 cps     74s 03-19-89 COMPLETED .\bar.zip
  191.  
  192.               - The first field indicates whether a (S)end or a (R)eceive
  193.                 was attempted.
  194.  
  195.               - The second field is the number of bytes transferred.
  196.  
  197.  
  198.               - The third field is the baud rate used for the transfer.
  199.  
  200.               - The fourth field is a measure of the approximate trans-
  201.                 fer speed in characters per second.  Actual transfer
  202.                 rates will be greater than those reported.  This rate
  203.                 is set to zero if the transfer was aborted.
  204.  
  205.               - The fifth field is an approximation of the transfer
  206.                 time in seconds.  Since this time includes the time
  207.                 required to load the JMODEM driver from disk, it's
  208.                 accuracy depends largly on the speed of the drive
  209.                 used.  Actual transfer times will be less than those
  210.                 reported.
  211.  
  212.               - Field six is the date the transfer was attempted.
  213.  
  214.               - Field seven indicates whether the transfer met
  215.                 with success.
  216.  
  217.               - Finally, field eight is the complete specification
  218.                 of the file involved.
  219.  
  220.           4.  PATH SUPPORT -
  221.  
  222.               The pathnames used in uploading/downloading work ex-
  223.               actly as described in the TELIX documentation.  Here
  224.               is a review:
  225.  
  226.               - If you specify a path in the filespec, the script
  227.                 will respect your wishes.
  228.  
  229.               - If you do not specify a path, the script will use
  230.                 the one you specified in 'setup'.
  231.  
  232.               - If you did not specify a path in 'setup' (shame!),
  233.                 the file will end up/come from the current directory.
  234.  
  235.               - When uploading, if any single file is not found,
  236.                 the script will note it in the log and continue
  237.                 with the next file.  The fact is not noted on the
  238.                 terminal.
  239.  
  240.               - When downloading, if any single file already exists,
  241.                 the script will make an entry of "*ABORTED*" in the
  242.                 log and continue with the next file.  This fact is
  243.                 noted on the terminal.  NOTE: This works differently
  244.                 than the method advertised in the JMODEM.DOC file.
  245.                 This is strictly MY DOING and IS NOT A BUG in JMODEM!
  246.  
  247.           5.  SOURCES OF TROUBLE -
  248.  
  249.                 This set of scripts uses up AT LEAST TWO file handles
  250.                 at ANY GIVEN POINT during execution.  The Jmodem driver
  251.                 may use up more during IT'S execution.  If you are ex-
  252.                 periencing problems, try beefing up "FILES=" in your
  253.                 CONFIG.SYS.
  254.  
  255.                 If you are still having problems, go back and re-check
  256.                 your installation.  If you do it 'by the numbers' and
  257.                 STILL can't get it to work as advertised, you are wel-
  258.                 come to contact me as described later in this document.
  259.  
  260.  
  261.  
  262.     -----TECHNICAL INFO--------------------------------------------------
  263.  
  264.  
  265.           For those interested, here is an overview of how this system
  266.           works:
  267.  
  268.               A. JUP.SLC -
  269.  
  270.                  This script simply calls JXFER.SLT with a parameter
  271.                  indicating UPLOAD.
  272.  
  273.               B. JDOWN.SLC -
  274.  
  275.                  This script draws a "download box" similar to the
  276.                  one provided by TELIX.  The difference is that you
  277.                  can specify as many filespecs as you wish.  After
  278.                  the script obtains the file(s) to download, it checks
  279.                  for wild cards in the list.  If any are found, it
  280.                  prints a diagnostic and aborts.  If the user followed
  281.                  instructions, it calls JXFER.SLC with a parameter
  282.                  indicating DOWNLOAD.
  283.  
  284.               C. JXFER.SLC -
  285.  
  286.                  This script does all the work involved with the file
  287.                  transfer/logging functions.  Based on the parameter
  288.                  received, it determines whether it is going to Send
  289.                  or Receive files.  It then proceeds to get the comm
  290.                  port number from TELIX and checks for prior existance
  291.                  of the log file.  If the log file is not found, it is
  292.                  created and the header is written.  Next, the first of
  293.                  two loops is entered.  These loops are best described
  294.                  using pseudo code:
  295.  
  296.  
  297.                    while (there are still files to transfer)
  298.                       {
  299.                       strip off a file name and qualify it with
  300.                       regards to drive/path information;
  301.  
  302.                       if (uploading)
  303.                          while (this filespec has wildcards)
  304.                             {
  305.                             get the first/next matching file;
  306.                             upload it;
  307.                             make a log entry;
  308.                             }
  309.                       else
  310.                          if (file already exists)
  311.                             print diagnostic;
  312.                          else
  313.                             {
  314.                             download it;
  315.                             make a log entry;
  316.                             }
  317.                       }
  318.  
  319.  
  320.               D. JSIZE.EXE - (The kludge)
  321.  
  322.                  This program was necessary to overcome a limitation
  323.                  of the SALT language.  Basically, it is impossible
  324.                  to determine the size of a file in between calls
  325.                  to the wild card expansion.  Since I need to call
  326.                  the logging function for every file transferred, and
  327.                  the log needs the file size, I came up with this
  328.                  workaround using a simple "C" program.  The program
  329.                  writes a 7 byte file that contains the size in bytes
  330.                  of the file passed on the command line.  The script
  331.                  program later picks up this information and uses it
  332.                  in the log entry.  This temporary file is named
  333.                  "JSIZE.$$$" and is erased just before JXFER.SLC re-
  334.                  turns control to the terminal.
  335.  
  336.               E. ERRORS -
  337.  
  338.                  I have implemented absolutely NO error checking
  339.                  where opening/closing/reading/writing of files
  340.                  are concerned.  The files that could be affected
  341.                  by this are associated with the logging function
  342.                  and are in no way associated with the actual trans-
  343.                  fer of files.
  344.  
  345.               If you want more details, check out the source code
  346.               listings.  They are generously commented.
  347.  
  348.  
  349.  
  350.     -----DETAILS---------------------------------------------------------
  351.  
  352.  
  353.           1.  While I have invested quite a bit of time in both
  354.               creating and testing these programs, I make ABSOLUTELY
  355.               NO GUARANTEE that they will work with your setup!
  356.               I also REFUSE TO BE HELD LIABLE for any problems they
  357.               may cause you.  Use them at your own risk.
  358.  
  359.           2.  While I DO NOT request money for this work, I will
  360.               cheerfully accept any donations.  Let your conscience
  361.               be your guide.
  362.  
  363.           3.  If you are at the end of your rope and are contemplating
  364.               suicide, you may contact me at the following address:
  365.  
  366.                       MICHAEL K. BOZOVICH
  367.                       P.O. Box 878
  368.                       Godfrey, IL 62035-0878
  369.  
  370.               I will do what I can to help.
  371.  
  372.           4.  I hereby dedicate these programs to the Public Domain.
  373.               Distribute them as far and wide as you are able.  All I
  374.               ask is that you distribute this set of files EXACTLY AS
  375.               YOU RECEIVED THEM!  Adhering to this simple request will
  376.               seriously reduce the chances of my contracting an ulcer.
  377.               It will also give me faith to perhaps provide similar
  378.               functionality to other comm programs...
  379.  
  380.           5.  Above all else, ENJOY the Jmodem protocol!
  381.  
  382.