LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (July 1996, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 2 Jul 1996 22:22:27 -0600
Reply-To:   Andrew James Llwellyn Cary <ajlcary@IX.NETCOM.COM>
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   Andrew James Llwellyn Cary <ajlcary@IX.NETCOM.COM>
Organization:   Cary Consulting Services
Subject:   Re: SAS to ASCII conversions

Brent L. Brock wrote: .... I need to convert SAS (Unix platform) output to anything that can > be easily imported into a PC database (specifically Access). I have used > Proc PrintTo to create simple text files. This works alright for small > output files but for extremely wide output the resulting file is too > jumbled with wrapped lines and extra column headings. How can I create a > simple delimited ASCII file? Lastly, would my world be much simpler if I > switched to PC SAS?

It isn't clear to me what you are trying to move to MS Access. If you are trying to move output (tables,listings,reports) You can specify wider print widths and length using the OPTIONS LS=nnn PS=nn command.

If (and this is what I suspect you are trying to do) you are trying to download data from SAS (on Unix) to MS-Access as data you really have three choices:

(1) Get your UNIX SAS installation to install SAS/Share. SAS supports ODBC transport from Unix to MS-Access through a remote server option over TCP/IP. Once this is set up, MS Access can directly link to your SAS datasets pretty much transparently. It's pretty cool. A server runs on the Unix side and passes data to the ODBC driver for Access. Its a bit tricky to set up at first, but not overwhelming. The big trrick is to make absolutely certain that the "services" files on the PC and the UNIX server have identical TCP/IP socket id's and names.

(2)Instead of porting output to the PC and then mungeing it in. Write a DATA STEP to write your SAS data to a tab-delimited file. FTP the file to your PC and read it into SAS. An example with untested code:

DATA _NULL_; FILE '/usr/you/data.tabdelimited' LRECL=4096 ; SET yourlib.yourdata; PUT var1 '09'x var2 '09'x .... RUN; There are any number of macros people have written that do this for you.

(3) Buy a 3rd party data conversion tool like DMBS/COPY and follow the procedures in there.

-- Andrew J. L. Cary | I Reckon that the Opinions Senior Curmudgeon | expressed here DO represent Cary Consulting Services, Newark, CA | those of the management of ajlcary@ix.netcom.com | Cary Consulting Services


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