-
Notifications
You must be signed in to change notification settings - Fork 9
/
basic.sas
38 lines (28 loc) · 878 Bytes
/
basic.sas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
%let printto_path=p:\ath\to\some\directory;
options pagesize=max;
options nonotes;
/* Only write source lines with errors to the log: */
options nosource;
proc printto
/* Redirect output to print.txt and log.txt */
print = "&printto_path\print.txt"
log = "&printto_path\log.txt"
new; /* new: force creation of new file rather than appending to existing one */
run;
%put Put something into log.txt;
%put ;
%put The automatic macro variable sysprinttolog contains;
%put the destination path for the log file set by;
%put the printto procedure;
%put sysprinttolog = &sysprinttolog;
%macro tq84_check_pagesize;
/* This macro writes 500 lines to demonstrate
the effect of the pagesize option */
%do i = 1 %to 500;
%put checking pagesize (i = &i);
%end;
%mend;
%tq84_check_pagesize;
proc printto;
/* Restore redirection */
run;