BookmarkSubscribeRSS Feed
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!

Opal | Level 21

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);

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.




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
  • 2 replies
  • 3 in conversation