Chapter Contents

Previous

Next
DOPTNUM

DOPTNUM



Returns the number of information items that are available for a directory

Category: Directory


Syntax
Details
Example
See Also

Syntax

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


Details

DOPTNUM works only if the directory was previously opened by the DOPEN function.


Example

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

See Also

DINFO

DOPTNAME


Chapter Contents

Previous

Next

Top of Page

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