BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,
I need to get last 3 bytes in a variable length variable, irrespective of what ever total length that variable is.

thanks,
sasbase
1 REPLY 1
data_null__
Jade | Level 19
This looks promising.

[pre]
data test;
infile cards dlm=', .;';
input word :$24. @@;
length L3 $3;
L3= substrN(word,length(word)-2);
cards4;
Hi,
I need to get last 3 bytes in a variable length variable, irrespective of what ever total length that variable is.

thanks,
sasbase
;;;;
run;

proc contents;
run;
proc print;
run;
[/pre]

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 888 views
  • 0 likes
  • 2 in conversation