Returns information about a directory.
| Category: | External Files |
| Windows specifics: | directory pathname is the only information available |
| See: | DINFO Function in SAS Functions and CALL Routines: Reference |
specifies the identifier that was assigned when the directory was opened, generally by the DOPEN function.
specifies the information item to be retrieved. DINFO returns a blank if the value of info-item is invalid.
data a;
rc=filename("tmpdir", "c:");
put "rc = 0 if the directory exists: " rc=;
did=dopen("tmpdir“);
put did=;
numopts=doptnum(did);
put numopts=;
do i = 1 to numopts;
optname = doptname(did,i);
put i= optname=;
optval=dinfo(did,optname);
put optval=;
end;
run;NOTE: PROCEDURE PRINTTO used (Total process time):
real time 0.03 seconds
cpu time 0.00 seconds
446 data a;
447 rc=filename("tmpdir", "c:");
448 put "rc = 0 if the directory exists: " rc=;
449 did=dopen("tmpdir");
450 put did=;
451 numopts=doptnum(did);
452 put numopts=;
453 do i = 1 to numopts;
454 optname = doptname(did,i);
455 put i= optname=;
456 optval=dinfo(did,optname);
457 put optval=;
458 end;
459 run;
rc = 0 if the directory exists: rc=0
did=1
numopts=1
i=1 optname=Directory
optval=C:\TEMP\elimal
NOTE: The data set WORK.A has 1 observations and 6 variables.
NOTE: DATA statement used (Total process time):
real time 0.08 seconds
cpu time 0.04 seconds
460 proc printto; run;