The
SAS publishing macros are used to publish formats and the SAS_PUT( )
function in Greenplum.
The
%INDGP_PUBLISH_FORMATS macro creates the files
that are needed to build the SAS_PUT( ) function and publishes
those files to the Greenplum database.
This macro also makes
many formats that SAS supplies available inside Greenplum. In addition
to formats that SAS supplies, you can publish the PROC FORMAT definitions
that are contained in a single SAS format catalog by using the FMTCAT=
option. The process of publishing a PROC FORMAT catalog entry converts
the range label pairs into embedded data in Greenplum.
The
%INDGP_PUBLISH_FORMATS macro performs the following
tasks:
-
produces the set of .c and .h files
that are necessary to build the SAS_PUT( ) function
-
produces a script of the Greenplum
commands that are necessary to register the SAS_PUT( ) function
in the Greenplum database
-
transfers the .c and .h files to
Greenplum
-
calls the
SAS_COMPILEUDF function to compile the source files into object files
and links to the SAS Formats Library
-
calls the
SAS_COPYUDF function to copy the new object files to
full-path-to-pkglibdir/SAS
on
the whole database array (master and all segments) , where
full-path-to-pkglibdir
is
the path that was defined during installation.
-
uses the
SAS/ACCESS Interface to Greenplum to run the script to publish
the SAS_PUT( ) function to the Greenplum database
The SAS_PUT( )
function is registered in Greenplum with shared object files that
are loaded at run time. These functions must be stored in a permanent
location. The SAS object files and the SAS Formats Library are stored
in the
full-path-to-pkglibdir/SAS
directory
on all nodes, where
full-path-to-pkglibdir
is the path that
was defined during installation.
Greenplum caches the
object files within a session.
Note: You can publish format functions
with the same name in multiple databases and schemas. Because all
format object files are stored in the
full-path-to-pkglibdir/SAS
directory,
the publishing macro uses the database, schema, and model name as
the object filename to avoid potential naming conflicts.