02.05.2013 Views

SAS(R) 9.1.3 Companion for z/OS

SAS(R) 9.1.3 Companion for z/OS

SAS(R) 9.1.3 Companion for z/OS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

312 CPORT Procedure Chapter 16<br />

Example of Converting an SPSS File<br />

The following statements convert an SPSS Release 9 file and produce the temporary<br />

<strong>SAS</strong> data set TEMP, which contains the converted data. The output generated by<br />

PROC CONTENTS is similar in <strong>for</strong>mat to Output 16.6.<br />

filename spss ’userid.spssfile.num1’;<br />

proc convert spss=spss out=temp;<br />

run;<br />

title ’SPSSR9 CONVERT Example’;<br />

proc contents;<br />

run;<br />

See Also<br />

CPORT Procedure<br />

3 “Introduction to the BMDP, SPSS, and <strong>OS</strong>IRIS Engines” on page 67.<br />

Writes <strong>SAS</strong> data sets and catalogs into a special <strong>for</strong>mat in a transport file<br />

z/<strong>OS</strong> specifics: specification of transport file<br />

Details<br />

The DISK option is the default <strong>for</strong> the CPORT procedure; there<strong>for</strong>e, PROC CPORT<br />

defaults to writing to a file on disk instead of on a tape. If you want to write to a file on<br />

tape, specify the TAPE option or assign the fileref or DDname of <strong>SAS</strong>CAT to a tape.<br />

You are not required to define the logical name <strong>SAS</strong>CAT to your tape, and you are<br />

not required to specify the full DCB attributes. However, the BLKSIZE= value must be<br />

an integral multiple of 80; a value of 8000 is recommended.<br />

Here is an example of exporting all the <strong>SAS</strong> data sets and catalogs in a <strong>SAS</strong> data<br />

library to a transport file on disk. Note that the FILENAME statement specifies<br />

BLKSIZE=8000.<br />

libname oldlib ’<strong>SAS</strong>-data-library’;<br />

filename tranfile ’transport-file-name’<br />

blksize=8000 disp=(new,catlg);<br />

proc cport library=oldlib file=tranfile;<br />

run;<br />

PROC CPORT writes a transport file to the physical file that is referenced by<br />

TRANFILE. The file contains all the data sets and catalogs in the <strong>SAS</strong> data library<br />

OLDLIB.<br />

See Also<br />

3 Moving and Accessing <strong>SAS</strong> Files<br />

3 “CIMPORT Procedure” on page 304<br />

3 Base <strong>SAS</strong> Procedures Guide

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!