> -----Original Message-----
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Roger DeAngelis(xlr82sas)
> Sent: Monday, April 05, 2010 3:35 PM
> To: r-help@r-project.org
> Subject: Re: [R] SAS and R on multiple operating systems
> 
> 
> Hi,
> 
>   I am using SSH, however I do have to set up a SAS Spawner on the remote
> host and use SAS remote library services. I also have to have listeners on
> both client and host?
> 
>   I am not a systems guy, so I do not know exactly how SAS makes the
> remote
> libraries available to windows.
> 
>   It is a little trickier to get UNIX to recognize my windows 'c' drive.
> 
>   It is quite powerful to take the idiosyncracies of operating systems out
> of the picture, I think perl is little closer to doing this than R. The
> stat
> function in perl appears to be able to operate on windows and unix
> filesystems, however separately. Many SAS objects like datasets are
> exactly
> the same between windows(32/64) and corresponding unix systems. No big
> endian little endian stuff to worry about.

Well, this is not exactly correct. SAS datasets on Windows 32-bit and 64-bit 
systems do use a different file format, and the format is different from 
Unix/Linux systems.  SAS will automagically use the cross-environment data 
access (CEDA) engine, where possible, for reading SAS datasets created in 
different environments.  So what you describe below can be done, but only 
because SAS handles the file conversion relatively transparently.  And while 
the CEDA engine allows one to read datasets from other environments, there can 
be a performance hit when doing so.

> 
> Here is my program
> 
> %put &sysscp;    /* Show OS */
> %let pth=%sysfunc(pathname(unx)); /* SHOW UNIX PATH */
> %put pth=&pth;
> data "c:\temp\class.sas7bdat";   /* WINDOWS */
>   set unx.class;
> run;
> 
> Here is the log showing I am running under windows but input is unix
> 
> 28     %put &sysscp;
> SYMBOLGEN:  Macro variable SYSSCP resolves to WIN
> WIN
> 29     %let pth=%sysfunc(pathname(unx));
> 30     %put pth=&pth;
> SYMBOLGEN:  Macro variable PTH resolves to
> /workspace/SAS_work904200004DF5_zeus_unix
> pth=/workspace/SAS_work904200004DF5_global_unix_server
> 31     data "c:\temp\class.sas7bdat";
> 32       set unx.class;
> 33     run;
> 
> NOTE: There were 19 observations read from the data set UNX.CLASS.
> NOTE: The data set c:\temp\class.sas7bdat has 19 observations and 5
> variables.
> NOTE: DATA statement used (Total process time):
>       real time           0.04 seconds
>       cpu time            0.01 seconds
> 
> I can even concatenate windows and unix SAS datasets.
> 
> 

Hope this helpful,

Dan

Daniel Nordlund
Bothell, WA USA
 

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to