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

Hi SAS users,

 

Can the byte function be used in sas studio? 

 

data a ;
plusmin = byte(177);
run;

proc print data = a ;
run;

If I used the above code and can not get the plus minus sign in the dataset nor the print table.

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

What font are you using (active ODS Style)? The ASCII values above 127 numeric value are quite font dependent. In my set up I see a plus/minus sign.

 

 

View solution in original post

3 REPLIES 3
PeterClemmensen
Tourmaline | Level 20

Please do not double post 🙂

 

What happens in your log when you run this?

 

data _null_;
   plusmin = byte(177);
   put plusmin;
run;
ballardw
Super User

What font are you using (active ODS Style)? The ASCII values above 127 numeric value are quite font dependent. In my set up I see a plus/minus sign.

 

 

Tom
Super User Tom
Super User

Are you using Unicode?  If so you need the two byte sequence 'C2B1'x and not just 'B1'x.

If you are not using Unicode then any code that needs more than 7 bits (greater than 127 base 10) will display differently in different fonts.

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!

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
  • 3 replies
  • 967 views
  • 0 likes
  • 4 in conversation