Cute application. Thanks for sharing.

From a SAS coding perspective, neither l nor num need to be arrays. They can be scalar quantities.

Regarding the 'Key' value, your program contains the comment, "A large number is preferable." I'm not sure why that comment is there. A small seed such as Key=1 produces a stream of values that is just as useful as the stream for Key=17614353. And a large key is only slightly safer in a brute-force attack where someone who knows your encoding process performs a brute-force approach to iterate over keys.

BTW, if your spy has a bad memory and cannot remember Key values, you can use a simpler stream such as

xor[i] = bxor(num,i/&len);

for the encoding and eliminate the Key parameter altogether. (Be sure to also use bxor(xor[i],i/&len) in the DECODE macro.)