|
|
XPT to SAS datasets
HI All:
I have all the datasets stored in .XPT format in a library .. how
can I convert them to SAS Datasets .. I know how to do it when single
dataset is present ..
On my machine I have SAS Base product , SAS/Stat and SAS/Access
interface to ODBC
Any suggestions =85
Thanks in advance
|
|
0
|
|
|
|
Reply
|
ali6058 (166)
|
5/21/2010 2:46:30 PM |
|
On Fri, 21 May 2010 07:46:30 -0700 (PDT), Al <ali6058@gmail.com>
wrote:
>I have all the datasets stored in .XPT format in a library .. how
>can I convert them to SAS Datasets .. I know how to do it when single
>dataset is present ..
>On my machine I have SAS Base product , SAS/Stat and SAS/Access
>interface to ODBC
It's pretty easy:
libname outlib "out directory goes here";
libname inlib xport "directory stuff/filename.xpt";
proc copy in=inlib out=outlib;
run;
Dav Vandenbroucke
davanden at cox dot net
|
|
0
|
|
|
|
Reply
|
Dav
|
5/21/2010 8:51:05 PM
|
|
On May 21, 3:51=A0pm, Dav Vandenbroucke
<dav_and_frances_vandenbrou...@compuserve.com> wrote:
> On Fri, 21 May 2010 07:46:30 -0700 (PDT), Al <ali6...@gmail.com>
> wrote:
>
> >I have =A0all the datasets stored in .XPT format in a library =A0.. how
> >can I convert them to SAS Datasets .. I know how to do it when single
> >dataset is present ..
> >On my machine I have =A0SAS Base product , SAS/Stat and SAS/Access
> >interface to ODBC
>
> It's pretty easy:
>
> libname outlib "out directory goes here";
> libname inlib xport "directory stuff/filename.xpt";
> proc copy in=3Dinlib out=3Doutlib;
> run;
>
> Dav Vandenbroucke
> davanden at cox dot net
Dear All;
This is the error i get when i use the above code ... can any one
help ... Thanks
NOTE: Input library INLIB is sequential.
ERROR: File is probably a cport file. XPORT engine unable to read file
created by proc cport. Please
use proc cimport to convert this file to native format.
NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE COPY used (Total process time):
real time 0.03 seconds
cpu time 0.00 seconds
NOTE: The SAS System stopped processing this step because of errors.
|
|
0
|
|
|
|
Reply
|
Al
|
5/23/2010 5:23:43 PM
|
|
SAS has two methods for exporting data. The XPORT libname engine (also
known as V5 transport format)
and the CPORT/CIMPORT procs. To use the CIMPORT proc the syntax is:
libname out '<where you want to write the datasets>';
proc cimport infile=3D'xxxx.xpt' lib=3Dout ;
run;
An advantage of the CPORT format is that it supports newer datasets
with long variable names and long character variables
and also catalogs and other non-dataset members.
A disadvantage is that it can be picky about which flavor of SAS you
are using the write/read the transport file.
On May 23, 1:23=A0pm, Al <ali6...@gmail.com> wrote:
> On May 21, 3:51=A0pm, Dav Vandenbroucke
> <dav_and_frances_vandenbrou...@compuserve.com> wrote:
> > On Fri, 21 May 2010 07:46:30 -0700 (PDT), Al <ali6...@gmail.com>
> > wrote:
>
> > >I have =A0all the datasets stored in .XPT format in a library =A0.. ho=
w
> > >can I convert them to SAS Datasets .. I know how to do it when single
> > >dataset is present ..
> > >On my machine I have =A0SAS Base product , SAS/Stat and SAS/Access
> > >interface to ODBC
>
> > It's pretty easy:
>
> > libname outlib "out directory goes here";
> > libname inlib xport "directory stuff/filename.xpt";
> > proc copy in=3Dinlib out=3Doutlib;
> > run;
>
> > Dav Vandenbroucke
> > davanden at cox dot net
>
> Dear All;
>
> This is the error i get when i use the above code ... can any one
> help ... Thanks
>
> NOTE: Input library INLIB is sequential.
> ERROR: File is probably a cport file. XPORT engine unable to read file
> created by proc cport. Please
> =A0 =A0 =A0 =A0use proc cimport to convert this file to native format.
> NOTE: Statements not processed because of errors noted above.
> NOTE: PROCEDURE COPY used (Total process time):
> =A0 =A0 =A0 real time =A0 =A0 =A0 =A0 =A0 0.03 seconds
> =A0 =A0 =A0 cpu time =A0 =A0 =A0 =A0 =A0 =A00.00 seconds
>
> NOTE: The SAS System stopped processing this step because of errors.
|
|
0
|
|
|
|
Reply
|
Tom
|
5/23/2010 5:47:20 PM
|
|
|
3 Replies
1121 Views
(page loaded in 0.071 seconds)
|
|
|
|
|
|
|
|
|