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

Hi all,

i need help with this.

 i created  a variable Adjgpa with is code


proc means data=merged mean;
var GPA;
run;

data Adjgpa;
set Merged;
adjgpa=(GPA-3.18);
run;
proc print data=Adjgpa (obs=10);
run;
proc contents data=adjgpa;
run;

then i tried to run this code


proc univariate data =merged noprint;
var adjgpa;
histogram ;
run;

and it gives me this error:Variable Adjgpa not found.

 

what am i doing wrong please

1 ACCEPTED SOLUTION

Accepted Solutions
pinkyloop
Obsidian | Level 7

I used this


proc univariate data =adjgpa noprint;
var adjgpa;
histogram ;
run;

and it worked.

 

Thank you 

View solution in original post

5 REPLIES 5
ChrisNZ
Tourmaline | Level 20

You seem to point to the wrong table for the proc univariate.

Shouldn't you use Adjgpa?

 

pinkyloop
Obsidian | Level 7
Like this?

proc univariate data =adjgpa noprint;
var adjgpa;
histogram ;
run;
pinkyloop
Obsidian | Level 7

I used this


proc univariate data =adjgpa noprint;
var adjgpa;
histogram ;
run;

and it worked.

 

Thank you 

Amir
PROC Star

Hi @pinkyloop, nicely asked question, showing code and error message (not everyone does), followed by a quick response from @ChrisNZ.

 

To round it off, it would also be good to mark the response from @ChrisNZ  as the solution, which highlights the question as solved for the benefit of others and gives @ChrisNZ  further recognition.

 

Thanks & regards,

Amir.

pinkyloop
Obsidian | Level 7
Thanks

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 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 5 replies
  • 2701 views
  • 2 likes
  • 3 in conversation