http://support.sas.com/techsup/technote/ts800.pdf
.
$db2ida -provider sas -stopforce
$ cd db2instancepath/sqllib/function
$ rm -fr SAS
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
$ path_to_sh_file/SAS/SASFormatsLibraryForDB2/2.1-n/bin/ CopySASFiles.sh db2instancepath/sqllib
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.31-n/bin /db2instancepath/SAS/SASTKInDatabaseServerForDB2/9.31-n/misc /db2instancepath/SAS/SASTKInDatabaseServerForDB2/9.31-n/sasexe /db2instancepath/SAS/SASTKInDatabaseServerForDB2/9.31-n/utilities
$ dbset DB2_SAS_SETTINGS="ENABLE_SAS_EP:true; LIBRARY_PATH:db2instancepath/SAS/SASTKInDatabaseServerForDB2/9.31-n/sasexe"
$ db2set
DB2_SAS_SETTINGS=ENABLE_SAS_EP:true LIBRARY_PATH:db2instancepath/SAS/SASTKInDatabaseServerForDB2/9.31-n/sasexe DB2LIBPATH=db2instancepath/sqllib/function/SAS
$ db2 list applications $ db2 force applications all $ db2 terminate $ db2stop
Default | FALSE |
Requirement | The path must be fully qualified. |
Default | ASLHEAPSZ dbm configuration value |
Range | 1–32767 |
Requirement | size must be an integer value. |
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. |
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. |
Default | DIAGPATH dbm configuration value |
Requirement | The path must be fully qualified. |
1 | SEVERE |
2 | ERROR |
3 | WARNING |
4 | INFORMATIONAL |
Default | DIAGLEVEL dbm configuration value |
Range | 1–4 |
-provider sas
-start
–stop
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. |
Tip | You can use only PASSWORD=, PASS=, or PW= for the password argument. PWD= is not supported and causes an error. |
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 .
|
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. |
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. |
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 gcc compiler should be used for Linux. |
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. |
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. |
Tip | Files that are produced include an event log that contains detailed information about the success or failure of the publishing process. |
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. |
Tip | You can use only PASSWORD=, PASS=, or PW= for the password argument. PWD= is not supported and causes errors. |
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. |
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. |
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. |
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
.