Date: Fri, 31 Mar 2006 12:49:32 -0500
Reply-To: "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Subject: Re: Print variable names to external file
Or, use the Export Wizard and lift the generated DATA step code from the
log.
On Fri, 31 Mar 2006 10:04:39 -0500, Venky Chakravarthy <swovcc@HOTMAIL.COM>
wrote:
>On Fri, 31 Mar 2006 09:16:30 -0500, Thomas <tythong@YAHOO.COM> wrote:
>
>>Hi,
>>
>>I am using the data step to export the data to external text file
>>by "FILE" & "PUT" statements, but may I know how do I print the variable
>>names (header) on the first row of the output file and the data start from
>>the second row of the file? In other words, I will have the names of the
>>variables corresponding to each column.
>>
>>Thanks and regards,
>>Thomas
>
>Despite Toby's excellent solution, I need to ask why you have eliminated
any
>of the reporting procedures including PROC PRINT from your consideration?
>There could be a simple solution and PROC REPORT allows a great deal of
>customization.
>
>Considering that you are struggling with the basics of data _null_
>reporting, you should begin with the canned procedures before exploring the
>power of data _null_. If you are really looking for total control, then
make
>sure the requestors accept the variables in alphabetical order, because
that
>is how Toby's code will work. However, he has provided enough clues to
build
>this on your own.
>
>Venky
|