DOPTNUM Function


DOPTNUM Function

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

Category: External Files

See: DOPTNUM Function in the documentation for your operating environment.

Syntax

DOPTNUM ( directory-id )

Argument

directory-id

  • specifies the identifier that was assigned when the directory was opened, generally by the DOPEN function.

  • Restriction: The directory must have been previously opened by using DOPEN.

Details

Operating Environment Information: The number, names , and nature of the directory information varies between operating environments. The number of options that are available for a directory varies depending on the operating environment. For details, see the SAS documentation for your operating environment.

Examples

Example 1: Retrieving the Number of Information Items

This example retrieves the number of system-dependent directory information items that are available for the directory MYDIR and closes the directory:

 %let filrf=mydir;  %let rc=%sysfunc(filename(filrf,  physical-name  ));  %let did=%sysfunc(dopen(&filrf));  %let infocnt=%sysfunc(doptnum(&did));  %let rc=%sysfunc(dclose(&did)); 

Example 2: Using DOPTNUM within a DATA Step

This example creates a data set that retrieves the number of system-dependent information items that are available for the MYDIR directory:

 data _null_;     rc=filename("mydir","  physical-name  ");     did=dopen("mydir");     infocnt=doptnum(did);     rc=dclose(did);  run; 

See Also

Functions:

  • 'DINFO Function' on page 501

  • 'DOPEN Function' on page 503

  • 'DOPTNAME Function' on page 505




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net