Date: Thu, 23 Apr 2009 13:59:06 -0700
Reply-To: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject: Re: how to create an empty table
In-Reply-To: A<6716d5d0904231230w272b5430g5139de74203793d7@mail.gmail.com>
Content-Type: text/plain; charset="us-ascii"
If you have a dataset you can simply stop the data step after the PDV is
built but before it executes.
data class;
stop;
set sashelp.class;
run;
Or on a related note, see the resulting PDV from a data step without
running the data:
data class(drop=age);
stop;
set sashelp.class sashelp.air;
AgeChar=put(age,z2.);
run;
This is similar to RUN CANCEL, except RUN CANCEL doesn't produce the
empty dataset:
data class(drop=age);
set sashelp.class sashelp.air;
AgeChar=put(age,z2.);
run cancel;
Paul Choate
DDS Data Extraction
(916) 654-2160
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Jeff
Sent: Thursday, April 23, 2009 12:30 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: how to create an empty table
This is tsql code.
create table t1(
id int,
ic varchar(10),
icd varchar(500),
Idca varchar(500)
)
I want to create a similar sas empty dataset,
how can I do that?
Thanks.
Jeff