home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!paladin.american.edu!auvm!ESPRESSO.BOEING.COM!OLDENKMP
- Message-ID: <9207282018.AA28139@espresso.bcs.eca>
- Newsgroups: bit.listserv.sas-l
- Date: Tue, 28 Jul 1992 13:18:35 PDT
- Reply-To: "P. Oldenkamp 5-4481" <oldenkmp@ESPRESSO.BOEING.COM>
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- From: "P. Oldenkamp 5-4481" <oldenkmp@ESPRESSO.BOEING.COM>
- Subject: Re: writing variable names to external file
- Comments: To: SAS-L@uga.cc.uga.edu, SWICKHAM%DARTCMS1.BITNET@uga.cc.uga.edu
- Lines: 48
-
- ----------------------------------------------------------------------
- CONTENT: Reply
- REL/PLTF: N/A
- E-ADDR: oldenkmp@ESPRESSO.boeing.com
- NAME: Paul OldenKamp
- PHONE: 206-865-4481
- ----------------------------------------------------------------------
- Steve Wickham asked,
-
- > This ought to be a simple one, but it's got me stumped. I have a transposed
- > data set that I'd like to write to an external file, with variable names
- > at the top of columns. Put 'var1' 'var2', etc. where var1 is the 1st variable
- > name, etc. won't work because I don't exactly know the names of the variables
- > due to the transpose. The transposed variables all have the same prefix, but
- > the also have a number that ranges between 0 - 99, but not consecutively.
- > Confused? An example:
- > DATE RIVER SITE ORDER1 ORDER3 ORDER5 ORDER17 ORDER9 ORDER85
- > I need to output these column headings along with their values without
- > knowing their names beforehand. Any ideas?
-
- Try PROC PRINT:
-
- options
- nodate
- nonumber
- ;
- title1 ' ';
-
- proc printto
- print='~/external.file';
- ;
- run;
-
- proc print
- data=sasuser.class
- ;
- run;
-
- ----------------------------------------------------------------------
- // Paul OldenKamp
- // BCS Research and Technology .
- // P. O. Box 24346, MS 7L-21 |\
- // Seattle, WA 98124-0346 | \____oo_
- //==========================================((__| /___>
- // ___ ___ ___ ___ __ | //
- // /__// //__ / /\ // _ |//
- // /__//__//__ _/_ / //__/ ''
- //
-