0
votes

I have a table in sas format (.sas7bdat) and would like to output it in Jupyter notebook.

proc print data=dataBoxE.my_data (firstobs=2 obs=12);
run;

The output table is jammed together since it has 100+ columns. How should I setup the environment within my notebook?

Moreover, is there a way to save the log file instead of opening it right away in the output cell? Thanks.

1

1 Answers

0
votes

In SAS you can change the location of where the log file is created using proc printto; Documentation here.

When using proc printto, don't forget to reset the location to the default system value at the end of your, Example:

proc printto log='c:\em\log1.log';
   run;
/* Your code here */
proc printto;
run;

If you don't need the 100+ columns; then select only the ones you want using the VAR statement in proc print Documentation here :

proc print data=exprev;
   var country price sale_type;
run;

If you want all the 100+; just export them to csv using proc export and view them in any spreadsheet reader to avoid crashing your browser. Documentation here.

proc export data=sashelp.class
   outfile='c:\myfiles\Femalelist.csv'
   dbms=csv
   replace;
run;