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

Creating Formats from SAS Data Sets

Overview

You have seen that you can create a format by specifying values and labels in a PROC FORMAT step. You can also create a format from a SAS data set that contains value information (called a control data set). To do this, you use the CNTLIN= option to read the data and create the format.
General form, CNTLIN= option in PROC FORMAT:
PROC FORMAT LIBRARY=libref.catalog
CNTLIN=SAS-data-set;
Here is an explanation of the syntax:
libref.catalog
is the name of the catalog in which you want to store the format.
SAS-data-set
is the name of the SAS data set that you want to use to create the format.

Example

Suppose you have a SAS data set named Routes that has variables that ...

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