BookmarkSubscribeRSS Feed
MIA9510
Calcite | Level 5

Hello everyone,

 

I am trying to run a macro ,And I use my own data as an input. But I got an error:

ERROR: (execution) Invalid operand to operation.

Any help would greatly appreciated.

I attached the log file, please have a look.

 

Thankyou,

MIA

2 REPLIES 2
Rick_SAS
SAS Super FREQ

The log says that the macro is calling the J function inside the MWVAR function. The J function allocates a matrix. Apparently, the function is being called as

X = j(k, k, value);

where k=0. The J function fails because a valid matrix has k > 0.

 

 

Unfortunately, the log does not tell you WHY k is zero. It could be that you've incorrectly specified the arguments to the macro. For example, it might be expecting positive values and your data is negative. Of maybe it is expecting numerical variables and your data is character.  I suggest you tun the macro with some valid data and then compare the two data sets to figure out why one works and the other does not.  Alternatively, if you can post your data and the macro, someone on the community might be able to assist.

MIA9510
Calcite | Level 5

Hi Rick,

Thank you so much, I’ve solve the problem. When I just use 20 data of all this 20000 big data,the procedure worked. I wonder if it is because my data is to big and my laptop couldn't afford to runSmiley Very Happy

Whatever,thank U so.

 

MIA

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 2 replies
  • 2081 views
  • 0 likes
  • 2 in conversation