139k views
2 votes
Which PROC FORMAT statement option is used to create a permanent format?

a. CNTLIN=
b. FMTLIB=
c. LIBRARY=
d. CNTLOUT=

User Celeritas
by
7.7k points

1 Answer

3 votes

Final answer:

The option used to create a permanent format in SAS with the PROC FORMAT statement is 'LIBRARY='. It specifies the libref where the format will be stored permanently in a SAS library format catalog.

Step-by-step explanation:

The option used to create a permanent format in SAS using the PROC FORMAT statement is c. LIBRARY=. This option specifies the libref of the SAS library where you want to store the format. Permanent formats are stored in a SAS format catalog in the specified library. To ensure the format can be used in future SAS sessions, the library should be one that is not cleared at the end of the session, such as a library defined with the LIBNAME statement.

For example, if you want to create a permanent format named myfmt and store it in a library referenced as mylib, you would use the following statement:

LIBNAME mylib 'path-to-library';
PROC FORMAT LIBRARY=mylib;
VALUE myfmt 1 = 'Category1'
2 = 'Category2';
RUN;

This code creates a format called myfmt in the mylib library, which assigns 'Category1' to the value 1 and 'Category2' to the value 2. Permanent Format in SAS

User SangamAngre
by
7.8k points