Could somebody please suggest me an idea....
We have Raw data which is being read and an variable MCL is getting created using $CHAR8. format and then when I print it with Format $HEX16. get below values...
MCL
----------
0008001E0001000F
00080015000000A3
0008001E0001000F
00080015000000A3
0008001E0001000F
00080015000000A3
0008001E0001000F
00080015000000A3
0008001E0001000F
Now each byte need to be converted in the format AA.BB.CC.DDDD format so for example if we take 0008 it will be 8 ,001E=30,0001=1,000F=15
so equivalent of hex value 0008001E0001000F should be 8.30.1.15 ....Could somebody suggest me how we do that?
Quick brute force attack:
data _null_;
length result $20;
x = input('0008001E0001000F',$hex16.);
xh = put(x,$hex16.);
x1 = input(substr(xh,1,4),hex4.);
x2 = input(substr(xh,5,4),hex4.);
x3 = input(substr(xh,9,4),hex4.);
x4 = input(substr(xh,13,4),hex4.);
result = compress(put(x1,best5.)!!'.'!!put(x2,best5.)!!'.'!!put(x3,best5.)!!'.'!!put(x4,best5.));
put result=;
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.