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-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!

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
  • 1552 views
  • 0 likes
  • 3 in conversation