So you still use the LENGTH statement, but you replace the literal value with a macro variable. This means you have to create a separate macro variable for every character variable people might read from external data, and users need to know which macro variable to use for which dataset variable.
There is really no difference between retrieving the correct length or the correct macro variable name from a data dictionary, for insertion into the LENGTH statement which needs to be coded anyway. So I can't see an advantage here.
Bottom line: your assertion of eliminating the LENGTH statement was incorrect.
... View more