Chapter Contents

Previous

Next
DNUM

DNUM



Returns the number of members in a directory

Category: Directory


Syntax
Details
Example
See Also

Syntax

nval=DNUM(directory-id);

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


Details

You can use DNUM to determine the largest member number that can be passed to DREAD.


Example

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);

See Also

DREAD


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.