home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 9
/
FreshFishVol9-CD2.bin
/
bbs
/
util
/
zoo-2.1.lha
/
zoo
/
vmsbugs.doc
< prev
next >
Wrap
Text File
|
1991-07-17
|
19KB
|
483 lines
Zoo 2.0 on VAX/VMS
by
Rahul Dhesi
The zoo archiver is used to create and maintain archives containing mul-
tiple files that may be stored in compressed format. Consult the zoo
manual for more details. This document describes those features of
VAX/VMS zoo that are specific to the VAX/VMS implementation.
INSTALLATION
The file "descrip.mms" is a makefile suitable for use with DEC's imple-
mentation of make, called MMS. To avoid any confusion, delete the file
called "makefile" as that is not for VAX/VMS systems and it might con-
fuse MMS. With all source files in the current directory, simply type
MMS and wait while all files get compiled and linked. Then give the
command "mms fiz" to build "fiz.exe", and "mms blif" to build "bilf.exe".
If your system does not have MMS, execute the "vmsbuild.com" script.
The result should be the executable program, "zoo.exe", "fiz.exe",
and "bilf.exe".
Optionally, the command "mms zoobig.exe" will create a version of the
executable that is linked without the shareable library. This may be
more portable if you intend to transfer it to an VMS system that does
not have its own C compiler. But "zoobig.exe" will be about twice the
size of "zoo.exe".
To run zoo, bilf, and fiz, you will need to set up symbols by giving
commands similar to the following, either by typing them at the system
prompt or by putting them in your "login.com" file.
$ zoo :== $ user$disk:[userdir]zoo.exe
$ fiz :== $ user$disk:[userfir]fiz.exe
$ bilf :== $ user$disk:[userdir]bilf.exe
In place of "user$disk" use the name of the device on which
your login directory is located, and instead of "userdir" use
the name of the directory in which you have placed the executable
programs "zoo.exe" and "fiz.exe".
WARNING -- VMS BUGS
VAX/VMS peculiarities cause unusual bahavior.
- VMS C does not preserve uppercase characters in a command line. To
specify a command containing an uppercase character, enclose the
command in double quotes. For example, the command
zoo aM stuff *
will not work under VMS. To make this command work under VMS, use
double quotes like this:
zoo "aM" stuff *
- For most text files that are not in stream-LF format, VMS returns
an incorrect file size to zoo. This will be evident if you use the
"f" modifier to tell zoo to archive files without compression.
Files that were in stream-LF format will be stored with the correct
size; other text files will be stored with an incorrect value for
the original size of the file.
When such files are extracted, however, they are extracted in
stream-LF format, which is the only file format that VMS seems to
handle correctly. Thus, so far as I can determine, no file con-
tents are actually lost, and the only evidence of the problem is
that in archive listings, files stored without compression may
still appear to be compressed by about 1 to 5 percent, or occasion-
ally by some meaningless value.
- VAX/VMS uses many different types of file structures. Zoo creates
archives in stream-LF format, and all archives used by zoo in any
way must be in this format. It is dangerous to use zoo on an
archive that is in any other format, because it may permanently
corrupt the archive contents. Thus, if you have uploaded an
archive to a VMS system using Kermit, do not try to manipulate it
with zoo until you have converted it to stream-LF format. File
conversion instructions are given later in this document.
- The VAX/VMS batch system causes the C statement
fflush(stdout);
to become equivalent to:
printf("\n");
The result is that if files are added to a zoo archive from a batch
run, the batch log will look very strange and contain spurious new-
lines.
ARCHIVING SELECTED FILES
Zoo can read filenames from standard input. This allows you to use an
external program to generate a list of files to be archived. When this
list is fed to zoo, it will archive only the selected files.
For this example, assume that files are to be archived in an archive
called "backups.zoo".
To achieve redirection of input under VAX/VMS, the following steps are
necessary:
1. Create a file containing the filenames to be archived. Suppose
this file is called "names.lis".
2. Redirect zoo's standard input thus:
$ define /user_mode SYS$INPUT names.lis
3. Invoke zoo thus:
$ zoo "aI" backups
This command line will cause zoo to read a list of filenames from
its standard input, and archive them into "backups.zoo". Since the
logical name SYS$INPUT was changed to refer to the file
"names.lis", zoo will read filenames from that file.
A good way of creating a list of files to be archived is to use the vms
"directory" command. Include at least the switches shown:
$ directory /noheading /notrailing /column=1 /output=names.lis
This tells VMS to produce a list of filenames, one per line, and to
store the resulting output in the file "names.lis". You can also add
additional selection options. For example, to select all files that
have been modified in the last 12 hours:
$ dir/nohead/notrail/col=1/out=names.lis/since=-12:00/modified
A good way to decrease the effort is to create a symbol as follows:
$ select:=="dir/nohead/notrail/col=1/out=names.lis/modified/since="
Now you can archive all *.c files modified in the last 60 minutes by
giving the following commands:
$ select -1:00:00 *.c
$ define/user sys$input names.lis
$ zoo "aI" backups
FILE TRANSFERS WITH KERMIT
Zoo archives can be uploaded to a VAX/VMS system and downloaded from it
using Kermit. Due to VMS limitations, some file conversions must be
done to avoid a corrupted zoo archive.
Zoo always expects zoo archives to be in stream-LF format. However, the
standard VAX/VMS Kermit does not create stream-LF files, and treats them
as text files when it reads them, resulting in corrupted downloads.
Thus you must handle Kermit transfers with care. The following discus-
sions refers solely to the standard Kermit-32, which I believe is from
the Stevens Institute of Technology. If the following instructions are
carefully followed, you should be able to transfer zoo archives between
a VAX/VMS system and a microcomputer running Kermit.
KERMIT UPLOADS: To transfer a zoo archive from a microcomputer to a
VAX/VMS system, do the following.
1. Invoke VAX/VMS Kermit as shown below. It will prompt you with the
string "Kermit-32>". Give it a command as shown to tell it to
receive a binary file:
$ kermit
Kermit-32> set file type binary
Kermit-32> set block-check 3
Kermit-32> receive
Note: Do not use the command "set file type fixed". In most cases
it will not work.
The command to set the block-check is optional, but tells Kermit to
use a 16-bit CRC, which is much more reliable than the default 6-
bit CRC. Use this command if your version of Kermit does not use a
16-bit CRC by default.
2. At this point, VAX/VMS Kermit is waiting for you to send it a file.
Now tell your local Kermit to send the file. On an MS-DOS system,
using MS-Kermit, you would do this by first typing the local escape
sequence to get to the local mode, where the prompt is "MS-
Kermit>", then telling your local Kermit to send the zoo archive as
a binary file. A typical sequence of commands is:
(type escape sequence to get back to local mode)
MS-Kermit> set eof noctrl-z
MS-Kermit> send stuff.zoo
It is important that your local Kermit send the zoo archive as a
binary file, not a text file. How you do this depends on your sys-
tem; on MS-DOS systems it suffices to give say "set eof noctrl-z".
3. Wait until the Kermit upload is complete. Then tel