| Date: | Mon, 9 Aug 2004 16:34:29 -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: merging datasets to a file |
|
If it works don't fix it! The "put (_all_) (format);" allows formatting
between all of the output fields. It's documented somewhere in the online
doc, but don't ask me where. It's used on SAS-L regularly. ;-)
I like "put (_all_) (=/);" which lists the variables with names vertically.
Paul Choate
DDS Data Extraction
(916) 654-2160
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Rune
Runnestoe
Sent: Monday, August 09, 2004 12:09 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: merging datasets to a file
Gary Ross <gary_ross@mgic.com> wrote in message
news:<41178338.CCD0C9AD@mgic.com>...
> You could try:
>
> put _numeric_ _character_ ;
>
> Be advised, though, you lose formatting for the character variables
> unless they are all the same length (not likely), but:
>
> put _numeric_ 8. _character_ $10. ;
>
> should work.
It doesn't seem to work, but thanks anyway. put _numeric_ provokes an
error message in the log. put _character_ or put _character_ $10
doesn't write any data to the file.
But - the problem is solved. Paul Choate advised me to try put
(_all_)(:) or put (_all_) ('09'x):
So here is the code:
%let lib = dev;
data &lib..all;
set &lib..class2 &lib..class3;
file 'd:\concatenated.dat';
put (_all_) (:);
run;
and that works fine. I prefer (:) to ('09'x) because it looks better.
I don't know what (:) means or why it works, but that doesn't bother
me so much as long as it works :-).
Regards
Rune
|