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
SAS Super FREQ
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 🙂

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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