Returns directory attribute information.
Category: | External Files |
See: | DOPTNAME Function: Windows in SAS Companion for Windows |
DOPTNAME Function: UNIX in SAS Companion for UNIX Environments | |
DOPTNAME Function: z/OS in SAS Companion for z/OS |
%let filrf=mydir;
%let rc=%sysfunc(filename(filrf,physical-name));
%let did=%sysfunc(dopen(&filrf));
%let infocnt=%sysfunc(doptnum(&did));
%do j=1 %to &infocnt;
%let opt=%sysfunc(doptname(&did,&j));
%put Directory information=&opt;
%end;
%let rc=%sysfunc(dclose(&did));
data diropts;
length optname $ 12 optval $ 40;
keep optname optval;
rc=filename("mydir","physical-name");
did=dopen("mydir");
numopts=doptnum(did);
do i=1 to numopts;
optname=doptname(did,i);
optval=dinfo(did,optname);
output;
end;
run;