Converting SAS files from VMS to AIX

This document describes the steps necessary to move special SAS files (data sets, format catalogs, graphics catalogs, etc.) from UVMVAX to the academic AIX system. It details the conversion and transfer procedures, then answers some questions you may have.

With the planned retirement of UVMVAX, SAS users who routinely create and use SAS files such as SAS data sets and catalogs must convert and transfer these files to the academic AIX system. If these files are not converted and transferred to the new system before the VAX is gone, you will lose all data and information contained in these files since they will be unusable on the academic AIX system. This includes any special SAS files you may have backed up on magnetic tape.

There are several ways to convert and transfer SAS data sets and catalogs. Most conversion methods treat SAS data sets and catalogs separately. The method described in this document treats all special SAS files in a directory as a SAS data library and converts all members of the library simultaneously, creating a single transport file.

The Conversion and Transfer Procedure

The procedure can be summarized in three steps. First, convert the SAS data library on UVMVAX to a SAS transport file. Second, transfer the transport file to the AIX system using ftp. Finally, convert the transport file back to a SAS data library on the AIX system. These steps are detailed below:

  1. Using the following SAS program, cport.sas, as an example, convert a SAS data library to a transport file on UVMVAX. This program assumes that you want to transfer all members of the SAS data library contained in your current directory.
       libname saslib '[ ]';
       proc cport library=saslib file='transprt.ssp';
       run;
    

    Multiple SAS transport files may be created in the same program. The following program creates two SAS transport files, each containing a different SAS data library:

       libname saslib1 '[j_college.project1]';
       proc cport library=saslib1 file='project1.ssp';
       run;
       libname saslib2 '[j_college.project2]';
       proc cport library=saslib2 file='project2.ssp';
       run;
    
    

    Run the cport.sas program to create the transport file on UVMVAX:

       $ sas cport.sas
    

    Check the SAS log file (cport.log) for errors.

  2. Transfer the transport file to the AIX system using ftp. Make sure the transfer is done in binary mode, not ASCII. In the following example, commands in italics are those you must type.

       $ ftp zoo.uvm.edu
       uvmvax Wollongong FTP User Process (Version 5.2-05)
       Trying 132.198.101.64 ...
       Connection Opened
       Using 8-bit bytes
       220 gnu.uvm.edu FTP server (UVM-1.5(3) Wed Aug 30 13:58:28 EDT 1995) ready.
       Name (gnu.uvm.edu:j_college): jcollege
       331 Password required for jcollege.
       Password:  (type in your Zoo password here)
       230 User jcollege logged in.
       *bin
       200 Type set to I.
       *put transprt.ssp
       200 PORT command successful.
       150 Opening BINARY mode data connection for transprt.ssp.
       226 Transfer complete.
       Local: SYS$USER:[J_COLLEGE]TRANSPRT.SSP;  Remote: transprt.ssp
       325458 bytes transfered in 0.68 seconds (467.40 Kbytes/second)
       *quit
       221 Goodbye.
    
    

    Multiple transport files can be transferred with a single ftp command. Use mput *.ssp in place of put transprt.ssp in the above example. You will be prompted for confirmation to transfer each file with a .ssp extension.

  3. Convert the transport file back to a SAS data library on the AIX system, using the following program, cimport.sas, as an example. This program will create the SAS data library in your current directory.
       libname saslib '.';
       proc cimport library=saslib infile='transprt.ssp' ;
       run;
    

    Multiple SAS transport files may be processed in the same program. The following program recreates two SAS data libraries from two separate transport files, placing one library in the subdirectory called project1, and the other library in another subdirectory called project2:

       libname saslib1 '~jcollege/project1';
       proc cimport library=saslib1 infile='project1.ssp' ;
       run;
       libname saslib2 '~jcollege/project2';
       proc cimport library=saslib2 infile='project2.ssp' ;
       run;
    
    

    Run the cimport.sas program to recreate the SAS data library on the AIX system:

       jcollege@gnu.uvm.edu 51>sas cimport.sas 
    
    

    Check the SAS log file (cimport.log) for errors.

Q & A

Now here are some questions (with answers!) you may have about SAS system files and this conversion process.

Q: What are SAS data libraries and how can I tell if I have any on UVMVAX?

A: SAS data libraries are collections of special binary files created by SAS. A SAS data library is usually nothing more than the special SAS files contained in a subdirectory on UVMVAX. They can contain SAS data sets, format catalogs, graphics catalogs, template catalogs, and several other types of special SAS files. SAS data sets contain all the original data, plus any new computed or recoded variables, variable labels, formats, etc. On UVMVAX, all SAS data sets have the extension .SASEB$DATA. SAS catalogs can contain formats created by PROC FORMAT, graphs created by procedures in SAS/GRAPH, or many other types of special SAS files. SAS catalogs on UVMVAX all have the extension .SASEB$CATALOG.

Q: This conversion process sounds complicated. Is there an alternate procedure?

A: Yes. If you still have ASCII files containing the original raw data and SAS program files which created the SAS data set and/or formats, graphs, etc., you could simply transfer the data and program files to the new AIX system. Once there, you would just rerun the SAS program, which would read the data from the ASCII file and recreate the SAS data set and catalogs.

There is a drawback to this, however. You may have run other SAS programs which computed new variables, recoded variables, or modified or added to the data or catalogs in some way. You would need to find all these extra SAS programs, transfer them to the new system, and rerun them after they were transferred.

Q: I know how to do a binary file transfer with ftp. Why can't I just transfer my SAS files from one computer to another?

A: While you can successfully do a binary transfer of special SAS files, the operating system on the receiving end will not be able to interpret the information in the files. Binary files are specific to an operating system (like MS-DOS, VMS, or Unix). A SAS data set or catalog created on UVMVAX can be used only on UVMVAX (or on another VAX/VMS system). Likewise, a SAS data set or catalog created on Zoo can be used only on Zoo (or on another AIX system).


Last updated: 12 February 1996.
For more information, contact Alan.Howard@uvm.edu