1828171 Members
2744 Online
109975 Solutions
New Discussion

Zip in VMS

 
SOLVED
Go to solution
Deepak kumar_3
Frequent Advisor

Zip in VMS

Hi,

How to zip files and sub-directory in Open
VMS.

Deepak
18 REPLIES 18
Wim Van den Wyngaert
Honored Contributor

Re: Zip in VMS

If you want to keep the file characteristics (e.g. indexed file), use zip/vms. Otherwise you get unix files (stream).

Zip doesn't accept directory specs as VMS does. Use *.*/recurs to go down to all directories.

Wim
Wim
Uwe Zessin
Honored Contributor

Re: Zip in VMS

You use standard OpenVMS syntax for paths:

$ zip "-V9" COM.ZIP [...]*.COM
.
Wim Van den Wyngaert
Honored Contributor

Re: Zip in VMS

Also check this
http://www.djesys.com/vms/support/powerpnt/zipunzip.ppt

And note that for big zip that /level=1 is faster and compresses sufficiently.
Wim
Deepak kumar_3
Frequent Advisor

Re: Zip in VMS

Hi ,

But in sudirectories i do't want all the files in zip for example .lis,.map and should i give /exclude=(.map,*.lis) qualifier

Deepak
Uwe Zessin
Honored Contributor

Re: Zip in VMS

I think the '-x' option is what you want.
.
Wim Van den Wyngaert
Honored Contributor

Re: Zip in VMS

Ignore my /recurs remark. Std VMS syntax is accepted but the zip archive itself may not be in the list itself (will result in internal logic error). Also .dir;2 files result in internal errors. Open files will result in "no such file" + "could not open for reading" messages. Ign=interlock is not available.
Wim
Deepak kumar_3
Frequent Advisor

Re: Zip in VMS

I am trying
zip -r9V bc23backup.zip -x krSHNA$DKA100:[WORK...]*.* /exclude=(*.lis,*.
exe,*.zip,*.map)

its giving error
zip error: Invalid command arguments (nothing to select from)
Uwe Zessin
Honored Contributor

Re: Zip in VMS

See '$ zip -h' for help. The '-x' option must be at the end. You must enclose the '-V' option in '"' signs, or the CRTL will change it, so use '"-r9V"'. Are you allowed to mix Unix and VMS-style options?
.
Deepak kumar_3
Frequent Advisor

Re: Zip in VMS

it is not excluding *.map,*.lis,*.obj
i have given command
zip "-V9" bc23backup.zip krSHNA$DKA100:[WORK.BC3.0...]*.* krSHNA$DKA100:[WORK...]*.lis,*.exe,*.map,*.obj,*.objd -x

adding: [.BUILD09.OSVM]LOGGER.LIS (deflated 79%)
adding: [.BUILD09.OSVM]LOGGER.OBJ (deflated 83%)

where i am going worng

Wim Van den Wyngaert
Honored Contributor

Re: Zip in VMS

Try

zip/vms bc23backup.zip krSHNA$DKA100:[WORK...]*.* /exclude=(*.lis,*.
exe,*.zip,*.map)
Wim
Deepak kumar_3
Frequent Advisor

Re: Zip in VMS

No it is not working.

zip/vms "-V9" bc23backup.zip krSHNA$DKA100:[WORK.bc3.0...]*.* /exclude=(*.lis
,*.exe,*.map,*.obj,*.objd)

zip warning: name not matched: bc23backup.zip
zip warning: name not matched: /exclude=(*.lis,*.exe,*.map,*.obj,*.objd)
adding: 27JAN.SAVESET (deflated 17%)
adding: [.BR] (stored 0%)
adding: [.BUILD] (stored 0%)
adding: [.BUILD09] (stored 0%)
adding: [.BUILD10] (stored 0%)
adding: [.BUILD11] (stored 0%)
adding: [.BUILD]CLUSTERNAME.EXE (deflated 68%)
adding: [.BUILD]HOSTINFO.EXE (deflated 71%)

Wim Van den Wyngaert
Honored Contributor

Re: Zip in VMS

without "-V9"
-V = /vms
-9 = /level=9, will use more cpu to compress a little more. I would use /level=1 and default is 6.

If not working, do zip and tell us what version you are using.
Wim
Deepak kumar_3
Frequent Advisor

Re: Zip in VMS

$ zip
Copyright (C) 1990-1999 Info-ZIP
Type 'zip "-L"' for software license.
Zip 2.3 (November 29th 1999).
Deepak kumar_3
Frequent Advisor

Re: Zip in VMS

Should i download new zip exe if yes from where i can
Wim Van den Wyngaert
Honored Contributor

Re: Zip in VMS

I'm using 2.1 but that should not be the problem.
Did you try
zip/vms bc23backup.zip krSHNA$DKA100:[WORK.bc3.0...] /exclude=(*.lis,*.exe,*.map,*.obj,*.objd)

WITHOUT the unix mode qualifiers ?
(My version is not accepting them)
Wim
Antoniov.
Honored Contributor

Re: Zip in VMS

Hi Deepak,
zip use unix style qualifier.
I guess your command mey be this:

zip "-V9" bc23backup.zip krSHNA$DKA100:[WORK.BC3.0...]*.* krSHNA$DKA100:[WORK...]-x *.lis,*.exe,*.map,*.obj,*.objd

Best Regards
Antonio Vigliotti
Antonio Maria Vigliotti
Martin P.J. Zinser
Honored Contributor
Solution

Re: Zip in VMS

Hello Deepak,

there has been quite a bit of confusion here
concerning zip commandline syntax. Zip can actually be build with a DCL style interface (/level=9 etc.) or the Unix style interface (-9). One important thing to note is that you can not mix and match the two interfaces. You either have to use all DCL or all Unix qualifiers.

Antonio gave you the right answer

zip "-9V" file.zip disk:[dir...]*.* -x *.ext1 *.ext2

will give the result you want. Attention: You do need the quotes around "-9V" ! Else the uppercase V will end-up eventually as a lowercase v when parsed by Zip and cause verbose operation instead of saving VMS file attributes.

Greetings, Martin
Deepak kumar_3
Frequent Advisor

Re: Zip in VMS

Hi All,

Its worked after Martin suggestion ie previously we are giving dcl -x command with comma's which was creating a problem so commas are not required in DCL command.

Deepak