SAS Component Language Dictionary |
Category: | Directory |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
attribute=DOPTNAME(directory-id,attribute-number); |
contains the directory option. If nval is out-of-range, the program halts and attribute contains the value that it held before the program halt.
contains the identifier that was assigned when the directory was opened. If directory-id is invalid, the program halts.
Details |
DOPTNAME works only if the directory was previously opened by the DOPEN function. The names and nature of directory information items vary depending on the operating system. The number of attributes that are available for a directory also varies depending on the operating system.
Example |
Open the directory identified by the fileref MYDIR, retrieve all system-dependent directory information items, write them to the SAS log, and then close the directory:
/* Assign the fileref MYDIR to the */ /* filename stored in the variable DIRNAME */ /* and open it. */ rc=filename('mydir',dirname); dirid=dopen('mydir'); numitems=doptnum(dirid); do j=1 to numitems; opt=doptname(dirid,j); put 'Directory information=' opt; end; rc=dclose(dirid);
See Also |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.