SAS: add a comment to lst ouput file

In SAS, how to add comments to my .LST output file. How to add a comment saying "This is the result for tbl_TestMacro:" right before the proc printout is done? So my output file will read:

This is the output for tbl_TestMacro:
Obs    field1    field2

 1        6         8  
 2        6         9  
 3        7         0  
 4        7         1  

Instead simply:

Obs    field1    field2

 1        6         8  
 2        6         9  
 3        7         0  
 4        7         1  

Thanks Dan

+3
source share
3 answers

Or you could do

data _null_;
    file print;
    put "this is the output";
    file log;
run;

See http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000171874.htm for more information on changing the "put." Destination.

+2
source

You may have a better chance of stackoverflow for issues with a numerical computational language (such as SAS and R).

. TITLE PUT :

title "This is the output for tbl_TestMacro:";

put This is the output for tbl_TestMacro:;
+7

, "put" , .

, .

SAS . , , SASweave StatWeave, Russ Lenth. , . R Sweave.

, , , :

data mytext;
text = "This is the output for tbl_TestMacro";
run;

proc print noobs data = mytext split='*';
var text;
label text = '*';
run;

( , , .)

+2

Source: https://habr.com/ru/post/1738363/


All Articles