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 (June 1999, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 23 Jun 1999 13:45:44 -0500
Reply-To:   jason.sun@CAPITALONE.COM
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Comments:   To: "Paul M. Dorfman" <sashole@EARTHLINK.NET>
From:   Jason Sun <jason.sun@CAPITALONE.COM>
Subject:   Re: Adding rows to SAS dataset
Comments:   To: SAS-L@LISTSERV.VT.EDU
Content-Type:   text/plain; charset=US-ASCII

Perhaps I did not understand the question clearly. I am wondering why proc append is not suggested.

Jason Sun

______________________________ Reply Separator _________________________________ Subject: Re: Adding rows to SAS dataset Author: "Paul M. Dorfman" <sashole@EARTHLINK.NET> at Internet Date: 06/23/1999 11:44 AM

Peter Baade <Peter_Baade@HEALTH.QLD.GOV.AU> wrote:

>Given that I have a SAS dataset with, say, 100 rows with 5 variables. Is there a simple way to add another row >to that dataset (to make it 101 rows) with values for each of those five variables?

Peter,

The simplest and, I guess, the most direct way is to use SQL:

DATA A; INPUT A B $ C D $; CARDS; 1 A 3 B 2 C 4 D 5 E 6 F ; RUN;

PROC SQL; ** insert; INSERT INTO A VALUES (7 'G' 8 'H'); ** show result; SELECT * FROM A; QUIT;

A B C D ---------- 1 A 3 B 2 C 4 D 5 E 6 F 7 G 8 H

Kind regards, ======================= Paul M. Dorfman Jacksonville, FL =======================


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