Hi,
I have a task of encrypting group IDs using random values - either alphabet or number. I've created a format to map each of the 26 alphabets to a two digit random number, and each single digit number (0-9) to a two digit alpha-numeric random value, such that none of the values appear more than once.
Now, the question is, how do I change the 9 digits of group ID to 18 encrypted digits based on the format values?
e.g. proc format ;
value $xwalk
'A' = '10'
'B' = '19'
'C' = '26'
'D' = '18'
'E' = '35'
'1' = 'A0'
'2' = 'B3'
'3' = 'E8'
'4' = 'Q9'
'5' = 'I2'
;
In this case, if my group ID is 'AD245', it should become '1018B3Q9I2' after encryption.
I've tried using tranwrd function with do loop, but that doesn't allow me to read crosswalk values from a dataset or format.
Please suggest what code I can use to get there.
Thanks!
... View more