This article was originally published in Perspective, Volume 19, Number 3, 1995, pp. 26-30.

The countdown clock reminds users to complete the migration off the ES/9000 by June 30, 1996.
by Michael Mitchell, Ph.D.
Would you like to move your SAS data libraries from MVS to AIX, so you can use SAS on AIX? Unfortunately, you cannot just copy your MVS SAS data libraries to AIX, because SAS data libraries can be read only on the platform on which they were created. For example, your SAS data libraries created on MVS can only be read on an MVS computer.
Fortunately, you can use SAS to create a "SAS transport file," a kind of generic file which can be transferred to other platforms (such as AIX). The file can then be transferred to the new platform and used to create a SAS data library for that host system. This article illustrates how to move an MVS SAS data library to AIX via a SAS transport file.
This article assumes the reader knows how to submit batch jobs on MVS and how to submit batch jobs on AIX via LoadLeveler.
This article describes four steps that you can use to transport a SAS data library from MVS to AIX. These steps are listed below and illustrated in Figure 1.
This article provides sample SAS setups illustrating how to transport a SAS data library called "election.saslib" from MVS to AIX following these four steps. This library has three data members (called winners, losers, and totals) and a format catalog (called formats). These sample setups, and other associated files, are provided online. See the section "For More Information" at the end of this article to learn how to access these online examples.
Figure 2 shows a SAS job which is written for MVS to convert the SAS data library (AAAAIII.ELECTION.SASLIB) to a SAS transport file (AAAAIII.XPT. ELECTION).
Part A uses the SAS LIBNAME statement to assign the libref (INSAS) to the MVS SAS data library (AAAAIII.ELECTION.SASLIB), and a FILENAME statement to assign a fileref (OUTXPT) to the transport file to be created (AAAAIII.XPT.ELECTION). It is important that you create the transport file as a fixed block file with a logical record length of 80, and a blocksize of 8000, as shown in the example.
In part B, the CONTENTS, MEANS, and PRINT procedures are used to inspect the data members of the MVS SAS data library. Include one MEANS and one PRINT procedure for each data member in your SAS data library. (If your data library contains many non-numeric variables, you may want to use PROC FREQ as well as PROC MEANS.)
The sample program for the election dataset contains a PROC MEANS and PROC PRINT statement for each of its three members (winners, losers, and totals). The contents of the format catalog (formats) are displayed using PROC FORMAT with the FMTLIB option. These same procedures will be applied to the AIX SAS data library (in step 3), so that the MVS results can be compared to the AIX results (in step 4).
Finally, part C uses the CPORT procedure to convert the SAS data library to a SAS transport file. The CPORT procedure in this example places all members of the MVS SAS data library into the transport file. See the SAS Procedures Guide for examples of copying selected members to the transport file.
SAS transport files can be transported to AIX using File Transfer Protocol (FTP). See the companion article in this issue titled "How to Use FTP to Transfer Datasets from MVS to AIX" for information about using FTP to transfer your SAS transport files to AIX. SAS transport files must be transferred using binary transfer mode.
Once the SAS transport file has been transferred from MVS to AIX, it can be converted to a SAS data library for processing on AIX. Figure 3 shows a sample setup which is written for AIX to convert the SAS transport file "xpt.election" to an AIX SAS data library.
Part A shows how to use the SAS FILENAME statement to assign a fileref (inxpt) to the SAS transport file (xpt.election), and how to use the SAS LIBNAME statement to assign a libref to the AIX SAS data library. ('.' instructs SAS to place the members of the SAS data library in the current working directory.)
Part B uses the CIMPORT procedure to convert the SAS transport file to an AIX SAS data library. In AIX, each member of a SAS data library is placed in its own file. In our example, the data members will be named "winners.ssd01", "losers.ssd01", "totals.ssd01", and the format catalog will be called "formats.sct01". The LIBNAME statement specifies where these files will be placed - in our example, the current directory.
Part C uses PROC CONTENTS, PROC MEANS, and PROC PRINT to inspect the AIX SAS data library. Include one MEANS and one PRINT procedure for each data member in your SAS data library. The PROC FORMAT statement with the FMTLIB option is used to display the contents of the format catalog.
Steps 1 and 3 included descriptive procedures to inspect the MVS and AIX SAS data libraries. These results can be compared to verify that the transfer and conversion were error free.
Examine the output from the CONTENTS procedure. Does the AIX SAS data library include all of the members in the original MVS SAS data library? Do the members of the MVS and AIX SAS data libraries have the same number of observations? Do they have the same number of variables? Do they have the same variable names?
Examine the output from the MEANS procedure. Do the variables in the MVS and AIX SAS data libraries have the same Ns? The same means? The same standard deviations?
Examine the output from the PRINT procedure. Do the first ten observations of the MVS and AIX SAS data libraries contain the same data?
Examine the output from the FORMAT procedure. Are the entries in the MVS format catalog the same as the entries in the AIX format catalog?
If there is a conflict between the MVS and AIX results, you should repeat the transfer and conversion processes. If the MVS and AIX results still conflict, contact OAC Consulting for assistance (see the section "For More Information" below).
For simplicity, these examples make some assumptions. The example in Figure 2 assumes that you are transporting version 6 SAS datasets which are located on disk. The example in Figure 3 looks for the transport file in the current directory, and places the AIX SAS data library in the current directory.
This article is intended to assist users in the transfer of SAS data libraries from MVS to AIX, and may not apply to transfers involving other host systems. This article does not describe how to transfer your existing SAS programs from MVS to AIX. See the companion articles "How to Identify MVS Datasets for Migration" and "How to Use FTP to Transfer Your Datasets from MVS to AIX" for information about how to transfer your SAS programs to AIX.
Moving SAS data libraries with FTP
Example setup to convert an MVS SAS data library to a SAS transport file
Example setup to convert a SAS transport file to an AIX SAS data library
Michael Mitchell, Ph.D., is an OAC Statistical Consultant who provides guidance to users in the implementation of statistical methodologies and the analysis of large and complex databases.
18 Jul 95; Rev. 19 Dec 95