Northern Illinois University

Information Technology Services

Creating a password-protected ZIP file on MVS

In case you have sensitive data on NIU's MVS system that is to be moved to another platform, you will want to ensure the security and integrity of the data is maintained while it is being transferred. To accomplish this goal, you'll want to encrypt your sensitive data before it leaves MVS and decrypt it once it arrives at the target platform. We have a version of PKZIP on the MVS system that can create encrypted, password-protected ZIP archives of your datasets.

Creating the ZIP file

To create the MVS zip file, you'll need to create a batch job based upon this model:

//ZIPPWD  JOB ,TIME=1
//*
//ZIP     EXEC PKZIP
//SYSIN     DD *
-ECHO
-ARCHIVE(logonid.SAMPLE.ZIP)
-ARCHUNIT(DISK)
-ARCHPRIMARY(20)
-ARCHSECONDARY(20)
-FILE_TERMINATOR()
-NIA(*,*)
-PASSWORD(MyPassword)
logonid.LOG.MISC
logonid.TESTJOBS(IEFBR14)
logonid.TESTJOBS(IEBGENER)
logonid.LIB.CLIST(*)

Specify the name of your ZIP dataset in the -ARCHIVE statement. Note that you'll want to code the full dataset name including logonid or other valid high-level qualifier. If your logonid is T90ABC1, you might name your ZIP file T90ABC1.SMTHING.ZIP. Specify the password of your choice in the -PASSWORD statement. If you wish to use the password secret$pw, provide this statement:

-PASSWORD(secret$pw)

-ARCHPRIMARY and -ARCHSECONDARY specify the size of the ZIP file in cylinders. Increase these numbers if your PKZIP job fails due to insufficient disk space. List the datasets you wish to ZIP following the -PASSWORD statement. As shown above, you may ZIP sequential datasets:

logonid.LOG.MISC

A PDS member:

logonid.TESTJOBS(IEFBR14)

or all members of a PDS:

logonid.LIB.CLIST(*)

You may list as many datasets as you wish. PKZIP on MVS, as on other platforms, supports the creation of ZIP archives from many input datasets. You are encouraged to take advantage of this feature to minimize the number of ZIP files you'll need to transfer from MVS. Note that this sample job is written to ZIP plain-text EBCDIC datasets that have a RECFM of FB or VB. SuperWylbur EDIT format datasets (RECFM=U) are not supported. If you wish to ZIP non-text datasets as binary data, include this statement in your JCL after the -PASSWORD statement:

-DATA_TYPE(BINARY)

This parameter affects the handling of all of the MVS datasets that are placed in the ZIP archive, so you can't create a ZIP of a mixture of text and binary datasets.

Transferring the MVS ZIP file

When you transfer your MVS ZIP file to another platform (Windows, UNIX, etc.), you must ensure that it is transferred as a binary file. This is essential even if the MVS datasets you included in the ZIP file are all plain text. You will likely encounter problems with unzipping the file if you fail to transfer it in binary mode.

Unzipping the MVS ZIP file

When you unzip the ZIP file you've created on MVS, you'll be prompted for a password. Enter the same password you specified in your MVS batch job. After the unzip is complete, your target folder will contain one or more files whose names will match the MVS dataset names of your input datasets. For example:

A01DGU1.LIB.CLIST(FS)
A01DGU1.LIB.CLIST(FTPSTAT)
A01DGU1.LIB.CLIST(LINKMVS)
A01DGU1.LIB.CLIST(SAY)
A01DGU1.LIB.CLIST(SIGNON)
A01DGU1.LOG.MISC
A01DGU1.TESTJOBS(IEBGENER)
A01DGU1.TESTJOBS(IEFBR14)

If your input datasets were plain EBCDIC text, these files will be in plain ASCII text (unless they contain characters that exist in EBCDIC but not in ASCII).