O'Reilly logo

SAS Certification Prep Guide, 4th Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Custom Formats

Overview

After you have created a custom format, you can use SAS statements to permanently assign the format to a variable in a DATA step, or you can temporarily specify a format in a PROC step to determine how the data values appear in output. You should already be familiar with referencing a format in a FORMAT statement.
Another way to assign, change, or remove the format that is associated with a variable in an existing SAS data set is to use the DATASETS procedure to modify the descriptor portion of a data set.
General form, DATASETS procedure with the MODIFY and FORMAT statements:
PROC DATASETS LIB=SAS-library <NOLIST>;
MODIFY SAS-data-set;
FORMAT variable(s) format;
QUIT;
Here is an explanation of the syntax: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required