HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Unzip in VMS Query

 
CO_5
Advisor

Unzip in VMS Query

hello,

i have below issue. anyone knows why ?

$ MOUNT $12$DQA0: PROM58
%MOUNT-I-WRITELOCK, volume is write locked
%MOUNT-I-MOUNTED, PROM58 mounted on _$12$DQA0: (PROMSE)
$
Device Device Error Volume Free Trans Mnt
Name Status Count Label Blocks Count Cnt
$1$DGA100: (PROMSE) Mounted 0 I64SYS_V83 56324304 350 2
$1$DGA101: (PROMSE) Mounted 0 QUORUM 4192640 1 2
$1$DGA200: (PROMSE) Mounted 0 DATA1 729789632 1 2
$1$DGA300: (PROMSE) Mounted 0 DATA2 566221856 1 2
$12$DKA0: (PROMSE) Online 0
$12$DKA100: (PROMSE) Online 0
$12$DQA0: (PROMSE) Mounted alloc 0 PROM58 14064 1 1
wrtlck
$12$DQA1: (PROMSE) Offline 1

Device Device Error Volume Free Trans Mnt
Name Status Count Label Blocks Count Cnt
PROMSE$MKB400: Online 0

Device Device Error
Name Status Count
OPA0: Online 0
ASN0: Online 0
FTA0: Offline 0
KBD0: Online 0
RTA0: Offline 0

$ UNZIP:==$12$DQA0:[000000]UNZIP
$ UNZIP $12$DQA0:[000000]PROM58 /QUIET/OVERWRITE
%DCL-W-ACTIMAGE, error activating image 12$DQA0:[000000]UNZIP
-CLI-E-IMGNAME, image file 12$DQA0:[000000]UNZIP.EXE;
-RMS-F-DEV, error in device name or inappropriate device type for operation

thks,
CO
17 REPLIES
Thomas Ritter
Respected Contributor

Re: Unzip in VMS Query

Try

UNZIP:==$$12$DQA0:[000000]UNZIP
Robert Gezelter
Honored Contributor

Re: Unzip in VMS Query

CO,

I concur with Thomas. The symbol assignment for UNZIP needs a preceding "$".

- Bob Gezelter, http://www.rlgsc.com
Steven Schweda
Honored Contributor

Re: Unzip in VMS Query

Yeah. The "-h" help for UnZip says something
like:

=> define foreign command symbol in LOGIN.COM: $ unzip :== $dev:[dir]unzip.exe

I'll try to get a space inserted to make the
"$" look more like a separate token. For
example, newer Zip "-h" says:

[...] Usage: zip == "$ disk:[dir]zip.exe"

People with disk names beginning with "$"
tend to see that "$" as part of the disk
device name, which it's not. I'm hoping that
the new space will help (a little, at least).
Willem Grooters
Honored Contributor

Re: Unzip in VMS Query

All above correct, just an addition

$12$DQA0: is the disk itself - inclusing allocation class (12). If unique, you could have used the device without allocation class, it should work as well:

$ UNZIP :== $DQA0:[000000]UNZIP

In most cases, you'd better avoid physical devices and use the label specified in MOUNT:

$ UNZIP :== $PROM58:[000000]UNZIP

Another way to avoid the "double-dollar symdrome" is to use the (old, PDP-based, not-really-documented, but well known and often used) "MCR" command:

$ UNZIP :== MCR PROM58:[000000]UNZIP


WG
Willem Grooters
OpenVMS Developer & System Manager
Jon Pinkley
Honored Contributor

Re: Unzip in VMS Query

++++++++++++
In most cases, you'd better avoid physical devices and use the label specified in MOUNT:

$ UNZIP :== $PROM58:[000000]UNZIP
++++++++++++

Shouldn't that have been "the logical name created by MOUNT:"?

$ UNZIP :-- $DISK$PROM58:[000000]UNZIP

