BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
lady8506
Quartz | Level 8

Can anyone tell me what is wrong here?

 

334 DATA Felibertiloop; set Felibertiloop;
335 array Symptoms[3] Symptoms1-Symptoms3;
336 **Output if all symptoms are missing;
337 IF max( of Symptoms(*)) = . then output;
338 ELSE DO I=1 to 3;
339 **Only output when sides are not missing;
340 Symptoms=Symptoms(i);
ERROR: Illegal reference to the array Symptoms.
341 IF not missing(Symptoms) then output;
ERROR: Illegal reference to the array Symptoms.
342 end;
343 drop i;
344 RUN;


1 ACCEPTED SOLUTION
3 REPLIES 3
lady8506
Quartz | Level 8
Actually figured it out right after I posted this. Tried to delete post, forgot to press "Confirm". Too late now. Thanks anyway.
Astounding
Opal | Level 21

Once you have an array named Symptoms, you can't use that name to represent anything else.  In this case, you are trying to create a variable named Symptoms as well, which SAS finds illegal.  Change the variable name to something else.

 

SAS is so fussy about reusing an array name that you would also get an error for this:

 

array symptoms {3} symptom1-symptom3;

array symptoms {3} symptom1-symptom3;

 

 

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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