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.

314 DBF Procedure Chapter 16<br />

DBF Procedure<br />

Converts a dBASE file to a <strong>SAS</strong> data set or a <strong>SAS</strong> data set to a dBASE file<br />

z/<strong>OS</strong> specifics: all<br />

Syntax<br />

PROC DBF options ;<br />

The following options can be used in the PROC DBF statement:<br />

DB2|DB3|DB4|DB5=fileref<br />

specifies the fileref of a DBF file. The fileref may be allocated via a <strong>SAS</strong><br />

FILENAME statement, a JCL DD statement (in batch mode), or a TSO ALLOC<br />

command (under TSO). For further in<strong>for</strong>mation on fileref specification, see “Ways<br />

of Allocating External Files” on page 73. The DBF file can be stored as a<br />

sequential data set (such as sasdemo.emp.dbf), a partitioned z/<strong>OS</strong> data set<br />

member (such as sasdemo.dbf.pds(emp)), or a file in an hierarchical file system<br />

(such as /u/sasdemo/emp.dbf). For further in<strong>for</strong>mation on file naming<br />

requirements, see “Referring to External Files” on page 84.<br />

If the fileref is allocated with a FILENAME statement, the statement may<br />

optionally specify RECFM=N to identify the DBF file as binary.<br />

The DBn option must correspond to the version of dBASE with which the DBF<br />

file is compatible. Specify a DBF file with the DBn option, where n is 2, 3, 4, or 5.<br />

You can specify only one of these values.<br />

DATA=member<br />

names the input <strong>SAS</strong> data set, using 1–32 characters. Use this option if you are<br />

creating a DBF file from a <strong>SAS</strong> data set. If you use the DATA= option, do not use<br />

the OUT= option. If you omit the DATA= option, <strong>SAS</strong> creates an output <strong>SAS</strong> data<br />

set from the DBF file.<br />

OUT=member<br />

names the <strong>SAS</strong> data set that is created to hold the converted data, using 1–32<br />

characters. Use this option only if you do not specify the DATA= option. If OUT=<br />

is omitted, <strong>SAS</strong> creates a temporary data set in the WORK library. The name of<br />

the temporary data set is DATA1 [...DATAn]. If OUT= is omitted or if you do not<br />

specify a two-level name in the OUT= option, the <strong>SAS</strong> data set that is created by<br />

PROC DBF remains available during your current <strong>SAS</strong> session (under the<br />

temporary data set name), but it is not permanently saved.<br />

Details<br />

You can use PROC DBF in the z/<strong>OS</strong> environment if your site has a license <strong>for</strong><br />

<strong>SAS</strong>/ACCESS <strong>for</strong> PC File Formats. To see a list of your licences, submit<br />

proc setinit; run;<br />

If you are licensed, you will see an entry in your <strong>SAS</strong> log <strong>for</strong> <strong>SAS</strong>/ACCESS <strong>for</strong> PC<br />

File Formats.<br />

The DBF procedure converts files in DBF <strong>for</strong>mat to <strong>SAS</strong> data sets that are<br />

compatible with the current <strong>SAS</strong> release. You can also use PROC DBF to convert <strong>SAS</strong><br />

data sets to files in DBF <strong>for</strong>mat.

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

Saved successfully!

Ooh no, something went wrong!