The SAS Output Delivery System and reporting techniques

proc print in DI Job

Reply
Frequent Contributor
Posts: 115

proc print in DI Job

Hi,

I am using Proc print statement in DI Job, When i am testing thru DI job, its writing output into output window by default.

I dont want to write the output into output window, Can u please suggest the option to control this

Super User
Super User
Posts: 7,401

Re: proc print in DI Job

What would you like it to output to?  In base SAS output destination is set with the ods command, e.g. for rtf: ods rtf file="....";

There are various options for ods (output delivery system), so perhaps read on that.

Frequent Contributor
Posts: 115

Re: proc print in DI Job

I am using below statements to write sas dataset output to csv file.

ods tagsets.csvall options(sheet_name="Test");

  Proc Print data=data1 noobs width=full style(data)={background=white};

       run;

ods tagsets.csvall close;

But when i am running it in DI job thru DI studo, dataset output is writing in output window. Is thr any way to suppress the proc print output in below output window only

Super User
Super User
Posts: 7,401

Re: proc print in DI Job

Sorry, I think you are mixed up a bit there.  Firstly there is no CSV tagset.  Secondly it seems you are trying to output to Excel as you specify a "Sheet" which CSV wouldn't have.  You have then not supplied a filename to output to.  What I think you need is:

ods listing close;

ods noresults;

ods tagsets.excelxp file="your output file" options (sheet_name="Test");

  Proc Print data=data1 noobs width=full style(data)={background=white};

       run;

ods tagsets.excelxp close;

SAS Super FREQ
Posts: 8,743

Re: proc print in DI Job


Hi, there ARE 3 CSV tagset template-based destinations: CSVALL, CSV and CSVBYLINE. But you are correct that SHEET_NAME and other ODS STYLE overrides are irrelevant to the CSV-based destinations. For example, if you run this code, you will get 3 different CSV files. Only in the last one will you see the SAS Title and, the SHEET_NAME suboption will be ignored.

Cynthia

proc sort data=sashelp.class out=class;

by age name;

run;

    

ods csv file='c:\temp\simple_csv.csv';

ods tagsets.csvbyline file='c:\temp\csv_byline.csv';

ods tagsets.csvall file='c:\temp\csv_all.csv' options(sheet_name='Test');

  

proc print data=class;

by age;

title 'The Students';

run;

ods _all_ close;

Ask a Question
Discussion stats
  • 4 replies
  • 521 views
  • 0 likes
  • 3 in conversation