Tips for Using the SAS_PUT() Function
-
When SAS parses the PUT function,
SAS checks to make sure that the format is a known format name. SAS
looks for the format in the set of formats that are defined in the
scope of the current SAS session. If the format name is not defined
in the context of the current SAS session, the SAS_PUT() is returned to the local SAS session for processing.
-
Using both the SQLREDUCEPUT= system
option (or the PROC SQL REDUCEPUT= option) and SQLMAPPUTTO= can result
in a significant performance boost. First, SQLREDUCEPUT= works to
reduce as many PUT functions as possible. Then, using SQLMAPPUTTO=
with the format publishing macro changes the remaining PUT functions
to SAS_PUT() functions.
-
To turn off automatic translation
of the PUT function to the SAS_PUT() function, set
the SQLMAPPUTTO= system option to NONE.
-
The format of the SAS_PUT() function parallels that of the PUT function:
SAS_PUT(source, 'format.')
Copyright © SAS Institute Inc. All rights reserved.