BookmarkSubscribeRSS Feed
Jhan1
Calcite | Level 5

Im sure there is a simple solution but i cant seem to figure it out and thought Id ask here. 

 

Im working with a dataset with a numeric variable that has hex8 format. This happens to be a unique id for the data. Im simply wanting to take a look at a few observations using proc print. A tyoical id is a combination of letters and numbers hence i tried something similar to below. 

 

Proc print dara = dataset;

Where unique_id in ("x12345z"); run;

 

This doesnt work as unique_id is actually a numeric variable. Any solution to work around this?

 

Thank you!

Spoiler
 
2 REPLIES 2
Astounding
PROC Star

The letters in a hex format are limited in scope ... you won't see an X or a Z.  Presumably you know the right code to search for.  Here is how you would search for A12345D:

 

where unique_id in (A12345Dx);

ballardw
Super User

You might show what you are seeing for the value. Hex really shouldn't have "x" or "Z". There should be no letters higher than F appearing.

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 661 views
  • 0 likes
  • 3 in conversation