| Date: | Wed, 23 Jun 1999 13:45:44 -0500 |
| Reply-To: | jason.sun@CAPITALONE.COM |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
|
| From: | Jason Sun <jason.sun@CAPITALONE.COM> |
| Subject: | Re: Adding rows to SAS dataset |
|
| 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
=======================
|