BookmarkSubscribeRSS Feed
R_A_G_
Calcite | Level 5
I am getting an out range error but my variable are less than 8 characters. Why?


WARNING: Argument 2 to function GETVARN referenced by the %SYSFUNC or %QSYSFUNC macro function is out of range.


my code:

%LET item&i.=%SYSFUNC(GETVARN(&dataQmatrix., %SYSFUNC(VARNUM(&dataQmatrix.,&ordervar.))));
3 REPLIES 3
ArtC
Rhodochrosite | Level 12
The second arg of the GETVARN function is the variable number. Assuming that the data set has been properly opened, and the DSID is valid (&DATAQMATRIX) then it is likely that the function VARNUM has been unable to return a valid variable number for the variable named in &ORDERVAR. Make sure that &ORDERVAR has the correct variable name.
Cynthia_sas
Diamond | Level 26
Hi:
I believe that this post is related to these other posts???
http://support.sas.com/forums/thread.jspa?threadID=12810&tstart=0
http://support.sas.com/forums/thread.jspa?threadID=12801&tstart=0

It might be better to refer people to these earlier posts so that some idea of the scope and size of the macro programs you are dealing with and what you are trying to debug is evident -- it is not a good idea to take macro code snippets out of context.

cynthia
R_A_G_
Calcite | Level 5
Thanks Cynthia, but when I do put the whole code people,Scott, complain about the size of the macro 🙂

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2096 views
  • 0 likes
  • 3 in conversation