Skip to content

Instantly share code, notes, and snippets.

@frayos
Created November 22, 2017 10:06
Show Gist options
  • Save frayos/9df880ac819736a9b0dc64499058aec0 to your computer and use it in GitHub Desktop.
Save frayos/9df880ac819736a9b0dc64499058aec0 to your computer and use it in GitHub Desktop.
IO Testing with SAS
%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