LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (August 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 16 Aug 2006 15:17:54 -0400
Reply-To:     Jack Clark <JClark@CHPDM.UMBC.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Clark <JClark@CHPDM.UMBC.EDU>
Subject:      Re: how to copy the structure of a table instead of data
Comments: To: Wensui Liu <liuwensui@GMAIL.COM>
Content-Type: text/plain


I'm not sure where you want to copy the structure. If you mean to create a new dataset (table) with zero observations, but with the same structure of an existing dataset, try this:

data test; x = 'AA'; y = 'WHY'; z = 67; output; run;

data test2; set test (obs=0); run;

proc contents data=test; run;

proc contents data = test2; run;

Dataset Test2 should have the same structure, without any of the data.

Jack Clark Research Analyst Center for Health Program Development and Management University of Maryland, Baltimore County

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Wensui Liu Sent: Wednesday, August 16, 2006 2:59 PM To: SAS-L@LISTSERV.UGA.EDU Subject: how to copy the structure of a table instead of data

Dear Listers,

Is there any way I can copy the structure of a table? I just need the structure and don't want any data in it.


-- WenSui Liu ( Senior Decision Support Analyst Health Policy and Clinical Effectiveness Cincinnati Children Hospital Medical Center

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