-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSaveMyCode.sas
More file actions
43 lines (37 loc) · 792 Bytes
/
SaveMyCode.sas
File metadata and controls
43 lines (37 loc) · 792 Bytes
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
39
40
41
42
43
%Macro SaveMyCode_Start(path,file);
%put NOTE:[&sysmacroname] =====================================;
%if %superq(path)= %then
%let path=%sysfunc(pathname(work));
%if %superq(file)= %then
%let file=dump.txt;
%if %superq(path)=ALL %then
%do;
%let CARDS4=;
%put NOTE- Running all file;
%end;
%else
%do;
%put NOTE- Saving code to:;
%put NOTE- &path./&file.;
%let CARDS4=CARDS4;
DATA _NULL_;
FILE "&path./&file." LRECL=2048;
INFILE CARDS4;
INPUT;
PUT _INFILE_;
%end;
%Mend SaveMyCode_Start;
%Macro SaveMyCode_End();
RUN;
%put NOTE:[&sysmacroname] =====================================;
%Mend SaveMyCode_End;
/* Example: */
/*
%SaveMyCode_Start()
&CARDS4.;
data _test_code_saver;
set sashelp.class;
run;
;;;;
%SaveMyCode_End()
*/