11-10-2011 02:44 AM
Is there any way to edit meta data in sas7bdat files? Or maybe convert from W32_7PRO to XP_PRO or smth along the lines? I need it for compatibility for 3rd party readers. Long night ahead..
Thanks a lot!!
11-10-2011 03:14 AM
Maybe you should use proc cport / proc cimport
OR proc copy to make a transport file.
And there is an option in data step to create appropriate version of SAS dataset.
set winxp(outrep= linux);
11-10-2011 03:30 AM
Thanks for the reply! I tried to run this in the data step
set work.equiv_volume_dailyandintra_excl (outrep=Linux);
But it doesn't seem to work.. In log it writes
15 GOPTIONS ACCESSIBLE;
16 data etf.EQUIV_VOL_Daily_EXCL1;
17 set work.equiv_volume_dailyandintra_excl (outrep=Linux);
WARNING 70-63: The option OUTREP is not valid in this context. Option ignored.
18 /* by ticker date;
19 if first.date NE 1 then delete; */
This is for sas7bdat package for R, which apparently doesn't do well with some changes in SAS 9.3, idk what happened but now it gives me that error
11-10-2011 03:33 AM
The previous reply window froze on me and didnt let me type anything, so here is the error text from R (not from SAS),
Error in read.sas7bdat("e:/............................/EQUIV_VOL_Daily_EXCL1.sas7bdat") :
unknown host W32_7PRO please report bugs to .............................
So apparently I assume that SAS 9.3 added a new category table or some sort of platform id. I wish i could dig into SAS7BDAT meta structure.
11-10-2011 04:00 AM
Sorry . It should be
and outrep= valid value are:
Table 2.2 Data Representation Values for OUTREP= Option
OUTREP= Value Alias* Environment
ALPHA_TRU64 ALPHA_OSF Tru64 UNIX
ALPHA_VMS_32 ALPHA_VMS OpenVMS on Alpha
ALPHA_VMS_64 OpenVMS on Alpha
HP_IA64 HP_ITANIUM HP-UX on Itanium 64-bit platform
HP_UX_32 HP_UX HP-UX on 32-bit platform
HP_UX_64 HP-UX on 64-bit platform
INTEL_ABI ABI UNIX on Intel 32-bit platform
LINUX_32 LINUX Linux for Intel Architecture on 32-bit
LINUX_IA64 Linux for Itanium-based system on
LINUX_X86_64 LINUX on x64 64-bit platform
MIPS_ABI ABI UNIX on 32-bit platform
MVS_32 MVS z/OS on 32-bit platform
OS2 OS/2 on Intel 32-bit platform
RS_6000_AIX_32 RS_6000_AIX AIX UNIX on 32-bit RS/6000
RS_6000_AIX_64 AIX UNIX on 64-bit RS/6000
SOLARIS_32 SOLARIS Solaris on SPARC 32-bit platform
SOLARIS_64 Solaris on SPARC 64-bit platform
SOLARIS_X86_64 Solaris on x64 64-bit platform
VAX_VMS OpenVMS VAX
VMS_IA64 OpenVMS for HP Integrity servers
WINDOWS_32 WINDOWS Microsoft Windows on 32-bit platform
WINDOWS_64 Microsoft Windows 64-bit Edition (for
both Itanium-based systems and x64)
Message was edited by: xia keshan
11-10-2011 04:38 AM
Tried this, now it worked and used CEDA and mentions that the dataset is native to a different host.
16 data etf.EQUIV_VOL_Daily_EXCL1 (outrep=Linux);
17 set work.equiv_volume_dailyandintra_excl ;
NOTE: Data file ETF.EQUIV_VOL_DAILY_EXCL1.DATA is in a format that is native to another host,
or the file encoding does not match the session encoding. Cross Environment Data Access
will be used, which might require additional CPU resources and might reduce performance.
NOTE: There were 218927 observations read from the data set
NOTE: The data set ETF.EQUIV_VOL_DAILY_EXCL1 has 218927 observations and 68 variables.
NOTE: DATA statement used (Total process time):
real time 7.01 seconds
cpu time 0.74 seconds
However still when importing into R the host is read as W32_7PRO. Still thanks a lot for the outrep option!