home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / ZOO21E.EXE / VMSBUGS.DOC < prev    next >
Text File  |  1991-07-11  |  19KB  |  483 lines

  1.  
  2.  
  3.                            Zoo 2.0 on VAX/VMS
  4.                                    by
  5.                               Rahul Dhesi
  6.  
  7.  
  8. The zoo archiver is used to create and maintain archives containing mul-
  9. tiple files that may be stored in compressed format.  Consult the zoo
  10. manual for more details.  This document describes those features of
  11. VAX/VMS zoo that are specific to the VAX/VMS implementation.
  12.  
  13.  
  14.                               INSTALLATION
  15.  
  16. The file "descrip.mms" is a makefile suitable for use with DEC's imple-
  17. mentation of make, called MMS.  To avoid any confusion, delete the file
  18. called "makefile" as that is not for VAX/VMS systems and it might con-
  19. fuse MMS.  With all source files in the current directory, simply type
  20. MMS and wait while all files get compiled and linked.  Then give the
  21. command "mms fiz" to build "fiz.exe", and "mms blif" to build "bilf.exe".
  22.  
  23. If your system does not have MMS, execute the "vmsbuild.com" script.
  24.  
  25. The result should be the executable program, "zoo.exe", "fiz.exe",
  26. and "bilf.exe".
  27.  
  28. Optionally, the command "mms zoobig.exe" will create a version of the
  29. executable that is linked without the shareable library.  This may be
  30. more portable if you intend to transfer it to an VMS system that does
  31. not have its own C compiler.  But "zoobig.exe" will be about twice the
  32. size of "zoo.exe".
  33.  
  34. To run zoo, bilf, and fiz, you will need to set up symbols by giving
  35. commands similar to the following, either by typing them at the system
  36. prompt or by putting them in your "login.com" file.
  37.  
  38.      $ zoo  :== $ user$disk:[userdir]zoo.exe
  39.      $ fiz  :== $ user$disk:[userfir]fiz.exe
  40.      $ bilf :== $ user$disk:[userdir]bilf.exe
  41.  
  42. In place of "user$disk" use the name of the device on which
  43. your login directory is located, and instead of "userdir" use
  44. the name of the directory in which you have placed the executable
  45. programs "zoo.exe" and "fiz.exe".
  46.  
  47.  
  48.                           WARNING -- VMS BUGS
  49.  
  50. VAX/VMS peculiarities cause unusual bahavior.
  51.  
  52.    - VMS C does not preserve uppercase characters in a command line.  To
  53.      specify a command containing an uppercase character, enclose the
  54.      command in double quotes.  For example, the command
  55.  
  56.           zoo aM stuff *
  57.  
  58.      will not work under VMS.  To make this command work under VMS, use
  59.      double quotes like this:
  60.  
  61.           zoo "aM" stuff *
  62.  
  63.    - For most text files that are not in stream-LF format, VMS returns
  64.      an incorrect file size to zoo.  This will be evident if you use the
  65.      "f" modifier to tell zoo to archive files without compression.
  66.      Files that were in stream-LF format will be stored with the correct
  67.      size;  other text files will be stored with an incorrect value for
  68.      the original size of the file.
  69.  
  70.      When such files are extracted, however, they are extracted in
  71.      stream-LF format, which is the only file format that VMS seems to
  72.      handle correctly.  Thus, so far as I can determine, no file con-
  73.      tents are actually lost, and the only evidence of the problem is
  74.      that in archive listings, files stored without compression may
  75.      still appear to be compressed by about 1 to 5 percent, or occasion-
  76.      ally by some meaningless value.
  77.  
  78.    - VAX/VMS uses many different types of file structures.  Zoo creates
  79.      archives in stream-LF format, and all archives used by zoo in any
  80.      way must be in this format.  It is dangerous to use zoo on an
  81.      archive that is in any other format, because it may permanently
  82.      corrupt the archive contents.  Thus, if you have uploaded an
  83.      archive to a VMS system using Kermit, do not try to manipulate it
  84.      with zoo until you have converted it to stream-LF format.  File
  85.      conversion instructions are given later in this document.
  86.  
  87.    - The VAX/VMS batch system causes the C statement
  88.  
  89.           fflush(stdout);
  90.  
  91.      to become equivalent to:
  92.  
  93.           printf("\n");
  94.  
  95.      The result is that if files are added to a zoo archive from a batch
  96.      run, the batch log will look very strange and contain spurious new-
  97.      lines.
  98.  
  99.  
  100.                         ARCHIVING SELECTED FILES
  101.  
  102. Zoo can read filenames from standard input.  This allows you to use an
  103. external program to generate a list of files to be archived.  When this
  104. list is fed to zoo, it will archive only the selected files.
  105.  
  106. For this example, assume that files are to be archived in an archive
  107. called "backups.zoo".
  108.  
  109. To achieve redirection of input under VAX/VMS, the following steps are
  110. necessary:
  111.  
  112.  1.  Create a file containing the filenames to be archived.  Suppose
  113.      this file is called "names.lis".
  114.  
  115.  2.  Redirect zoo's standard input thus:
  116.  
  117.           $ define /user_mode SYS$INPUT names.lis
  118.  
  119.  
  120.  3.  Invoke zoo thus:
  121.  
  122.           $ zoo "aI" backups
  123.  
  124.      This command line will cause zoo to read a list of filenames from
  125.      its standard input, and archive them into "backups.zoo".  Since the
  126.      logical name SYS$INPUT was changed to refer to the file
  127.      "names.lis", zoo will read filenames from that file.
  128.  
  129. A good way of creating a list of files to be archived is to use the vms
  130. "directory" command.  Include at least the switches shown:
  131.  
  132.      $ directory /noheading /notrailing /column=1 /output=names.lis
  133.  
  134. This tells VMS to produce a list of filenames, one per line, and to
  135. store the resulting output in the file "names.lis".  You can also add
  136. additional selection options.  For example, to select all files that
  137. have been modified in the last 12 hours:
  138.  
  139.      $ dir/nohead/notrail/col=1/out=names.lis/since=-12:00/modified
  140.  
  141. A good way to decrease the effort is to create a symbol as follows:
  142.  
  143.      $ select:=="dir/nohead/notrail/col=1/out=names.lis/modified/since="
  144.  
  145. Now you can archive all *.c files modified in the last 60 minutes by
  146. giving the following commands:
  147.  
  148.      $ select -1:00:00 *.c
  149.      $ define/user sys$input names.lis
  150.      $ zoo "aI" backups
  151.  
  152.  
  153.                        FILE TRANSFERS WITH KERMIT
  154.  
  155. Zoo archives can be uploaded to a VAX/VMS system and downloaded from it
  156. using Kermit.  Due to VMS limitations, some file conversions must be
  157. done to avoid a corrupted zoo archive.
  158.  
  159. Zoo always expects zoo archives to be in stream-LF format.  However, the
  160. standard VAX/VMS Kermit does not create stream-LF files, and treats them
  161. as text files when it reads them, resulting in corrupted downloads.
  162. Thus you must handle Kermit transfers with care. The following discus-
  163. sions refers solely to the standard Kermit-32, which I believe is from
  164. the Stevens Institute of Technology.  If the following instructions are
  165. carefully followed, you should be able to transfer zoo archives between
  166. a VAX/VMS system and a microcomputer running Kermit.
  167.  
  168. KERMIT UPLOADS:  To transfer a zoo archive from a microcomputer to a
  169. VAX/VMS system, do the following.
  170.  
  171.  1.  Invoke VAX/VMS Kermit as shown below.  It will prompt you with the
  172.      string "Kermit-32>".  Give it a command as shown to tell it to
  173.      receive a binary file:
  174.  
  175.           $ kermit
  176.           Kermit-32> set file type binary
  177.           Kermit-32> set block-check 3
  178.           Kermit-32> receive
  179.  
  180.      Note:  Do not use the command "set file type fixed".  In most cases
  181.      it will not work.
  182.  
  183.      The command to set the block-check is optional, but tells Kermit to
  184.      use a 16-bit CRC, which is much more reliable than the default 6-
  185.      bit CRC.  Use this command if your version of Kermit does not use a
  186.      16-bit CRC by default.
  187.  
  188.  2.  At this point, VAX/VMS Kermit is waiting for you to send it a file.
  189.      Now tell your local Kermit to send the file.  On an MS-DOS system,
  190.      using MS-Kermit, you would do this by first typing the local escape
  191.      sequence to get to the local mode, where the prompt is "MS-
  192.      Kermit>", then telling your local Kermit to send the zoo archive as
  193.      a binary file.  A typical sequence of commands is:
  194.  
  195.           (type escape sequence to get back to local mode)
  196.           MS-Kermit> set eof noctrl-z
  197.           MS-Kermit> send stuff.zoo
  198.  
  199.      It is important that your local Kermit send the zoo archive as a
  200.      binary file, not a text file.  How you do this depends on your sys-
  201.      tem;  on MS-DOS systems it suffices to give say "set eof noctrl-z".
  202.  
  203.  3.  Wait until the Kermit upload is complete.  Then tell your local
  204.      Kermit to go into terminal mode (usually by giving the command CON-
  205.      NECT), and exit from VAX/VMS Kermit with the command EXIT.  A typi-
  206.      cal sequence is:
  207.  
  208.           MS-Kermit> connect
  209.           (stuff from MS-Kermit printed...)
  210.           (hit carriage return if necessary to get the next prompt)
  211.           Kermit-32> exit
  212.           $
  213.  
  214.      Now you are back at the VAX/VMS prompt.  At this point, you must
  215.      convert the uploaded zoo archive, which is currently in binary for-
  216.      mat, to stream-LF format so that it can be used by VAX/VMS zoo.
  217.      You do this by using the Bilf utility, which can convert files
  218.      between binary and stream-LF formats.  Give the command:
  219.  
  220.           $ bilf l stuff.zoo
  221.  
  222.  4.  After Bilf has done the conversion, you will have a new generation
  223.      of stuff.zoo that is in stream-LF format.  Now you can manipulate
  224.      it normally with VAX/VMS zoo.
  225.  
  226. DON'T TRY TO USE ZOO TO MANIPULATE AN UPLOADED ARCHIVE WITHOUT PERFORM-
  227. ING THE CONVERSION TO STREAM-LF FORMAT, ELSE YOU MAY PERMANENTLY DESTROY
  228. ARCHIVE CONTENTS.
  229.  
  230. KERMIT DOWNLOADS:  Before downloading a zoo archive from VAX/VMS to a
  231. microcomputer, you must convert it to binary format.    Then use VMS
  232. Kermit normally.  A sample sequence is shown.
  233.  
  234.  1.  Convert the zoo archive to binary format.
  235.  
  236.           $ bilf b stuff.zoo
  237.  
  238.  2.  Invoke VMS Kermit and tell it to send the file.
  239.  
  240.           $ kermit
  241.           Kermit-32> set block-check 3
  242.           Kermit-32> send stuff.zoo
  243.  
  244.  3.  Get back to your local Kermit and tell it to receive a binary file.
  245.  
  246.           (type escape sequence to get into local mode)
  247.           MS-Kermit> set eof noctrl-z
  248.           MS-Kermit> receive
  249.           (transfer takes place)
  250.  
  251.  
  252.                          FILE TRANSFER SUMMARY
  253.  
  254. Here are pictorial summaries of the steps involved in performing file
  255. transfers of zoo archives using Kermit.
  256.  
  257. ======================================================================
  258.  
  259. DOWNLOADS:
  260.                                            files on a VMS
  261.                                          system to be archived
  262.                                                using zoo
  263.                                                     |
  264.                                    archive created  |
  265.                                    using zoo.exe    |
  266.                                    or zoobig.exe    |
  267.                                    on a VMS system  |
  268.                                                     v
  269.  
  270. zoo archive on VMS      bilf b           zoo archive on VMS, in
  271. in fixed-length     <----------------    in stream-LF format
  272. binary format
  273.       |
  274.       |
  275.       | archive transferred
  276.       | from VMS to microcomputer
  277.       | using Kermit; receiving
  278.       | Kermit must be told this
  279.       | is a binary file; sending
  280.       | Kermit may need to be told too
  281.       |
  282.       v
  283. zoo archive
  284. on microcomputer
  285. system
  286.  
  287. ======================================================================
  288.  
  289. UPLOADS:
  290.  
  291. zoo archive
  292. on microcomputer
  293. system
  294.     |
  295.     |
  296.     | archive uploaded to VMS using Kermit;
  297.     | receiving Kermit on VMS must be given
  298.     | command "set file type binary"
  299.     | (NOTE:  "set file type fixed" will
  300.     | usually not work);  sending Kermit
  301.     | must be told this is a binary file
  302.     |
  303.     v
  304. zoo archive on VMS,       bilf l         zoo archive on VMS, in
  305. in variable-length    ---------------->    in stream-LF format
  306. binary format                                      |
  307.                                                    | extract
  308.                                                    | normally using
  309.                                                    | zoo on VMS
  310.                                                    |
  311.                                                    v
  312.                                          files extracted from zoo
  313.                                           archive on a VMS system
  314.  
  315. ======================================================================
  316.  
  317.  
  318.                        ENSURING ARCHIVE INTEGRITY
  319.  
  320. After performing a transfer of a zoo archive using Kermit (and perform-
  321. ing any file conversion necessary for VMS), make it a habit to immedi-
  322. ately test the integrity of the transferred archive with the -test com-
  323. mand of zoo, illustrated for VMS:
  324.  
  325.      $ zoo -test stuff
  326.  
  327. In addition, also get a listing of the archive contents:
  328.  
  329.      $ zoo -list stuff
  330.  
  331. If neither command reports an error, it is reasonable to assume that
  332. archive integrity was not harmed by the Kermit transfer.
  333.  
  334. The -test command tests the integrity of each stored file.  The -list
  335. command tests the integrity of the internal archive structure.  Both are
  336. checked using separate cyclic redundancy codes, one for each archived
  337. file, and one for each directory entry in the archived. (Actually, the
  338. -list command ignores deleted entries, so if the archive contains any,
  339. use the "ld" command instead.)
  340.  
  341.  
  342.                                WILDCARDS
  343.  
  344. All implementations of zoo on all systems use the same wildcard charac-
  345. ters:  "*" matches any sequence of zero or more characters, and "?"
  346. matches any one character.
  347.  
  348. ADDING FILES:  For specifying directory names when adding files, use the
  349. usual VAX/VMS syntax.  Thus, to recursively archive all files in the
  350. current directory and all its subdirectories, the command syntax is:
  351.  
  352.      $ zoo a stuff [...]*
  353.  
  354.  The character range wildcard of the form "c-c" is also available, which
  355.  will select all files beginning with the specified character range.
  356.  For example,
  357.  
  358.       $ zoo a stuff [...]a-d [...]x-z
  359.  
  360.  will archive all files beginning with the characters a through d, and
  361.  with the characters x through z, in the current directory and all its
  362.  subdirectories.  A side-effect of this is that during addition to
  363.  archives, dots in filenames must be explicitly matched.  Thus to add
  364.  all files with an extension of DOC, you would type:
  365.  
  366.       $ zoo a stuff *.doc
  367.  
  368.  and "*doc" will not work.  As a special case, a trailing "*.*" in any
  369.  filename you specify can always be replaced by just a trailing "*".
  370.  The safest rule to follow when adding files is to always specify the
  371.  dot in each filename.
  372.  
  373.  EXTRACTING FILES:  During extraction, both the directory name and the
  374.  filename must be specified according to zoo syntax.  Thus you could say
  375.  
  376.       $ zoo x stuff [*xyz*]*.doc
  377.  
  378.  to extract all archived files with filenames that match "*.doc" and
  379.  that contain the string "xyz" in the directory name.  Note that VMS
  380.  syntax for selecting directories won't work here:
  381.  
  382.       $ zoo x stuff [...]*.doc        ! won't work for extraction
  383.  
  384.  If you do not specify the directory name at all, zoo will only perform
  385.  the match against filenames;  thus
  386.  
  387.       $ zoo x stuff *.doc
  388.  
  389.  will extract all files matching *.doc regardless of the directory name.
  390.  
  391.  Also note that if you specify extraction of "*.*", as in
  392.  
  393.       $ zoo x stuff *.*
  394.  
  395.  it will result in the extraction of files whose filename contains at
  396.  least one dot.  Similarly, the command
  397.  
  398.       $ zoo x stuff *_*
  399.  
  400.  will select all filename containing at least one underscore.
  401.  
  402.  To extract all files, specify no filename, e.g.
  403.  
  404.       $ zoo x stuff
  405.  
  406.  or use "*" rather than "*.*".
  407.  
  408.  SAFEST RULE OF THUMB:  WHEN SELECTING FILES ON DISK, SPECIFY THE DOT IN
  409.  EACH FILENAME;  WHEN SELECTING FILES INSIDE A ZOO ARCHIVE, SPECIFY A
  410.  DOT ONLY IF YOU NEED ONE.  But to select all files, you can always just
  411.  use "*".
  412.  
  413.  
  414.                             FILE GENERATIONS
  415.  
  416.  When a file is added to an archive, the generation number (if any) that
  417.  it is given in the archive is not related to the generation number it
  418.  had in the VAX/VMS filesystem.  At extraction time a new version is
  419.  always created for an extracted file.  The overwrite option ("O") does
  420.  not cause overwriting, but simply suppresses the warning message that
  421.  zoo normally gives when it finds that a file about to be extracted
  422.  already exists.
  423.  
  424.  
  425.                              FILE STRUCTURES
  426.  
  427.  At extraction time, zoo preserves all data bytes in binary files, and
  428.  stores all text files as lines of text terminated with linefeeds. The
  429.  internal file structure maintained by DEC's RMS is not currently
  430.  preserved.  (Support for this is planned for the distant future.)
  431.  Thus, the following two types of files can be safely archived and
  432.  restored:
  433.  
  434.     - All text files are extracted in stream-LF format.  Most VMS utili-
  435.       ties that accept text files will accept such files.  The EDT edi-
  436.       tor may complain, but will still work.
  437.  
  438.     - VMS executable files, when stored and then extracted, are
  439.       extracted in stream-LF format.  Such files can be restored to
  440.       their original state using Bilf with the "b" option.  (However,
  441.       current versions of VAX/VMS seem to be able to load and execute
  442.       stream-LF files, so conversion may not be necessary.)
  443.  
  444.  HANDLING VMS EXECUTABLE FILES.  You can archive an executable program
  445.  called "xyz.exe":
  446.  
  447.       $ zoo a stuff xyz.exe
  448.       $ delete xyz.exe;*
  449.  
  450.  Now the only copy of xyz.exe is in the archive "stuff.zoo".  Extract
  451.  it:
  452.  
  453.       $ zoo x stuff xyz.exe
  454.  
  455.  The extracted copy of "xyz.exe" is in stream-LF format and VMS may or
  456.  may not execute it.  Now we convert it back to fixed-length record for-
  457.  mat thus:
  458.  
  459.       $ bilf b xyz.exe
  460.       $ purge xyz.exe
  461.  
  462.  Now "xyz.exe" has been converted to binary format and can be executed.
  463.  It should be identical to the original copy of "xyz.exe" that was
  464.  archived.
  465.  
  466.  TEXT FILES FROM OTHER SYSTEMS.  A text file archived on a different
  467.  computer system will use either linefeeds, or carriage returns plus
  468.  linefeeds, as line terminators.  Text files with linfeeds only can be
  469.  be extracted and used exactly as if they had been archived on a VAX/VMS
  470.  system.  Text files containing carriage returns plus linefeeds will,
  471.  when extracted, contain a spurious carriage return at the end of each
  472.  line.  This extra carriage return can be removed using EDT's "substi-
  473.  tute" command while in screen mode.  Simply replace all carriage returns
  474.  with nothing.  The VMS C compiler currently appears to accept trailing
  475.  carriage returns in files without any trouble.
  476.  
  477.  Text files trasnferred from MS-DOS or CP/M or similar systems may con-
  478.  tain a trailing control Z character.  This may cause problems on VMS
  479.  and should be edited out with a text editor.
  480.  
  481.                                      -- Rahul Dhesi 1988/02/04
  482.                                             Revised 1991/07/07
  483.