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.

262 FINFO Function Chapter 13<br />

Details<br />

FINFO returns the value of a system-dependent in<strong>for</strong>mation item <strong>for</strong> an external file<br />

that was previously opened and assigned a file-id by the FOPEN function. FINFO<br />

returns a blank if the value given <strong>for</strong> info-item is valid.<br />

The FINFO, FOPTNAME, and FOPTNUM functions support the following<br />

in<strong>for</strong>mation items.<br />

Table 13.4 In<strong>for</strong>mation Items <strong>for</strong> UNIX System Services Files<br />

Item Item Identifier Definition<br />

1 File Name Filename<br />

2 Access Permission Read, write, and execute permissions <strong>for</strong> owner, group,<br />

and other<br />

3 Number of Links Number of links in the file<br />

4 Owner Name User ID of the owner<br />

5 Group Name Name of the owner’s access group<br />

6 File Size File size<br />

7 Last Modified Date file last modified<br />

Table 13.5 In<strong>for</strong>mation Items <strong>for</strong> Sequential Files and Members of PDSs and<br />

PDSEs<br />

Item Item Identifier Definition<br />

1 Dsname Filename<br />

2 Unit Disk type<br />

3 Volume Volume on which data set resides<br />

4 Disp Disposition<br />

5 Blksize Block size<br />

6 Lrecl Record length<br />

7 Recfm Record <strong>for</strong>mat<br />

Example 1: Sequential File In<strong>for</strong>mation<br />

The following example generates output that shows the in<strong>for</strong>mation items available<br />

<strong>for</strong> a sequential data set:<br />

data _null_;<br />

length opt $100 optval $100;<br />

/* Allocate file */<br />

rc=FILENAME(’myfile’,<br />

’userid.test.example’);<br />

/* Open file */

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

Saved successfully!

Ooh no, something went wrong!