Creating Custom Formats Using the PICTURE Statement

Overview

You have learned that the VALUE statement can associate a text label with a discrete numeric or character value. Suppose you want to insert text characters into a numeric value. For example, you might have stored phone numbers as numeric values like 1111231234 that you want to display as (111) 123-1234. You can use the PICTURE statement to create a template for printing numbers.
General form, PROC FORMAT with the PICTURE statement:
PROC FORMAT;
PICTURE format-name
value-or-range='picture';
RUN;
Here is an explanation of the syntax:
format-name
is the name of the format that you are creating.
value-or-range
is the individual value or range of values that you want ...

Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.