SAS: Macro Functions %length

A. Usage

  • Extract sub-string from a string in Macro

B. Code

 %let newvar = %substr(&var., 3, %length(&var.)-2); 
*Newvar is trimming the first 2 characters off the var;