BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
KarthikDeepak
Calcite | Level 5


Hi,

I am trying the below:

filename outfile '/camidata/usr_data/v32516/LEGAL_COMPLIANCE.txt' NEW;
 
proc printto print=outfile;
run;

proc print data=ABC_waterfall;
title 'WATERFALL DETAILS';
run;

But if I run the program again, it is appending to the contents of the file rather than creating it all over again.

Could someone help?

1 ACCEPTED SOLUTION

Accepted Solutions
3 REPLIES 3
data_null__
Jade | Level 19

Put NEW in the proc printto statement.

kuridisanjeev
Quartz | Level 8

HI  Karthik

"NEW" option is available in Proc Printot procedure,it clears any information that exists in a file and prepares the file to receive the SAS log or procedure output.

You can not use that in Filename statement.

Use NEW option in Proc Printto procedure as suggested by Data_null_

 

Syntax:

proc printto print='output-file' new;

run;



Thanks &Regards.


Sanjeev.K

KarthikDeepak
Calcite | Level 5

That was really dumb of me, I misplaced the NEW option.
Thanks for your help...

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3 replies
  • 767 views
  • 5 likes
  • 3 in conversation