Help using Base SAS procedures

New option doesnt seem to work using filename

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 9
Accepted Solution

New option doesnt seem to work using filename


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?


Accepted Solutions
Solution
‎03-04-2013 06:23 AM
Respected Advisor
Posts: 3,777

Re: New option doesnt seem to work using filename

Put NEW in the proc printto statement.

View solution in original post


All Replies
Solution
‎03-04-2013 06:23 AM
Respected Advisor
Posts: 3,777

Re: New option doesnt seem to work using filename

Put NEW in the proc printto statement.

Super Contributor
Posts: 276

Re: New option doesnt seem to work using filename

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

Occasional Contributor
Posts: 9

Re: New option doesnt seem to work using filename

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

☑ This topic is SOLVED.

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

Discussion stats
  • 3 replies
  • 137 views
  • 5 likes
  • 3 in conversation