Created
November 22, 2017 10:06
-
-
Save frayos/9df880ac819736a9b0dc64499058aec0 to your computer and use it in GitHub Desktop.
IO Testing with SAS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%macro doit(command); | |
filename p pipe &command lrecl=32767; | |
data _null_; | |
infile p; | |
input; | |
put _infile_; | |
run; | |
%mend; | |
%macro testIO(REPERTOIRE); | |
libname TEST "&REPERTOIRE"; | |
data TEST.testSAS; | |
do i=1 to 100000000; | |
var1=int(ranuni(45123)*6864)+1000; | |
var2=int(ranuni(45123)*6864)+1000; | |
var3=int(ranuni(45123)*6864)+1000; | |
var4=int(ranuni(45123)*6864)+1000; | |
var5=int(ranuni(45123)*6864)+1000; | |
output; | |
end; | |
run; | |
option LS=256; | |
%doit('ulimit -a'); | |
%doit('df -k /tmp'); | |
%doit("cd &REPERTOIRE;time dd if=/dev/zero bs=1024 count=4097152 of=./test.large.file;du -sk ./test.large.file;du -sk ./testsas.sas7bdat;df -k ./"); | |
%mend testIO; | |
%testIO(/tmp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment