|
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
|