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 (March 1998, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 12 Mar 1998 17:55:43 GMT
Reply-To:     johnf@FREENET.EDMONTON.AB.CA
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         John Fleming <johnf@FREENET.EDMONTON.AB.CA>
Organization: Edmonton FreeNet, Edmonton, Alberta, Canada
Subject:      Re: mainframe SAS to Excel?

Boylan, Dave (dboylan@UTILICORP.COM) wrote: : I'm no expert on mainframe SAS, but if you could produce a "flat" or a : "csv" (comma separated variables) text file, Excel will have no trouble : reading it.

You beat me to the punch, Dave. A number of years ago, I used to download mainframe SAS files to a PC, and then read them into Excel, and that's precisely the route I took. I downloaded comma delimited data.

I produced the flat file using standard put statements of the form

put 'Variable Name 1' ',' var1 'Variable Name 2' ',' var2;

I've quite deliberately put the comma in it's own set of quotes for this reason. You can declare a character variable for the comma, and write the code like this.

c=','; put 'Variable Name 1' c var1 'Variable Name 2' c var2;

This approach won't let you do any fancy formatting, until you get the report into Excel, but then, why not do it there anyway?

Also, doing everything with put statements may require a bit more coding than you have in mind, but if you are producing the same report every month, you only need to write the piece of code once. Reuse it as often as you then need.

-- John Fleming Edmonton, Alberta

email: johnf@freenet.edmonton.ab.ca web page: http://www.freenet.edmonton.ab.ca/~johnf This message may be freely copied, distributed, or otherwise be retransmitted.


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