


     SSSSZZZZ((((1111))))                   XXXXEEEENNNNIIIIXXXX 3333....0000 ((((OOOOMMMMEEEENNNN))))                    SSSSZZZZ((((1111))))



     NNNNAAAAMMMMEEEE
          sx, sb, sz - XMODEM, YMODEM, ZMODEM file send

     SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
          sz [-++++1111aaaabbbbddddeeeeffffkkkkLLLLllllNNNNnnnnooooppppqqqqTTTTttttuuuuvvvvyyyyYYYY] _f_i_l_e ...
          sb [-1111aaaaddddffffkkkkqqqqttttuuuuvvvv] _f_i_l_e ...
          sx [-1111aaaakkkkqqqqttttuuuuvvvv] _f_i_l_e
          sz [-1111ooooqqqqttttvvvv] ----cccc CCCCOOOOMMMMMMMMAAAANNNNDDDD
          sz [-1111ooooqqqqttttvvvv] ----iiii CCCCOOOOMMMMMMMMAAAANNNNDDDD

     DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
          SSSSzzzz uses the ZMODEM, YMODEM or XMODEM error correcting
          protocol to send one or more files over a serial port to a
          variety of programs running under PC-DOS, CP/M, Unix, VMS,
          and other operating systems.


          The first form of sssszzzz sends one or more files with ZMODEM
          protocol.

          ZMODEM greatly simplifies file transfers compared to XMODEM.
          In addition to a friendly user interface, ZMODEM provides
          Personal Computer and other users an efficient, accurate,
          and robust file transfer method.

          ZMODEM provides complete EEEENNNNDDDD----TTTTOOOO----EEEENNNNDDDD data integrity between
          application programs.  ZMODEM's 32 bit CRC catches errors
          that sneak into even the most advanced networks.

          Advanced file management features include AutoDownload
          (Automatic file Download initiated without user
          intervention), Crash Recovery, selective file transfers, and
          preservation of exact file date and length.

          Output from another program may be piped to sssszzzz for
          transmission by denoting standard input with "-":
                                 ps -ef | sz -
          The program output is transmitted with the filename sPID.sz
          where PID is the process ID of the sssszzzz program.  If the
          environment variable OOOONNNNAAAAMMMMEEEE is set, that is used instead.  In
          this case, the Unix command:
                           ONAME=con ps -ef|sz -ay -
          will send a "file" to the PC-DOS console display.  The ----yyyy
          option instructs the receiver to open the file for writing
          unconditionally.  The ----aaaa option causes the receiver to
          convert Unix newlines to PC-DOS carriage returns and
          linefeeds.


          The second form is invoked as ssssbbbb to batch send one or more
          files with ZMODEM or YMODEM protocol.  The initial ZMODEM
          initialization is not sent.  When requested by the receiver,



     Page 1                                          (printed 9/30/89)






     SSSSZZZZ((((1111))))                   XXXXEEEENNNNIIIIXXXX 3333....0000 ((((OOOOMMMMEEEENNNN))))                    SSSSZZZZ((((1111))))



          ssssbbbb supports YYYYMMMMOOOODDDDEEEEMMMM----gggg with "cbreak" tty mode, XON/XOFF flow
          control, and interrupt character set to CAN (^X).  YYYYMMMMOOOODDDDEEEEMMMM----gggg
          (Professional-YAM gggg option) increases throughput over error
          free channels (direct connection, X.PC, etc.) by not
          acknowledging each transmitted sector.

          On Unix systems, additional information about the file is
          transmitted.  If the receiving program uses this
          information, the transmitted file length controls the exact
          number of bytes written to the output dataset, and the
          modify time and file mode are set accordingly.


          The third form of sssszzzz is invoked as ssssxxxx to send a single _f_i_l_e
          with XXXXMMMMOOOODDDDEEEEMMMM or XXXXMMMMOOOODDDDEEEEMMMM----1111kkkk protocol (sometimes incorrectly
          called "ymodem").  The user must supply the file name to
          both sending and receiving programs.

          Iff sssszzzz is invoked with $SHELL set and iff that variable
          contains the string _r_s_h or _r_k_s_h (restricted shell), sz
          operates in restricted mode.  Restricted mode restricts
          pathnames to the current directory and PUBDIR (usually
          /usr/spool/uucppublic) and/or subdirectories thereof.


          The fourth form sends a single COMMAND to a ZMODEM receiver
          for execution.  SSSSzzzz exits with the COMMAND return value.  If
          COMMAND includes spaces or characters special to the shell,
          it must be quoted.


          The fifth form sends a single COMMAND to a ZMODEM receiver
          for execution.  SSSSzzzz exits as soon as the receiver has
          correctly received the command, before it is executed.


          If sz is invoked with stdout and stderr to different
          datasets, Verbose is set to 2, causing frame by frame
          progress reports to stderr.  This may be disabled with the qqqq
          option.

          The meanings of the available options are:

          ++++    Instruct the receiver to append transmitted data to an
               existing file (ZMODEM only).
          1111    Use file descriptor 1 for ioctls and reads.  By
               default, file descriptor 0 is used.  This option allows
               sssszzzz to be used with the _P_r_o_f_e_s_s_i_o_n_a_l-_Y_A_M $ command.
          aaaa    Convert NL characters in the transmitted file to CR/LF.
               This is done by the sender for XMODEM and YMODEM, by
               the receiver for ZMODEM.
          bbbb    (ZMODEM) Binary override: transfer file without any



     Page 2                                          (printed 9/30/89)






     SSSSZZZZ((((1111))))                   XXXXEEEENNNNIIIIXXXX 3333....0000 ((((OOOOMMMMEEEENNNN))))                    SSSSZZZZ((((1111))))



               translation.
          cccc CCCCOOOOMMMMMMMMAAAANNNNDDDD
               Send COMMAND to the receiver for execution, return with
               COMMAND's exit status.
          dddd    Change all instances of "." to "/" in the transmitted
               pathname.  Thus, C.omenB0000 (which is unacceptable to
               MSDOS or CP/M) is transmitted as C/omenB0000.  If the
               resultant filename has more than 8 characters in the
               stem, a "." is inserted to allow a total of eleven.
          eeee    Escape all control characters; normally XON, XOFF, DLE,
               CR-@-CR, and Ctrl-X are escaped.
          ffff    Send Full pathname.  Normally directory prefixes are
               stripped from the transmitted filename.
          iiii CCCCOOOOMMMMMMMMAAAANNNNDDDD
               Send COMMAND to the receiver for execution, return
               Immediately upon the receiving program's successful
               recption of the command.
          kkkk    (XMODEM/YMODEM) Send files using 1024 byte blocks
               rather than the default 128 byte blocks.  1024 byte
               packets speed file transfers at high bit rates.
               (ZMODEM streams the data for the best possible
               throughput.)
          LLLL NNNN  Use ZMODEM sub-packets of length N.  A larger N (32 <=
               N <= 1024) gives slightly higher throughput, a smaller
               N speeds error recovery.  The default is 128 below 300
               baud, 256 above 300 baud, or 1024 above 2400 baud.
          llll NNNN  Wait for the receiver to acknowledge correct data every
               NNNN (32 <= N <= 1024) characters.  This may be used to
               avoid network overrun when XOFF flow control is
               lacking.
          nnnn    (ZMODEM) Send each file if destination file does not
               exist.  Overwrite destination file if source file is
               newer than the destination file.
          NNNN    (ZMODEM) Send each file if destination file does not
               exist.  Overwrite destination file if source file is
               newer or longer than the destination file.
          oooo    (ZMODEM) Disable automatic selection of 32 bit CRC.
          pppp    (ZMODEM) Protect existing destination files by skipping
               transfer if the destination file exists.
          qqqq    Quiet suppresses verbosity.
          rrrr    (ZMODEM) Resume interrupted file transfer.  If the
               source file is longer than the destination file, the
               transfer commences at the offset in the source file
               that equals the length of the destination file.
          tttt ttttiiiimmmm
               Change timeout to _t_i_m tenths of seconds.
          uuuu    Unlink the file after successful transmission.
          vvvv    Verbose causes a list of file names to be appended to
               /tmp/szlog .  More v's generate more output.
          yyyy    Instruct a ZMODEM receiving program to overwrite any
               existing file with the same name.
          YYYY    Instruct a ZMODEM receiving program to overwrite any



     Page 3                                          (printed 9/30/89)






     SSSSZZZZ((((1111))))                   XXXXEEEENNNNIIIIXXXX 3333....0000 ((((OOOOMMMMEEEENNNN))))                    SSSSZZZZ((((1111))))



               existing file with the same name, and to skip any
               source files that do have a file with the same pathname
               on the destination system.

     EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
          ZZZZMMMMOOOODDDDEEEEMMMM FFFFiiiilllleeee TTTTrrrraaaannnnssssffffeeeerrrr
          $$$$ sssszzzz ----aaaa ****....cccc
          This single command transfers all .c files in the current
          Unix directory with conversion (----aaaa) to end of line
          conventions appropriate to the receiving environment.  With
          ZMODEM AutoDownload enabled, Professional-YAM  and ZCOMM
          will automatically recieve the files after performing a
          security check.

          $$$$ sssszzzz ----YYYYaaaannnn ****....cccc ****....hhhh
          Send only the .c and .h files that exist on both systems,
          and are newer on the sending system than the corresponding
          version on the receiving system, converting Unix to DOS text
          format.

          ZZZZMMMMOOOODDDDEEEEMMMM CCCCoooommmmmmmmaaaannnndddd DDDDoooowwwwnnnnllllooooaaaadddd
           cpszall:all
              sz -c "c:;cd /yam/dist"
              sz -ya $(YD)/*.me
              sz -yqb y*.exe
              sz -c "cd /yam"
              sz -i "!insms"
          This Makefile fragment uses sssszzzz to issue commands to
          Professional-YAM to change current disk and directory.
          Next, sssszzzz transfers the ._m_e files from the $YD directory,
          commanding the receiver to overwrite the old files and to
          convert from Unix end of line conventions to PC-DOS
          conventions.  The third line transfers some ._e_x_e files.  The
          fourth and fifth lines command Pro-YAM to change directory
          and execute a PC-DOS batch file _i_n_s_m_s . Since the batch file
          takes considerable time, the ----iiii form is used to allow sssszzzz to
          exit immediately.

          XXXXMMMMOOOODDDDEEEEMMMM FFFFiiiilllleeee TTTTrrrraaaannnnssssffffeeeerrrr (To Crosstalk)
          $ ssssxxxx ----aaaa ffffoooooooo....cccc
          EEEESSSSCCCC
          rrrrxxxx ffffoooooooo....cccc
          The above three commands transfer a single file from Unix to
          a PC and Crosstalk with _s_z translating Unix newlines to DOS
          CR/LF.  This combination is much slower than ZMODEM.

     SSSSEEEEEEEE AAAALLLLSSSSOOOO
          rz(omen), ZMODEM.DOC, YMODEM.DOC, Professional-YAM,
          IMP(CP/M), sq(omen), todos(omen), tocpm(omen), tomac(omen),
          yam(omen)

          Compile time options required for various operating systems



     Page 4                                          (printed 9/30/89)






     SSSSZZZZ((((1111))))                   XXXXEEEENNNNIIIIXXXX 3333....0000 ((((OOOOMMMMEEEENNNN))))                    SSSSZZZZ((((1111))))



          are described in the source file.

     VVVVMMMMSSSS VVVVEEEERRRRSSSSIIIIOOOONNNN
          The VMS version does not transmit the file date.  The VMS
          version calculates the file length by reading the file and
          counting the bytes.

          The VMS version does not support YMODEM-g or ZMODEM.

          When VMS is lightly loaded, the response time may be too
          quick for MODEM7 unless the MODEM7 qqqq modifier is used.

          The VMS C standard i/o package and RMS sometimes interact to
          modify file contents unexpectedly.

     FFFFIIIILLLLEEEESSSS
          32 bit CRC code courtesy Gary S. Brown.

          sz.c, rbsb.c, zm.c, zmodem.h source files

          /tmp/szlog stores debugging output (sz -vv)

     TTTTEEEESSSSTTTTIIIINNNNGGGG FFFFEEEEAAAATTTTUUUURRRREEEE
          The command "sz -T file" exercises the AAAAttttttttnnnn sequence error
          recovery by commanding errors with unterminated packets.
          The receiving program should complain five times about
          binary data packets being too long.  Each time sssszzzz is
          interrupted, it should send a ZDATA header followed by
          another defective packet.  If the receiver does not detect
          five long data packets, the AAAAttttttttnnnn sequence is not
          interrupting the sender, and the MMMMyyyyaaaattttttttnnnn string in sssszzzz....cccc must
          be modified.

          After 5 packets, sssszzzz stops the "transfer" and prints the
          total number of characters "sent" (Tcount).  The difference
          between Tcount and 5120 represents the number of characters
          stored in various buffers when the Attn sequence is
          generated.

     BBBBUUUUGGGGSSSS
          Calling _s_z from most versions of cu(1) doesn't work because
          cu's receive process fights _s_z for characters from the
          modem.

          Many programs claiming to support YMODEM only support XMODEM
          with 1k blocks, and they often don't get that quite right.

          XMODEM transfers add up to 127 garbage bytes per file (1023
          bytes with XMODEM-k).

          YMODEM programs use the file length transmitted at the
          beginning of the transfer to prune the file to the correct



     Page 5                                          (printed 9/30/89)






     SSSSZZZZ((((1111))))                   XXXXEEEENNNNIIIIXXXX 3333....0000 ((((OOOOMMMMEEEENNNN))))                    SSSSZZZZ((((1111))))



          length; this may cause problems with source files that grow
          during the course of the transfer.  This problem does not
          pertain to ZMODEM transfers, which preserve the exact file
          length unconditionally.

          Most ZMODEM options are merely passed to the receiving
          program; some do not implement all these options.

          Circular buffering and a ZMODEM sliding window should be
          used when input is from pipes instead of acknowledging
          frames each 1024 bytes.  If no files can be opened, sssszzzz sends
          a ZMODEM command to echo a suitable complaint; perhaps it
          should check for the presence of at least one accessible
          file before getting hot and bothered.  The test mode leaves
          a zero length file on the receiving system.

          Some high speed modems have a firmware bug that drops
          characters when the direction of high speed transmissson is
          reversed.  The environment variable ZNULLS may be used to
          specify the number of nulls to send before a ZDATA frame.
          Values of 101 for a 4.77 mHz PC and 124 for an AT are
          typical.

































     Page 6                                          (printed 9/30/89)



