checking the length of text field less than or equal to the assigned macro - SAS
Posted on 2014-01-27
I am building a text field based on variables coming in from a list.
I have created the macro below
call symput("format_textrecord", '$10000.'); /*Setup variable for textrecord length */
Once the textrecord is built through processing, I would like to check the length of the textrecord field to ensure that it is less than 10000.
Is there a way to do this using the macro variable. I know this can be done by hardcoding 10000 in an if statement, but I want to avoid as much manual interaction as possible so that the check and the format stay iin sync.