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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

266 FOPTNAME Function Chapter 13<br />

I INPUT mode allows reading only (default).<br />

O OUTPUT mode defaults to the OPEN mode that is specified in<br />

the host option in the FILENAME statement or function. If no<br />

host option is specified, it allows writing new records at the<br />

beginning of the file.<br />

S Sequential input mode is used <strong>for</strong> pipes and other sequential<br />

devices such as hardware ports.<br />

U UPDATE mode allows both reading and writing.<br />

record-length<br />

specifies the logical record length of the file. To use the existing record length <strong>for</strong> the<br />

file, specify a length of 0, or do not provide a value here.<br />

record-<strong>for</strong>mat<br />

specifies the record <strong>for</strong>mat of the file. To use the existing record <strong>for</strong>mat, do not<br />

specify a value here. Valid values are as follows:<br />

B data should be interpreted as binary data.<br />

D use default record <strong>for</strong>mat.<br />

E use editable record <strong>for</strong>mat.<br />

F file contains fixed length records.<br />

P file contains printer carriage control in host-dependent record<br />

<strong>for</strong>mat. For data sets with FBA or VBA record <strong>for</strong>mat, specify ‘P’<br />

<strong>for</strong> the record-<strong>for</strong>mat argument.<br />

V file contains variable-length records.<br />

Details<br />

FOPEN returns a 0 if the file could not be opened. Under z/<strong>OS</strong>, files that have been<br />

opened with FOPEN must be closed with FCL<strong>OS</strong>E at the end of a DATA step; files are<br />

not closed automatically after processing.<br />

FOPEN can be used to open DDnames with instream data that are not already<br />

opened if you specify ‘S’ <strong>for</strong> the open-mode attribute.<br />

See “FINFO Function” on page 261 <strong>for</strong> code examples.<br />

See Also<br />

FOPTNAME Function<br />

3 “FCL<strong>OS</strong>E Function” on page 257<br />

3 “FOPTNAME Function” on page 266<br />

3 “FOPTNUM Function” on page 267<br />

Returns the name of an in<strong>for</strong>mation item <strong>for</strong> an external file<br />

Category: External Files<br />

z/<strong>OS</strong> specifics: info-item<br />

See: FOPTNAME Function in <strong>SAS</strong> Language Reference: Dictionary

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

Saved successfully!

Ooh no, something went wrong!