BookmarkSubscribeRSS Feed
MartinJ
Calcite | Level 5

How can we easily convert hex values in SAS ESP?

Eg. In a Rabbit queue we have a message containing "B6" witch needs to be interpreted as "182". 

We are using ESP5.1 and 5.2

Thanks.

2 REPLIES 2
AndyT_SAS
SAS Employee

There isn't a built in function for this in the functional window or compute window.  You could use a python window or write a C++ function to do this.

MartinJ
Calcite | Level 5

Thanks AndyT. I have created a mas for this and that works fine!

 

<mas-module module="New_Module_1" language="python" func-names="hextodex">
<code><![CDATA[def hextodex(sensorID):
"Output: sensorID_N"
sensorID_N = int(sensorID, base=16)
return sensorID_N]]></code>
</mas-module>

Whether you're already using SAS Event Stream Processing or thinking about it, this is where you can connect with your peers, ask questions and find resources.

 

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1076 views
  • 0 likes
  • 2 in conversation