The default value for f$getdvi("$12$DQA0:","LOGVOLNAM") would be DISK$PROM58 given f$getdvi("$12$DQA0:","VOLNAM") was PROM58.
it depends
Jon Pinkley
Honored Contributor

Re: Unzip in VMS Query

Well I had a typo myself :--

$ UNZIP :== $DISK$PROM58:[000000]UNZIP

Jon
it depends
CO_5
Advisor

Re: Unzip in VMS Query

guys,

bumped into this method...it works after put in the -q -o rather than /overwrite/quiet

with or without the $, it seems no much difference.


Username: PROM58
Password:
HP OpenVMS Industry Standard 64 Operating System, Version V8.3 on node PROMSE
Last interactive login on Wednesday, 26-SEP-2007 11:20:49.40
$ SET PROC/PRIV=ALL
$ MOUNT DQA0: PROM58
%MOUNT-I-WRITELOCK, volume is write locked
%MOUNT-I-MOUNTED, PROM58 mounted on _$12$DQA0: (PROMSE)
$ UNZIP:==$$12$DQA0:[000000]UNZIP
$ UNZIP DQA0:[000000]PROM58 /QUIET/OVERWRITE
Archive: DQA0:[000000]PROM58.ZIP;1

$ UNZIP :== $$12$DQA0:[000000]UNZIP
$ UNZIP $12$DQA0:[000000]PROM58 /OVERWRITE


