SAS data

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

SAS data

Samuel Okoye
Hello,
   
  I am trying to read the SAS file MyData.sa7bdat in R! This file is saved under D:\data! I therefore wrote
   
  > path <-"D:/SasData"
  > sashome <- "C/Progra, Files/SAS Institute/9_1/SAS"
  > sascmd <- file.path(sashome, "sas.exe")
  > MyData <- read.ssd(path, "MyData", sascmd=sascmd)
   
  The results what I get:
   
  SAS failed.  SAS program at C:\DOCUME~1\Temp\RtmpcTlKtb\file4eb43288.sas
The log file will be file4eb43288.log in the current directory
NULL
Warning message:
SAS return code was 2 in: read.ssd(path, "MyData", sascmd = sascmd)
   
  Thank you in advance!
  Sam

       
---------------------------------

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: SAS data

Larry Hanser
Looks to me like you are trying to read sas.exe as your data rather
than MyData.sa7bdat....

Larry

On Fri, Mar 14, 2008 at 8:21 AM, Samuel Okoye <[hidden email]> wrote:

> Hello,
>
>   I am trying to read the SAS file MyData.sa7bdat in R! This file is saved under D:\data! I therefore wrote
>
>   > path <-"D:/SasData"
>   > sashome <- "C/Progra, Files/SAS Institute/9_1/SAS"
>   > sascmd <- file.path(sashome, "sas.exe")
>   > MyData <- read.ssd(path, "MyData", sascmd=sascmd)
>
>   The results what I get:
>
>   SAS failed.  SAS program at C:\DOCUME~1\Temp\RtmpcTlKtb\file4eb43288.sas
>  The log file will be file4eb43288.log in the current directory
>  NULL
>  Warning message:
>  SAS return code was 2 in: read.ssd(path, "MyData", sascmd = sascmd)
>
>   Thank you in advance!
>   Sam
>
>
>  ---------------------------------
>
>         [[alternative HTML version deleted]]
>
>  ______________________________________________
>  [hidden email] 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.
>

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: SAS data

Daniel Nordlund
In reply to this post by Samuel Okoye
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf
> Of Samuel Okoye
> Sent: Friday, March 14, 2008 8:21 AM
> To: [hidden email]
> Subject: [R] SAS data
>
> Hello,
>
>   I am trying to read the SAS file MyData.sa7bdat in R! This file is saved under
> D:\data! I therefore wrote
>
>   > path <-"D:/SasData"
>   > sashome <- "C/Progra, Files/SAS Institute/9_1/SAS"
>   > sascmd <- file.path(sashome, "sas.exe")
>   > MyData <- read.ssd(path, "MyData", sascmd=sascmd)
>
>   The results what I get:
>
>   SAS failed.  SAS program at C:\DOCUME~1\Temp\RtmpcTlKtb\file4eb43288.sas
> The log file will be file4eb43288.log in the current directory
> NULL
> Warning message:
> SAS return code was 2 in: read.ssd(path, "MyData", sascmd = sascmd)
>
>   Thank you in advance!
>   Sam

Sam,

If you actually tried to run the code as listed above, it is not surprising that it didn't work.   You wrote that the data was in D:/Data, but specified the libname reference as D:/SasData.   You specified the path to SAS as "C/Progra, Files/SAS Institute/9_1/SAS".  I can't believe that that is a valid path to SAS on any system.  I you write back to the list with actual code, location of data and sas.exe, and operating system (presumably MS Windows, but what version?), someone should be able to help.

Dan

Daniel Nordlund
Bothell, WA  USA

______________________________________________
[hidden email] 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.