BookmarkSubscribeRSS Feed
goliPSU
Calcite | Level 5

Hi,

I am getting this error message in IML when I am ready to use the data:

data UTIL_WHOLESALE;

set sqldb3.utilshare_wholesale_02;

proc sort; by cCom;

run;

proc iml;

/* GET DATA */

    use UTIL_WHOLESALE;

    read all var{elec_w} into elec_w;

    read all var{fuel_w} into fuel_w;

Error is in using the UTIL_WHOLESALE;

1199  /* GET DATA */

1200

1201      use UTIL_WHOLESALE;

          ---

          180

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

Any thoughts!

3 REPLIES 3
Rick_SAS
SAS Super FREQ

That's the kind of error you would get if you omit the PROC IML statement.

The syntax you've posted seems to be correct. The following works for me. See if you can reproduce the error with some data set in the SASHELP library:

data UTIL_WHOLESALE;

set sashelp.class;

proc sort; by age;

run;

proc iml;

/* GET DATA */

use UTIL_WHOLESALE;

read all var{height} into height;

read all var{weight} into weight;

goliPSU
Calcite | Level 5

using the SASHELP library it does work without any error! but using my own data still giving this error:-(

Rick_SAS
SAS Super FREQ

Try PROC CONTENTS or PROC PRINT. Maybe the data is corrupted?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 3 replies
  • 1071 views
  • 0 likes
  • 2 in conversation