Help using Base SAS procedures

ODS Trace

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 89
Accepted Solution

ODS Trace

Hello, All

Suppose i have following codes:

ODS Trace On;

     Proc Logistic ....

     ....

     Run;

ODS Trace Off;

By default, each output object (including Name, Label, Template and Path) was written to SAS log; is there a waythose information can be written to a dataset?


Accepted Solutions
Solution
‎11-15-2011 02:32 AM
Super User
Posts: 10,018

ODS Trace

Posted in reply to littlestone

you can use proc printto to redirect the log into a external file. and transform it into dataset.

proc printto log='c:\trace.txt';run;
ods trace on;
proc glm data=sashelp.class;
 model weight=height;
quit;
ods trace off;
proc printto;run;

data want;
 infile 'c:\trace.txt' length=len;
 input list $varying200.len;
run;



Ksharp

View solution in original post


All Replies
Solution
‎11-15-2011 02:32 AM
Super User
Posts: 10,018

ODS Trace

Posted in reply to littlestone

you can use proc printto to redirect the log into a external file. and transform it into dataset.

proc printto log='c:\trace.txt';run;
ods trace on;
proc glm data=sashelp.class;
 model weight=height;
quit;
ods trace off;
proc printto;run;

data want;
 infile 'c:\trace.txt' length=len;
 input list $varying200.len;
run;



Ksharp

Frequent Contributor
Posts: 89

ODS Trace

Thank you very much.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 144 views
  • 0 likes
  • 2 in conversation