Skip Navigation Links
Finding and transferring MVS Disk and Tape Datasets
By Dr. Philip Baczewski, Associate Director of Academic Computing
This is the second in a series of articles intended to help Academic Mainframe users move data and files off of that system.
As was discussed in last month's issue, Academic Mainframe services will no longer be available to individuals after May of 2003. Last month's article discussed transferring files from a CMS account. This month features a discussion of transferring MVS data files off of the mainframe.
First, however, there is an update to the use of FTP to transfer files from a VM/CMS account. This process has been made much easier by the fact that you no longer need to use your minidisk (or ACCOUNT) password to access the files on your CMS A disk. Instead, all you need to do is use your CMS UserID and login password and you will be automatically connected to the files on your A disk. If you have more than one disk on your CMS account, you can change to that disk by entering a "change directory" command to .nnn, where "." is your CMS login ID and "nnn" is the address of the disk. For example, in command line ftp if your USERID was FZ99, to change to your 291 (perhaps accessed as your "B" disk) disk you could enter:
Using WS_FTP, you could accomplish the same task by clicking on the "ChgDIr" button. Most people, however, only have one disk, their "A" or 191 disk.
Finding Disk Data Sets
If you have run jobs on the MVS batch system, chances are that you have saved MVS disk data sets. You can run a "Mapdisk" job to find data sets you may have on MVS disks. MVS disk storage is separate from CMS disk storage, so you must run a batch job to list your data sets. The following JCL will accomplish this for you:
//XXXXMAPD JOB (XXXX,:20,44),'YYYYYYYYYYYYYYY',PASSWORD=ZZZZZZZZ, // USER=XXXX /*ROUTE PRINT UNTVM1.XXXX //* ----------------------------------------------- //* - PLEASE MAKE THE FOLLOWING CHANGES BEFORE - //* - EXECUTING. - //* - 1. REPLACE XXXX WITH YOUR USERID - //* - WHEREVER IT OCCURS. - //* - 2. REPLACE ZZZZZZZZ WITH YOUR - //* - CURRENT OS/MVS BATCH PASSWORD. - //* - 3. REPLACE YYYYYYYYYYYYYYY WITH - //* - YOUR NAME. - //* ----------------------------------------------- // EXEC MAPDISK //DISK0 DD UNIT=SYSDA,VOL=SER=ACAD00,DISP=SHR //DISK1 DD UNIT=SYSDA,VOL=SER=ACAD01,DISP=SHR //DISK2 DD UNIT=SYSDA,VOL=SER=ACAD02,DISP=SHR //DISK3 DD UNIT=SYSDA,VOL=SER=ACAD03,DISP=SHR //DISK4 DD UNIT=SYSDA,VOL=SER=ACAD04,DISP=SHR XXXX$
Follow the directions provided in the JCL comments and submit this job as you would any other batch job. For convenience, you can access this file on the CMS D disk and copy it to your A disk using the following command:
COPY MAPDISK JCL D MAPDISK JCL A
You can change the route card if you wish to send the output directly to the printer. Otherwise, the output will be returned to your CMS reader and you can examine it there or receive it to your A disk. If you do need to move MVS files, having an online copy of your data set names will allow you to copy and paste those data set names into JCL you will need to move the files.
If you do have any MVS data sets, they will be listed in a format similar to the following:
USER.FZ99.DATA1 ACAD03 -/- 06/17/98 06/17/98 00.00 0 FB 32000 80 0 00 0 0 0 0 T
Other than the data set name, the information to notice is Record Format (RFm in the data header), Block Size (BlkSz), Logical Record Length (Lrecl), and the the disk volume where the data is stored (Serial). In the example above, the data set is in Fixed/Blocked format, has a Block Size of 32000 bytes, has an 80-byte Logical Record Length, and is stored on the ACAD03 volume. This information would be needed to write JCL to copy the file from MVS to CMS for download (this is discussed below).
Finding Tape Datasets
It is possible to store data sets on MVS tape volumes. There are relatively few Academic users, however, who have existing tape data sets. Unless an extended expiration date is specified, a tape data set will expire within 6 months and the tape will be recycled. If, however, you have written tape datasets and specified that they should not expire, those data sets may still be in the tape library.
If you've written tape data sets, you should have kept a record of the tape Volume Serial number (usually a 6-digit number). If you have that number you can run a Tapemap job to find out what data sets are on that tape. You'll find a copy on the CMS D disk and can copy it to your A disk using the following command:
COPY TAPEMAP JCL D TAPEMAP JCL A
You can then edit the JCL to include your User-ID, name, and password, as well as to indicate the tape volume where called for. Submit that job and you can use the resulting listing to find out the data set names stored on the tape and their format information needed to access those data sets via JCL.
Transferring Your MVS Data Sets
To download MVS data sets, you must first transfer them to your CMS disk. You can find information about this process via the RSS FAQ web page item, "RSS0009. How to download files from MVS?".
If your file is a SAS or SPSS system data set, you will need to convert those data sets to export format before they can be downloaded and used on a PC. This process is documented at "SAS0001. How to convert a SAS data set from the mainframe to SAS for Windows?". SPSS users will need to run a job which saves a portable file by including an EXPORT command which saves data to a "punch" file:
... //EXPFILE DD SYSOUT=B ... EXPORT OUTFILE=EXPFILE. ...
The punch data set will be returned to your CMS ID separately from the program message output and you can receive and download that file in order to import it into Windows SPSS.
The items above are just a starting point to provide some tools to begin the data transfer process. If you have used the Academic Mainframe for a long period of time, some or all of these tools should be familiar to you. If you have a large amount of data to transfer, you can make an appointment with ACS staff to help plan the process and, if necessary, explore some alternate tools to help accomplish the data transfer even more efficiently.
For information regarding SAS or SPSS files and programs, contact Rich Herrington, Research and Statistical Support Manager. Additionally, Cathy Hardy Academic Mainframe Consultant, and Philip Baczewski, Associate Director of Academic Computing can provide assistance with CMS or MVS file transfer utilities.
Remember that after May of 2003, Mainframe files will be inaccessible. The time to start the data transfer process is now. ACS Staff are available to help, but staff time will be much less available the closer to May that we get.