BookmarkSubscribeRSS Feed
sunilreddy
Fluorite | Level 6

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

4 REPLIES 4
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

sunilreddy
Fluorite | Level 6

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

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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;

Cynthia_sas
SAS Super FREQ


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;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1349 views
  • 0 likes
  • 3 in conversation