LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2009, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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


Back to: Top of message | Previous page | Main SAS-L page