SAS Component Language Dictionary |
Returns information about a directory
attribute=DINFO(directory-id,info-item);
|
-
attribute
-
contains the value of the information item,
or a blank if info-item is invalid.
Type: Character
-
directory-id
-
is the identifier that was assigned when
the directory was opened. If directory-id is
invalid, the program halts.
Type: Numeric
-
info-item
-
is the information item to be retrieved.
Type: Character
DINFO returns the value of a system-dependent directory
parameter. The available information varies according to the operating system.
See the SAS documentation for your host operating system for information
about system-dependent directory parameters.
Use DOPTNAME to determine the names of the available
system-dependent directory information items. Use DOPTNUM to determine the
number of directory information items available.
Open the directory MYDIR, determine the number of directory
information items available, and retrieve the value of the last item:
/* Assign the fileref MYDIR to the */
/* pathname stored in the variable */
/* or entered in the DIRNAME field and open it.*/
rc=filename('mydir',dirname);
did=dopen('mydir');
numopts=doptnum(did);
foption=doptname(did,numopts);
charval=dinfo(did,foption);
rc=dclose(did);
DOPTNAME
DOPTNUM
FINFO
FOPTNAME
FOPTNUM
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.