Production Ready Macros for SAS Application Developers
https://github.com/sasjs/core
mp_updatevarlength.sas File Reference

Change the length of a variable. More...

Go to the source code of this file.

Detailed Description

The library is assumed to be assigned. Simple character updates currently supported, numerics are more complicated and will follow.

  data example;
    a='1';
    b='12';
    c='123';
  run;
  %mp_updatevarlength(example,a,3)
  %mp_updatevarlength(example,c,1)
  proc sql;
  describe table example;
Parameters
libdsthe library.dataset to be modified
varThe variable to modify
lenThe new length to apply

Dependencies

Version
9.2
Author
Allan Bowe

Definition in file mp_updatevarlength.sas.