Hi dear,
Can someone please help me DREAD function from basic with clear example....
Here is an article with examples which could be helpful, it also has dopen, dnum, dclose functions with examples
http://www.mwsug.org/proceedings/2012/S1/MWSUG-2012-S128.pdf
Here is an article with examples which could be helpful, it also has dopen, dnum, dclose functions with examples
http://www.mwsug.org/proceedings/2012/S1/MWSUG-2012-S128.pdf
data files;
length file $128;
/* Define a filename pointing to the directory */
rc = filename("myDir", "C:\Users\PG\Documents\My SAS Files\9.4");
/* Open the directory, get directory id number */
dirId = dopen("myDir");
if dirId > 0 then do;
/* dnum() : nb of files in directory */
do i = 1 to dnum(dirId);
/* Read the ith file name from directory */
file = dread(dirId, i);
if length(file) > 0 then output;
end;
/* Close the open directory */
rc = dclose(dirId);
end;
drop rc dirId i;
run;
proc print; run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.