DATA Step, Macro, Functions and more

Way to change platform in sas7bdat files in SAS 9.3 on W7_32?

Reply
Contributor
Posts: 65

Way to change platform in sas7bdat files in SAS 9.3 on W7_32?

Hey guys,

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

Arsenio

Super User
Posts: 9,676

Way to change platform in sas7bdat files in SAS 9.3 on W7_32?

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.

data want_linux;

set winxp(outrep= linux);

run;

Ksharp

Contributor
Posts: 65

Re: Way to change platform in sas7bdat files in SAS 9.3 on W7_32?

Hey Ksharp,

Thanks for the reply! I tried to run this in the data step

data etf.EQUIV_VOL_Daily_EXCL1;

        set work.equiv_volume_dailyandintra_excl (outrep=Linux);

run;

But it doesn't seem to work.. In log it writes

14        

15         GOPTIONS ACCESSIBLE;

16         data etf.EQUIV_VOL_Daily_EXCL1;

17                 set work.equiv_volume_dailyandintra_excl (outrep=Linux);

                                                       ______

                                                       70

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; */

20        

21         run;

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

Contributor
Posts: 65

Re: Way to change platform in sas7bdat files in SAS 9.3 on W7_32?

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.

Thanks,

A

Super User
Posts: 9,676

Re: Way to change platform in sas7bdat files in SAS 9.3 on W7_32?

Hi.

Sorry . It should be

data class(outrep=linux);

set sashelp.class;run;

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

platform

LINUX_IA64 Linux for Itanium-based system on

64-bit platform

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

64-bit platform

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

Contributor
Posts: 65

Re: Way to change platform in sas7bdat files in SAS 9.3 on W7_32?

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 ;

18            

19        

20         run;

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

      WORK.EQUIV_VOLUME_DAILYANDINTRA_EXCL.

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!

Super User
Posts: 9,676

Re: Way to change platform in sas7bdat files in SAS 9.3 on W7_32?

Did you try other value of outrep=?

outrep=WINDOWS_32

outrep=WINDOWS_64

Ksharp

Ask a Question
Discussion stats
  • 6 replies
  • 772 views
  • 3 likes
  • 2 in conversation