An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120328/68061ca6/attachment.pl>
SAS Import with sas.get {Hmisc} - status 127 error
4 messages · Nordlund, Dan (DSHS/RDA), Phil Spector, Dominic Comtois
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
project.org] On Behalf Of Dominic Comtois
Sent: Wednesday, March 28, 2012 3:09 PM
To: r-help at r-project.org
Subject: [R] SAS Import with sas.get {Hmisc} - status 127 error
I'm trying to import a .sas7bdat dataset into R with sas.get. I'm using
Win-7 and SAS 9.2. I have read the following post and did tweak the
line
(127, incidentally) of code.
<http://r.789695.n4.nabble.com/R-Problem-with-sas-get-function-in-
Hmisc-td81
4367.html>
http://r.789695.n4.nabble.com/R-Problem-with-sas-get-function-in-Hmisc-
td814
367.html
However, I get the following error message:
sas.get(libraryName="D:/Docs/tmp", member="SES", formats=F)
Error in sas.get(libraryName = "D:/Docs/tmp", member = "SES", : SAS job failed with status 127 I suspected some problem related to formats or variable names, and reduced the data to a bare minimum, and still no success. I am thinking there is some log file somewhere that could help me figure out what is going on, but I don't know where to find it. Any help appreciated.
You haven't given us a reproducible example, so there is not much we can do but speculate. You also haven't told us the version of R that you are using. Read the posting guide linked-to at the bottom of this email and provide the requested information. However, to help you sort out what your problem might be, try using sas.get() to read a dataset that anyone with SAS has so that we can play along. See if you can read in the class.sas7bdat dataset that resides in the SASHELP library (I can read it on a Win7 x64 box with SAS 9.2 and R-2.15.0RC, without any editing of the Hmisc code). If that doesn't succeed, then show us the full path to that file on your system, and the exact syntax of your call to sas.get() and any error messages. Hope this is helpful, Dan Daniel J. Nordlund Washington State Department of Social and Health Services Planning, Performance, and Accountability Research and Data Analysis Division Olympia, WA 98504-5204
I've found the keep,log=TRUE option of sas.get to be useful in cases like this. There's also a log.file= option if you don't want the default location for the log file. - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley spector at stat.berkeley.edu
On Wed, 28 Mar 2012, Dominic Comtois wrote:
I'm trying to import a .sas7bdat dataset into R with sas.get. I'm using Win-7 and SAS 9.2. I have read the following post and did tweak the line (127, incidentally) of code. <http://r.789695.n4.nabble.com/R-Problem-with-sas-get-function-in-Hmisc-td81 4367.html> http://r.789695.n4.nabble.com/R-Problem-with-sas-get-function-in-Hmisc-td814 367.html However, I get the following error message:
sas.get(libraryName="D:/Docs/tmp", member="SES", formats=F)
Error in sas.get(libraryName = "D:/Docs/tmp", member = "SES", : SAS job failed with status 127 I suspected some problem related to formats or variable names, and reduced the data to a bare minimum, and still no success. I am thinking there is some log file somewhere that could help me figure out what is going on, but I don't know where to find it. Any help appreciated. [[alternative HTML version deleted]]
______________________________________________ R-help at 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.
Thanks for the reply.
I finally succeeded. For some reason, I had to specify explicitly the path
to the sas.exe file with the sasprog parameter, even though the directory is
in my path environment variable. Not sure why this is, but in any case, now
it works.
Regards,
DC
-----Message d'origine-----
De?: Phil Spector [mailto:spector at stat.berkeley.edu]
Envoy??: 28 mars 2012 21:15
??: Dominic Comtois
Cc?: r-help at r-project.org
Objet?: Re: [R] SAS Import with sas.get {Hmisc} - status 127 error
I've found the keep,log=TRUE option of sas.get to be useful in cases like
this.
There's also a log.file= option if you don't want the default location for
the log file.
- Phil Spector
Statistical Computing Facility
Department of Statistics
UC Berkeley
spector at stat.berkeley.edu
On Wed, 28 Mar 2012, Dominic Comtois wrote:
I'm trying to import a .sas7bdat dataset into R with sas.get. I'm using Win-7 and SAS 9.2. I have read the following post and did tweak the line (127, incidentally) of code. <http://r.789695.n4.nabble.com/R-Problem-with-sas-get-function-in-Hmis c-td81 4367.html> http://r.789695.n4.nabble.com/R-Problem-with-sas-get-function-in-Hmisc -td814 367.html However, I get the following error message:
sas.get(libraryName="D:/Docs/tmp", member="SES", formats=F)
Error in sas.get(libraryName = "D:/Docs/tmp", member = "SES", : SAS job failed with status 127 I suspected some problem related to formats or variable names, and reduced the data to a bare minimum, and still no success. I am thinking there is some log file somewhere that could help me figure out what is going on, but I don't know where to find it. Any help appreciated. [[alternative HTML version deleted]]
______________________________________________ R-help at 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.