BookmarkSubscribeRSS Feed
R_A_G_
Calcite | Level 5
hello,

I am getting this warning would someone please help me figure out why
thanks

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

thank

R.A.G.
3 REPLIES 3
R_A_G_
Calcite | Level 5
Also this is my code
Thanks
R.A.G.

%MACRO SaveItemOrder;
%let num_skills=3;
%let numatt=3;
%let numitem=35;
%let numclass=%eval(2**&num_skills);
%let IDname=num_student;

DATA _NULL_;
/* Datasets to draw values from*/
%LET dataQmatrix=%SYSFUNC(OPEN(work.Qmatrix,i));
%DO i=1 %TO &NUMITEM;
/* Assign new macro variables as global*/
%GLOBAL itemorder&i;
/* Gets entire row of data*/
%LET row=%SYSFUNC(FETCHOBS(&dataQmatrix.,&i.));
/* Grabs specific value for threshold from that row*/
%LET item&i.=%SYSFUNC(GETVARN(&dataQmatrix.,
%SYSFUNC(VARNUM(&dataQmatrix.,itematt&num_skills))));
/* Transferring value to global macro, and checking via log;*/
%LET itemorder&i. = &&item&i.;
%PUT itemorder&i. &&itemorder&i.;
%END;
/* Close dataset used in program;*/
%LET dataQmatrix=%SYSFUNC(CLOSE(&dataQmatrix.));
RUN;
%MEND;
%SaveItemOrder;
R_A_G_
Calcite | Level 5
Hello,
Just to let others who might be curious know that I have found out why I was getting "OUT OF RANGE WARNING"
The section of the code that was referring to another file had the wrong name for the variable.
Code:

%SYSFUNC(VARNUM(&dataQmatrix.,itematt&num_skills))));

itematt should have been changed to skills

have a great rest of the weekend
R.A. G.
ariari
Calcite | Level 5
Hi R.A. G.

Second argument of the VARNUM function must be character. for example
varnum(mydataid,'name')


http://support.sas.com/documentation/cdl/en/sclref/59578/HTML/default/a000144731.htm


Irena

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 9474 views
  • 0 likes
  • 2 in conversation