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 (June 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 28 Jun 2002 15:21:50 -0400
Reply-To:     "Huang, Ya" <ya.huang@PFIZER.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Huang, Ya" <ya.huang@PFIZER.COM>
Subject:      Re: Error in generaring xport file (solved, thanks)
Content-Type: text/plain; charset="iso-8859-1"

Thanks to those who responded. Here is what I just found, post here in case someone else also have this kind of problem.

The problems is caused by a format catalog in the directory, when there are different data types under one libname, data sets and format catalog in my case, one has to specify the data type in proc copy, like this:

libname unix003 './003/sas/data'; libname pc003 xport '/home/yhuang/unix2pc/003/all003.dat'; proc copy in=unix003 out=pc003 memtype=data; run; ^^^^^^^^^^^^

My old code did not have this option in it, the first proc copy still do the work, but give a error message like this:

NOTE: Copying UNIX003.ECG to PC003.ECG (MEMTYPE=DATA). NOTE: BUFSIZE is not cloned when copying across dissimilar engines. System Option for BUFSIZE was used. NOTE: The data set PC003.ECG has 30 observations and 21 variables. NOTE: Copying UNIX003.FORMATS to PC003.FORMATS (MEMTYPE=CATALOG). ERROR: The CATALOG FILE OPEN function is not supported by the XPORT engine. ERROR: File PC003.FORMATS.CATALOG has not been saved because copy could not be completed. NOTE: Copying UNIX003.HEMA to PC003.HEMA (MEMTYPE=DATA). NOTE: BUFSIZE is not cloned when copying across dissimilar engines. System Option for BUFSIZE was used. NOTE: The data set PC003.HEMA has 397 observations and 25 variables. NOTE: Copying UNIX003.HEMALAB to PC003.HEMALAB (MEMTYPE=DATA).

The result is that the first proc copy generate a xport file with all the data sets in it, in the meantime, it might turn on a flag because of the error generated when trying to copy catalog file, this flag forbids the next proc copy from copying any data anymore. INTERESTING enough is that, even I turned off the option 'noreplace' (change it to replace), it still dose not work.

So the solution is to add memtype=data in proc copy.

As to Michael's suggestion, I just tried and it works well. I guess I did not think about this method, because I am still using v6.12, thougth I do have v8.2 installed. Another reason I prefer xport file is that FDA submission need to be xport formatted.

The code is even simple:

libname unix003 '/db01/clin/ag2037/003/sas/data'; libname pc003 './003';

proc copy in=unix003 out=pc003; run;

Note there is no more 'xport' and the libname is link to a directory instead of a file name, like all003.dat. Off course this has to be run with v8.2.

Kind regards and have a good weekend.

Ya

-----Original Message----- From: Michael Raithel [mailto:RAITHEM@WESTAT.COM] Sent: Friday, June 28, 2002 11:21 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Error in generaring xport file

Dear SAS-L-ers,

Ya Huang posted, in part, the following:

<<Ya's entire posting can be found beneath the Sig line, below>>

>The following code is used to generate xport data sets, >it works fine for the first libname, but got errors in >the second one, if I switch the two segment of code, >still the first one is OK (this time unix002 and pc002). > >Any clue? >

Ya, as always, I, myself, am clue-less! Let me ask you a question that may point you to a different take on this problem: Do you _REALLY_ need to create a SAS transport file?

I ask that because, if you have a SAS 8.x data set on one platform (Unix) and intend to transport it to another platform (eg. Windows) and use SAS 8.x to process it, you do not necessarily need to create a SAS transport file. Instead, you can use the Cross Environment Data Access (CEDA) feature of SAS software.

Using CEDA, you would do the following to process your Unix data on your PC:

1. Simply execute a binary FTP of the Unix SAS data set to your PC server 2. Fire up SAS 8.x on your PC and begin processing the data. 3. Smile as you realize that you have skipped the now-wasteful steps of: 1. creating a SAS transport file and 2. creating a SAS data set from the transport file.

When you process a SAS data set from an alternate server via CEDA, you will get something like the following in your SAS log:

INFO: Data set YA.HUANG.DATA is in a foreign host format. Cross Environment Data Access will be used, which may require additional CPU resources and reduce performance.

From the benchmarking that I have done, CEDA _WILL_ use additional CPU resources. So, you will then have the choice of using the data in its native format via CEDA (and burning more CPU time), or "moving" it to the new host format via PROC COPY or some other SAS data handling tool (burning CPU time) and then processing it. Either way; you win.

Ya, with deference to PETA, "there are many ways to skin a cat"; perhaps this one will suit you. Best of luck in your quest to get SAS data in a usable format from one platform to another!

I hope that this suggestion proves helpful now, and in the future!

Of course, all of these opinions and insights are my own, and do not reflect those of my organization or my associates. All SAS code and/or methodologies specified in this posting are for illustrative purposes only and no warranty is stated or implied as to their accuracy or applicability. People deciding to use information in this posting do so at their own risk.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Michael A. Raithel "The man who wrote the book on performance" E-mail: MichaelRaithel@westat.com Author: Tuning SAS Applications in the MVS Environment +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Only the educated are free. - Epictetus +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

<<Ya's entire posting>>

The following code is used to generate xport data sets, it works fine for the first libname, but got errors in the second one, if I switch the two segment of code, still the first one is OK (this time unix002 and pc002).

Any clue?

libname unix003 './003/sas/data'; libname pc003 xport '/home/yhuang/unix2pc/003/all003.dat'; proc copy in=unix003 out=pc003; run;

libname unix002 './002/sas/data'; libname pc002 xport '/home/yhuang/unix2pc/002/all002.dat'; proc copy in=unix002 out=pc002; run;

------------------ NOTE: Copying UNIX002.AEAE to PC002.AEAE (MEMTYPE=DATA). NOTE: BUFSIZE is not cloned when copying across dissimilar engines. System Option for BUFSIZE was used. ERROR: The NOREPLACE function is not supported by the XPORT engine. ERROR: The NOREPLACE function is not supported by the XPORT engine. ERROR: The NOREPLACE function is not supported by the XPORT engine. ERROR: File PC002.AEAE.DATA has not been saved because copy could not be completed. ERROR: File PC002.AEAE.DATA has not been saved because copy could not be completed. ERROR: File PC002.AEAE.DATA has not been saved because copy could not be completed.


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