$ UNZIP -q -o $12$DQA0:[000000]PROM58
$ unzip
UnZip 5.42 of 14 January 2001, by Info-ZIP. For more details see: unzip -v.

Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
Default action is to extract files in list, except those in xlist, to exdir;
file[.zip] may be a wildcard. "-Z" => ZipInfo mode (`unzip "-Z"' for usage).
=> define foreign command symbol in LOGIN.COM: $ unzip :== $dev:[dir]unzip.exe

-p extract files to pipe, no messages -l list files (short format)
-f freshen existing files, create none -t test compressed archive data
-u update files, create if necessary -z display archive comment
-x exclude files that follow (in xlist) -d extract files into exdir

modifiers: -q quiet mode (-qq => quieter)
-n never overwrite existing files -a auto-convert any text files
-o overwrite files WITHOUT prompting -aa treat ALL files as text
-j junk paths (do not make directories) -v be verbose/print version info
"-C" match filenames case-insensitively "-L" make (some) names lowercase
"-X" restore owner/protection info "-V" retain VMS version numbers
"-M" pipe through "more" pager
Examples (see unzip.txt for more info):
unzip data1 -x joe => extract all files except joe from zipfile data1.zip
unzip "-V" foo "Bar" => must quote uppercase options and filenames in VMS
unzip -fo foo vms.c => quietly replace existing vms.c if archive file newer
Joseph Huber_1
Honored Contributor

Re: Unzip in VMS Query

CO:
bumped into this method...it works after put in the -q -o rather than /overwrite/quiet
with or without the $, it seems no much difference.

No, for sure the "$" prefix is needed.

The option syntax is a completely different thing.
Unzip for VMS builds in 2 different flavors:
One is the Unix/shell compatible -o etc., usually built as file UNZIP.
The other one is the VMS/DCL compatible with the /option form of switches, usually built as file UNZIP_CLI.

So if You have and deine
UNZIP:==$$12$DQA0:[000000]UNZIP_CLI, then You can use the above UNZIP/QUIET... syntax.

And as a side note: it is really not good organisation style to put programs (and other user files) in the root directory of a disk. By default, a user cannot even get a DIRectory listing of disk:[000000] !

http://www.mpp.mpg.de/~huber
CO_5
Advisor

Re: Unzip in VMS Query

thks for more inputs.

but, i dont see the UNZIP_CLI in the cd. so this /option will not be the choice, rite ?

Why this is different from VMS alpha, where i used to do UNZIP with /option, rather than -option ? is it to do with Itanium platform/HP OpenVMS Industry Standard 64 Operating System, Version V8.3?
Steven Schweda
Honored Contributor

Re: Unzip in VMS Query

> but, i dont see the UNZIP_CLI in the cd. so
> this /option will not be the choice, rite ?

Which CD is "the cd"?


> UnZip 5.42 of 14 January 2001, [...]

First, do yourself a favor, and get the
current released version:

UnZip 5.52 of 28 February 2005, [...]

It's generally faster, and has fewer bugs.

http://www.info-zip.org/
http://www.info-zip.org/UnZip.html
http://www.info-zip.org/Zip.html

The installation instructions may not be very
clear about UNZIP_CLI.EXE, but it does get
built, and you can use it instead of
UNZIP.EXE, if you wish. From time to time,
the "-" options change, but no one remembers
to update the CLI code to change the
corresponding "/" qualifiers, so be alert.


> [...] use the label [...]

Be careful when following advice you get
here, too.
Joseph Huber_1
Honored Contributor

Re: Unzip in VMS Query

CO:

Why this is different from VMS alpha, where i used to do UNZIP with /option,...

It is not part of the VMS distribution, but an add-on from open source (thanks Steven above).
Whoever did the installation on Your site should do it consistently on all systems involved. (i.e. ask Your system manager or Yourself if they are identical :-)

Check with "SHOW SYMBOL UNZIP" how it is defined. Maybe UNZIP_CLI was renamed to UNZIP on Alpha ?
http://www.mpp.mpg.de/~huber
Steven Schweda
Honored Contributor

Re: Unzip in VMS Query

> Why this is different from VMS alpha,
> where i used to do UNZIP with /option,...

Info-ZIP UnZip and Zip generally work the
same on all VMS system types, and their VMS
builders normally build both executables,
for example, UNZIP.AXP_EXE and
UNZIP_CLI.AXP_EXE on Alpha, or
UNZIP.VAX_DECC_EXE and UNZIP_CLI.VAX_DECC_EXE
on VAX for UnZip 5.52.

As originally supplied, the builders for
UnZip 5.52 and Zip 2.31 (or earlier) don't
know about IA64, so the executable names may
be a bit misleading there.

The behavior you see depends on which
executable your UNZIP symbol points to. If
you say:
UNZIP :== $ dev:[dir]UNZIP.AXP_EXE
then you'll get the UNIX-style command line.
If you say:
UNZIP :== $ dev:[dir]UNZIP_CLI.AXP_EXE
then you'll get the VMS-style command line.

If you want to use both, then define more
(different) symbols.

Of course, everything's complicated, so in
most cases you can use the UNIX-style options
with the "_CLI" executable, too. (Mixing the
two option styles in one command would be
asking for trouble, however.)

As with many popular programs, it can be hard
to know where someone got it, who built it,
how it was built, and how it was installed.
Life is filled with mysteries.
Hoff
Honored Contributor

Re: Unzip in VMS Query

Ff there's another Freeware distro (or as part of whatever happens with the 5.52 changes needed for the Unix race) adding in some usage directions into the documentation might be appropriate. The commands really aren't obvious to someone unfamiliar with the details of DCL and such.

I'll look at posting up some directions to the HoffmanLabs web site.

The OpenVMS FAQ has a section on DCL foreign commands and DCL command parsing, and that specifically uses unzip as an example.

As for the CLI question -- the differences in the parsing -- you've been seeing the classic unzip syntax discussed here, but clearly also have access to UNZIP_CLI.AXP_EXE variant from somewhere. You can choose to use either; if you want to use the CLI variant (for I64), you'll have to acquire and configure the right bits.

The latest Freeware bits have Unzip 5.52 at http://h71000.www7.hp.com/freeware/freeware80/unzip/
And always also over at the main site http://www.info-zip.org/

Since you might choose to FTP over the BACKUP saveset named unzip.bck from the OpenVMS Freeware site (if you don't have a copy of the Freeware distro locally), you'll want to grab a copy of the tool http://h71000.www7.hp.com/freeware/freeware80/000tools/reset_backup_saveset_file_attributes.com as FTP tends to stomp on BACKUP saveset file attributes. On V8.3, you can also use the BACKUP /REPAIR command against the saveset.

--

(I did try to get zip and unzip into the base OpenVMS distro, but that's another discussion.)

--

Stephen Hoffman
HoffmanLabs LLC
Paul Beaudoin
Regular Advisor

Re: Unzip in VMS Query

From original post:

$ MOUNT $12$DQA0: PROM58
%MOUNT-I-WRITELOCK, volume is write locked
%MOUNT-I-MOUNTED, PROM58 mounted on _$12$DQA0: (PROMSE)
.
.
.
$ UNZIP $12$DQA0:[000000]PROM58 /QUIET/OVERWRITE
===============================

Beyond the (correct) advice given to get the program to fire, the device you are planning to unzip from/to is write locked. Won't work. You need a different device to write the output to

Regards

Paul
Steven Schweda
Honored Contributor

Re: Unzip in VMS Query

> [...] the device you are planning to unzip
> from/to is write locked. Won't work. You
> need a different device to write the output
> to

Well, yes and no. "From" doesn't matter.
"To" matters, and we don't know what the
user's default device:[directory] is.
Sometimes it's best not to go looking for
trouble where there is none.

There was a bug in older Zip versions on VMS
where a temporary archive would be created in
the user's default directory instead of the
user-specified archive destination directory,
and _that_ caused some problems, but that
defect is gone from the current version.

alp $ mount /noassist ALP$DKB500: ALPHA0732
%MOUNT-I-WRITELOCK, volume is write locked
%MOUNT-I-MOUNTED, ALPHA0732 mounted on _ALP$DKB500:
alp $ set default ALP$DKB500:[000000]
alp $ zipx dka0:[sms]zbad2.zip [CDSA...]*.*
zip I/O error: read-only file system

zip error: Temporary file failure (zi968726)
alp $ zipx -v
Copyright (C) 1990-1999 Info-ZIP
Type 'zip "-L"' for software license.
This is Zip 2.3 (November 29th 1999), by Info-ZIP.
[...]

alp $ zipy dka0:[sms]zbad2.zip [CDSA...]*.*
adding: [.CDSA.KIT] (stored 0%)
adding: [.CDSA.KIT]CPQ-AXPVMS-CDSA-V0200-109-1.PCSI$COMPRESSED (deflated 18%)
alp $ zipy -v
Copyright (C) 1990-2005 Info-ZIP
Type 'zip "-L"' for software license.
This is Zip 2.31 (March 4th 2005), by Info-ZIP.
[...]

(Which is _not_ the current version, just
the first version with that fix.)


There are reasons that I avoid older Zip and
UnZip versions, and I/O speed is only one of
them.
Paul Beaudoin
Regular Advisor

Re: Unzip in VMS Query

Steven,

I wasn't aware of that subtle ability of zip to catch a typical (user) error (No sarcasm intended). Still strikes me a better practice to be explicit in where the files end up - a regular source of iritation on other platfoms - I keep losing the files!

Regards

Paul


Steven Schweda
Honored Contributor

Re: Unzip in VMS Query

> I wasn't aware [...]

It's easy to tell UnZip and Zip where to find
or put the archive. Where to put or find the
files coming out of or going into the archive
is different. For them, under the current
directory is generally the safest and/or only
place.

When creating a new archive, Zip is supposed
to create a temporary archive (ZIxxxxxxxx)
in the same directory as the user-specified
destination. Then, if all goes well, it
renames the temporary to the final. ("-b"
lets you put the temporary stuff somewhere
else.) Zip is clever enough to try a copy
when the rename fails, so, other than a long
pause, there was no obvious symptom when it
used the wrong directory for the temporary
archive (and it was not on the actual
destination disk). It got more obvious for
large archives, however. Copying a few KB is
about as fast as a rename, but copying a few
GB tends to be noticably slower than a
rename.

Everything's complicated.