http://support.sas.com/techsup/technote/ts800.pdf
.
$db2ida -provider sas -stopforce
SAS-install-directory/SASFormatsLibraryForDB2/2.1/DB2on<AIX
| Linux64>/
directory.
SAS-install-directory/SASTKInDatabaseServer/9.31/DB2on<AIX
| Linuxx64>/
.
/path_to_sh_file/SAS/SASFormatsLibraryForDB2/2.1-n/bin/ InstallAccelDB2Fmt.sh /path_to_sh_file/SAS/SASFormatsLibraryForDB2/2.1-n/bin/CopySASFiles.sh /path_to_sh_file/SAS/SASFormatsLibraryForDB2/2.1-n/lib/SAS_CompileUDF /path_to_sh_file/SAS/SASFormatsLibraryForDB2/2.1-n/lib/SAS_DeleteUDF /path_to_sh_file/SAS/SASFormatsLibraryForDB2/2.1-n/lib/libjazxfbrs.so /path_to_sh_file/SAS/SASFormatsLibraryForDB2/2.1 ->2.1-n
db2instancepath/sqllib
is
the path to the sqllib
directory of
the DB2 instance that you want to use.
db2instancepath/sqllib/function/SAS/SAS_CompileUDF db2instancepath/sqllib/function/SAS/SAS_DeleteUDF db2instancepath/sqllib/function/SAS/libjazxfbrs.so
/db2instancepath/SAS/SASTKInDatabaseServerForDB2/9.33-n/bin /db2instancepath/SAS/SASTKInDatabaseServerForDB2/9.33-n/misc /db2instancepath/SAS/SASTKInDatabaseServerForDB2/9.33-n/sasexe /db2instancepath/SAS/SASTKInDatabaseServerForDB2/9.33-n/utilities
$ dbset DB2_SAS_SETTINGS="ENABLE_SAS_EP:true; LIBRARY_PATH:db2instancepath/SAS/SASTKInDatabaseServerForDB2/9.33-n/sasexe"
$ db2set
DB2_SAS_SETTINGS=ENABLE_SAS_EP:true LIBRARY_PATH:db2instancepath/SAS/SASTKInDatabaseServerForDB2/9.33-n/sasexe DB2LIBPATH=db2instancepath/sqllib/function/SAS
$ db2 list applications $ db2 force applications all $ db2 terminate $ db2stop
specifies whether the SAS Embedded Process is started with the DB2 instance.
Default | FALSE |
specifies the path from which the SAS Embedded Process library is loaded
Requirement | The path must be fully qualified. |
specifies the size in 4K pages of the shared memory buffer that is used for communication sessions between DB2 and SAS.
Default | ASLHEAPSZ dbm configuration value |
Range | 1–32767 |
Requirement | size must be an integer value. |
specifies a value in seconds that DB2 uses to determine whether the SAS Embedded Process is non-responsive when DB2 and SAS are exchanging control messages.
Default | 600 seconds |
Note | If the time-out value is exceeded, DB2 forces the SAS Embedded Process to stop in order for it to be re-spawned. |
specifies the number of times that DB2 attempts to re-spawn the SAS Embedded Process after DB2 has detected that the SAS Embedded Process has terminated abnormally.
Default | 10 |
Range | 1–100 |
Requirement | number-of-tries must be an integer value. |
Note | When DB2 detects that the SAS Embedded Process has terminated abnormally, DB2 immediately attempts to re-spawn it. This argument limits the number of times that DB2 attempts to re-spawn the SAS Embedded Process. Once the retry count is exceeded, DB2 waits 15 minutes before trying to re-spawn it again. |
specifies the path that indicates where the SAS Embedded Process diagnostic logs are written.
Default | DIAGPATH dbm configuration value |
Requirement | The path must be fully qualified. |
specifies the minimum severity level of messages that are captured in the SAS Embedded Process diagnostic logs. The levels are defined as follows.
1 | SEVERE |
2 | ERROR |
3 | WARNING |
4 | INFORMATIONAL |
Default | DIAGLEVEL dbm configuration value |
Range | 1–4 |
-provider sas
-start
–stop
specifies the DB2 server name or the IP address of the server host. If the server name contains spaces or nonalphanumeric characters, enclose the server name in quotation marks.
Requirement | The name must be consistent with how the host name was cached when PSFTP server was run from the command window. If the full server name was cached, you must use the full server name in the SERVER argument. If the short server name was cached, you must use the short server name. For example, if the long name, disk3295.unx.comp.com, is used when PSFTP was run, then server=disk3295.unx.comp.com must be specified. If the short name, disk3295, was used, then server=disk3295 must be specified. For more information, see DB2 Installation and Configuration Steps. |
specifies the DB2 user name (also called the user ID) that is used to connect to the database. If the user name contains spaces or nonalphanumeric characters, enclose the user name in quotation marks.
specifies the password that is associated with your DB2 user ID. If the password contains spaces or nonalphabetic characters, enclose the password in quotation marks.
Tip | You can use only PASSWORD=, PASS=, or PW= for the password argument. PWD= is not supported and causes an error. |
specifies the DB2 database that contains the tables and views that you want to access. If the database name contains spaces or nonalphanumeric characters, enclose the database name in quotation marks.
Requirement | The SAS_COMPILEUDF
function is created as a Unicode function. If the database is not
a Unicode database, then the alternate collating sequence must be
configured to use identity_16bit .
|
specifies SASLIB as the schema name.
Default | SASLIB |
Restriction | The SAS_COMPILEUDF function and the two global variables (SASUDF_DB2PATH and SASUDF_COMPILER_PATH) are published to the SASLIB schema in the specified database. If a value other than SASLIB is used, it is ignored. |
Requirement | The SASLIB schema must be created before publishing the SAS_COMPILEUDF and SAS_DELETEUDF functions. |
specifies the parent
directory that contains the function/SAS
subdirectory,
where all the object files are stored and defines the SASUDF_DB2PATH global variable that is used when publishing the format
and scoring model functions.
Interaction | db2instancepath should be the same path as the path that was specified during the installation of the SAS_COMPILEUDF binary file. For more information, see Step 3 in Unpack the SAS Formats Library and Binary Files. |
Tip | The SASUDF_DB2PATH global variable is defined in the SASLIB schema under the specified database name. |
specifies the path to the location of the compiler that compiles the source files and defines the SASUDF_COMPILER_PATH global variable that is used when publishing the format and scoring model functions.
Tip | The SASUDF_COMPILER_PATH global variable is defined in the SASLIB schema under the specified database name. The XLC compiler should be used for AIX, and the GGG compiler should be used for Linux. |
specifies the name of a DB2 database to which the SAS_COMPILEUDF function is published.
specifies that the macro performs one of the following actions:
creates a new SAS_COMPILEUDF function.
overwrites the current SAS_COMPILEUDF function, if a SAS_COMPILEUDF function by the same name is already registered, or creates a new SAS_COMPILEUDF function if one is not registered.
causes the SAS_COMPILEUDF function to be dropped from the DB2 database.
Default | CREATE |
Tip | If the SAS_COMPILEUDF function was published previously and you now specify ACTION=CREATE, you receive warning messages from DB2. If the SAS_COMPILEUDF function was published previously and you specify ACTION=REPLACE, no warnings are issued. |
specifies the object filename that the publishing macro uses to register the SAS_COMPILEUDF function. The object filename is a file system reference to a specific object file, and the value entered for OBJNAME must match the name as it exists in the file system. For example, SAS_CompileUDF is mixed case.
Default | SAS_CompileUDF |
Interaction | If the SAS_COMPILEUDF function is updated, you might want to rename the object file to avoid stopping and restarting the database. If so, the SAS_COMPILEUDF function needs to be reregistered with the new object filename. |
specifies a directory that contains diagnostic files.
Tip | Files that are produced include an event log that contains detailed information about the success or failure of the publishing process. |
specifies the DB2 server name or the IP address of the server host. If the server name contains spaces or nonalphanumeric characters, enclose the server name in quotation marks.
Requirement | The name must be consistent with how the host name was cached when PSFTP server was run from the command window. If the full server name was cached, use the full server name in the SERVER argument. If the short server name was cached, use the short server name. For example, if the long name, disk3295.unx.comp.com, is used when PSFTP was run, then server=disk3295.unx.comp.com must be specified. If the short name, disk3295, was used, then server=disk3295 must be specified. For more information, see DB2 Installation and Configuration Steps. |
specifies the DB2 user name (also called the user ID) that is used to connect to the database. If the user name contains spaces or nonalphanumeric characters, enclose the user name in quotation marks.
specifies the password that is associated with your DB2 user ID. If the password contains spaces or nonalphabetic characters, enclose the password in quotation marks.
Tip | You can use only PASSWORD=, PASS=, or PW= for the password argument. PWD= is not supported and causes errors. |
specifies the DB2 database that contains the tables and views that you want to access. If the database name contains spaces or nonalphanumeric characters, enclose the database name in quotation marks.
specifies SASLIB as the schema name.
Default | SASLIB |
Restriction | The SAS_DELETEUDF function is published to the SASLIB schema in the specified database. If a value other than SASLIB is used, it is ignored. |
Requirement | Create the SASLIB schema before publishing the SAS_COMPILEUDF and SAS_DELETEUDF functions. |
specifies the name of a DB2 database to which the SAS_DELETEUDF function is published.
Interaction | The database that you specify in the DATABASE argument takes precedence over the database that you specify in the INDCONN macro variable. For more information, see Running the %INDB2_PUBLISH_DELETEUDF Macro. |
specifies that the macro performs one of the following actions:
creates a new SAS_DELETEUDF function.
overwrites the current SAS_DELETEUDF function, if a SAS_DELETEUDF function by the same name is already registered, or creates a new SAS_DELETEUDF function if one is not registered.
causes the SAS_DELETEUDF function to be dropped from the DB2 database.
Default | CREATE |
Tip | If the SAS_DELTEUDF function was published previously and you specify ACTION=CREATE, you receive warning messages from DB2. If the SAS_DELETEUDF function was published previously and you specify ACTION=REPLACE, no warnings are issued. |
specifies a directory that contains diagnostic files.
Tip | Files that are produced include an event log that contains detailed information about the success or failure of the publishing process. |
http://support.sas.com/documentation/onlinedoc/indbtech/index.html
.