Online File

How to use this page


Rick Aster: Professional SAS Programming Shortcuts: Contents

Chapter 24
Program
Shortening a title (two different ways)


* removing characters from the end *;

title = left(text);
if length(left(text)) > vlength(title) then
    substr(title, vlength(title) - 2) = '...';

* removing characters from the middle *;

title = left(text);
if length(left(text)) > vlength(title) then do;
   substr(title, floor(vlength(title)/2), 3) = '...';
   substr(title, floor(vlength(title)/2) + 3) =
       substr(text, length(text) - ceil(vlength(title)/2) + 3);
   end;

 O /\

Global
Statements

RICK ASTER

SAS

BOOKS

Tech | Dictionary

Download | Rastinate

Rick Aster

Professional SAS Programming Shortcuts

Contents/Online Files

Corrections

Catalog Page