BookmarkSubscribeRSS Feed
vikramv786
Calcite | Level 5

Hi,

I currently have version SAS 9.2 TS Level 2M3 and R 2.11.1 version installed on my local system running Windows XP 32 bit version. I have changed the configuration file "C:\Program Files\SAS92\SASFoundation\9.2\nls\en\SASV9.CFG" to include the -RLANG option.

After I start SAS and run the below snippet of code,

PROC OPTIONS OPTION=RLANG;

RUN;

I do get the message in the log "RLANG Support access to R language interfaces".

But when I run the below sample code

PROC IML;

SUBMIT / R;

a <- 2

paste("a:",a)

b <- 3

paste("b:",b)

c <- a * b

paste("c:",c)

ENDSUBMIT;

QUIT;

I get the below error message in the log.

33   PROC IML;
NOTE: IML Ready
34   SUBMIT / R;
     ------
     180
ERROR 180-322: Statement is not valid or it is used out of proper order.

35   a <- 2
     -
     180
ERROR 180-322: Statement is not valid or it is used out of proper order.

36   paste("a:",a)
37   b <- 3
38   paste("b:",b)
39   c <- a * b
40   paste("c:",c)
41   ENDSUBMIT;
42   QUIT;
NOTE: Exiting IML.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IML used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds

Appreciate any insight on how to fix this installation issue. Are there any other environmental variables that would need to be set?

Thanks,

Vikram

7 REPLIES 7
vikramv786
Calcite | Level 5

Yes it is installed at "C:\Program Files\R\R-2.11.1".

art297
Opal | Level 21

and is that the 32 or 64 bit version?  I ask because I think that only the 32 bit version is supported.

vikramv786
Calcite | Level 5

@Arthur: Its the 32 bit version that was installed.

@Rick: I ran the code that you sent and got the message "ERROR: Invocation of unresolved module CUPROD.". How can I check which version of SAS/IML I have? Is there a hotfix to upgrade the SAS/IML version? Appreciate your insight.

46   proc iml;

NOTE: IML Ready

47   c = cuprod(1:5);

ERROR: Invocation of unresolved module CUPROD.

statement : ASSIGN at line 47 column 1

48   quit;

NOTE: Exiting IML.

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE IML used (Total process time):

      real time           0.01 seconds

      cpu time            0.01 seconds

Rick_SAS
SAS Super FREQ

I don't think that you have the version of SAS/IML that supports the SUBMIT statement.

Try this

proc iml;

c = cuprod(1:5);

If SAS/IML complains that the CUPROD function is not found, then you do not have the correct version of SAS/IML.

There were actually two different SAS releases that together rolled out the 9.22 functionality.  SAS/IML was in the second release. If memory serves, the SAS/IML release was somewhere around the end of September 2010.

Rick_SAS
SAS Super FREQ

As I suspected, you do not have SAS/IML 9.22. You have just regular 9.2.

A hotfix only fixes a bug in a current version of SAS, so it is not applicable here. To get new features, talk to your SAS administrator about updating to a newer version of SAS, such as 9.3M2 (which the analytical products call 12.1).

Perhaps SAS/IML can solve your problem directly. What problem are you rtying to solve?

vikramv786
Calcite | Level 5

Thanks Rick. One of my team members here at Kaiser Permanente is reviewing some R code written in a research paper and wanted to incorporate it into his own current data research project. I am just trying to help him explore if we can call the R code within SAS instead of re-writing in PROC IML. Appreciate your help.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 7 replies
  • 1778 views
  • 1 like
  • 3 in conversation