SAS/ACCESS software for relational
databases enables you to use the format publishing macro to deploy
or publish the PUT function implementation to the database as a function
named SAS_PUT(). As with any other programming function,
the SAS_PUT() function can take one or more input
parameters and return an output value. The default value for the SQLMAPPUTTO
system option is SAS_PUT. After the SAS_PUT() function
is deployed in the database, you can use the SAS_PUT() function as you would use any standard SQL function inside the
database.
In addition, the SAS_PUT() function supports the use of SAS formats in SQL queries
that are submitted to the database. You can use the format publishing
macro to publish to the database both the formats that are supplied
by SAS and the custom formats that you create with the FORMAT procedure.
By publishing the PUT
function implementation to the database as the SAS_PUT() function to support the use of SAS formats, and by packaging both
the formats that are supplied by SAS and the custom formats that you
create with the FORMAT procedure, the following advantages are realized:
-
The entire SQL query can be processed
inside the database.
-
The SAS format processing leverages
the DBMS's scalable architecture.
-
The results are grouped by the
formatted data, and are extracted from the database.
Note: If you use the SQL_FUNCTIONS=
LIBNAME statement option to remap the PUT function (for example, SAS_PUT(
)), then the SQL_FUNCTIONS= LIBNAME option takes precedence over the
SQLMAPPUTTO= system option.
For more information, see “SQL_FUNCTIONS= LIBNAME Option” in SAS/ACCESS for Relational Databases: Reference.
Tip
Using both the SQLREDUCEPUT=
system option (or the PROC SQL REDUCEPUT= option) and the SAS_PUT() function can result in a significant performance boost.
For more information
about using the In-database
format publishing macro and the SQLMAPPUTTO system option, see
SAS/ACCESS for Relational Databases: Reference.