Slightly stunned here.
I have a SAS variable that has values of varying lengths.
If the memory required for the variable is below a threshold(48bytes), I have the append white spaces to the variable so that it reaches that memory allocation.
How would I do this in SAS?
More importantly, where can I find documentation regarding the memory taken up by a single white space(or any other character/type) in SAS?
Edit:
stevepastelan's answer was perfect actually 🙂
Best Answer
Character variables in SAS are automatically padded to the right to fill their length, however, certain statements, such as the PUT statement, may trim them when displaying.
You can use formats to force the output, ex:
Writes the following to the SAS log: