Help using Base SAS procedures

" out of range" warning

Reply
Regular Contributor
Posts: 161

" out of range" warning

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.))));
Valued Guide
Posts: 632

Re: " out of range" warning

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.
SAS Super FREQ
Posts: 8,744

Re: " out of range" warning

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
Regular Contributor
Posts: 161

Re: " out of range" warning

Thanks Cynthia, but when I do put the whole code people,Scott, complain about the size of the macro Smiley Happy
Ask a Question
Discussion stats
  • 3 replies
  • 371 views
  • 0 likes
  • 3 in conversation