Date: Tue, 23 Oct 2007 13:09:36 -0400
Reply-To: SAS_learner <proccontents@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: SAS_learner <proccontents@GMAIL.COM>
Subject: Re: How to convert all the xpt files in a folder to sas datasets
In-Reply-To: <7367b4e20710230855w39e0b72cn42cfb61d184b631d@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
I do not know how those .xpt files have been genrated. Do think there is
way to find how they are created and why is that Problem is caused.
thanks
On 10/23/07, data _null_, <datanull@gmail.com> wrote:
>
> This technique is documented at support.sas.com as...
>
> Sample 25978: Shortcut to importing multiple transport files created
> by the XPORT engine
>
>
> However, Kumar wrote to me off list that it does not work for his
> XPORT engine files. He sent three of them to me to test and they
> don't work for me either. By not work I mean only one output file is
> created as the concatenation off all input files.
>
> 105 proc copy in=in out=work;
> 106 run;
>
> NOTE: Input library IN is sequential.
> NOTE: Copying IN.AE to WORK.AE (memtype=DATA).
> NOTE: BUFSIZE is not cloned when copying across different engines.
> System Option for BUFSIZE was used.
> WARNING: Concatenated file boundary.
> WARNING: Concatenated file boundary.
> NOTE: There were 14062 observations read from the data set IN.AE.
> NOTE: The data set WORK.AE has 14062 observations and 39 variables.
> NOTE: PROCEDURE COPY used (Total process time):
> real time 0.40 seconds
> cpu time 0.40 seconds
>
>
> The two messages "Concatenated file boundary" indicates that three
> files were read.
>
>
> In one of the files from Kumar I find....
>
> SAS AM SASDATA 6.06
> VM/CMS 17OCT07:08:33:54
>
> I'm not expert at reading these files but AM is the name of the data
> set and 6.06 VM/CMS seems to be the version and operating system.
>
> When I create similar on Windows I see...
>
> SAS AE SASDATA 9.1
> NET_ASRV 22OCT07:16:18:30
>
> Does it seem posible that version 6.06 of SAS was ned to create files
> on 17OCT07 or were these files created by some other application?
>
> On 10/22/07, data _null_, <datanull@gmail.com> wrote:
> > Of course you can use a FILENAME with PIPE to determine the names of
> > the files that you need to read.
> >
> > However it occurred to me that a wild card in a LIBNAME might also
> > work. I tried it and it does.
> >
> > This will replace your entire macro with piped file names with a
> > libname for the input and libname for the output. Followed by PROC
> > COPY.
> >
> >
> > /* create some xport libraries*/
> > libname x1 xport 'dm.xpt';
> > libname x2 xport 'ae.xpt';
> > data x1.dm;
> > set sashelp.class;
> > run;
> > data x2.ae;
> > do x=1 to 100;
> > output;
> > end;
> > run;
> >
> >
> > /*read them all with wild card*/
> > libname raw_xpt xport '*.xpt';
> > proc copy noclone in=raw_xpt out=work;
> > run;
> >
> > On 10/22/07, SAS_learner <proccontents@gmail.com> wrote:
> > > %Macro ds(ds ) ;
> > > Libname Raw_xpt xport "Z:\MNTX\MNTX3301\Phase
> > > Forward\SDTM\Draft_17_MNTX3301_Prod\&ds..xpt" access = readonly ;
> > > Libname Raw_sets "Z:\Develop\data" ;
> > > data &ds ;
> > > set raw_xpt.&ds;
> > > Run;
> > > %Mend ;
> > > %ds(ae) ;
> > > %ds(am) ;
> > > '
> > > '
> > > '
> > > I know this might have been done before by someone I need to get the
> List of
> > > all the datasets in the Folder where .XPT files are located and change
> them
> > > to sas datasets, I am using above code and it is doing what I need to
> do,
> > > but only thing thing is I need to Physically supply List of all the
> DCM's
> > > names to macro %ds but I do want to do that. I tried to pick list of
> all he
> > > datasets using Proc Sql ; select memname into : vname separated by "
> " from
> > > dictionary.columns ; Quit ; but I do not know how to use that List to
> make
> > > Individual datasets ?? Any Ideas
> > >
> > > thanks
> > >
> >
>
|