Date: Fri, 10 Sep 2010 08:17:31 -0400
Reply-To: Nat Wooding <nathani@VERIZON.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Nat Wooding <nathani@VERIZON.NET>
Subject: Re: Create dataset from the most recent proc print
In-Reply-To: <5E024EE6ADBB4414B39FE20C563FE5F7@D1871RB1>
Content-Type: text/plain; charset="US-ASCII"
I had a couple minutes and needed some ODS practice. Here is code that might
help.
Nat Wooding
filename out 'c:\park\TestOutput.CSV' ;
ods csv file = out ;
Proc Print data = sashelp.htmutil;
run ;
ods csv close;
PROC IMPORT OUT= MyPrintResults
DATAFILE= "C:\Park\TestOutput.CSV"
DBMS=CSV REPLACE;
GETNAMES=YES;
DATAROW=2;
RUN;
filename out clear;
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Nat
Wooding
Sent: Friday, September 10, 2010 8:00 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Create dataset from the most recent proc print
You could use ODS to write the proc print output to, say, a CSV file and
then read this back as data. A similar, more classical approach would use
Proc Printto to send the output to a flat file which you would then read in
a similar fashion.
Nat Wooding
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of SAS For
Us
Sent: Friday, September 10, 2010 7:54 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Create dataset from the most recent proc print
Dear SAS-L users,
I wonder if there is a way to create sas dataset from the most recent proc
print output. Ideally, some code inserted after the proc print code that
will create the table preserving the original dataset atributes, and only
selecting the data as specified in proc print where statement?
Your help is much appreciated!
Thanks,
Russ
Sent on the SprintR Now Network from my BlackBerryR