SAS Component Language Dictionary |
Returns the number of information items that are available for
a directory
num-attributes=DOPTNUM(directory-id);
|
-
num-attributes
-
contains the number of available
directory information items. If an error condition occurs, the program halts
and num-attributes contains the value that it
held before the program halt.
Type: Numeric
-
directory-id
-
contains the identifier that was
assigned when the directory was opened. If directory-id
is invalid, the program halts.
Type: Numeric
DOPTNUM works only if the directory was
previously opened by the DOPEN function.
Retrieve the number of system-dependent
directory information items that are available for the directory MYDIR 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');
infocnt=doptnum(dirid);
rc=dclose(dirid);
DINFO
DOPTNAME
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.