SAS Component Language Dictionary |
Returns the number of members in a directory
-
nval
-
contains the number of members in
the directory.
Type: Numeric
-
directory-id
-
is the identifier that was assigned
when the directory was opened. If directory-id
is invalid, the program halts.
Type: Numeric
You can use DNUM to determine the largest
member number that can be passed to DREAD.
Open the directory MYDIR, determine the
number of members, and 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');
memcount=dnum(dirid);
rc=dclose(dirid);
DREAD
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.