psftp> open userid@machinename psftp> ls
%let indconn = user=abcd password=xxxx database=indbdb server=indbsvr; %indb2_publish_compileudf(action=drop, db2path=/users/db2v10/sqllib, compiler_path=/usr/vac/bin); %indb2_publish_deleteudf(action=drop);
proc sql noerrorstop; connect to db2 (user=abcd password=xxxx database=indbdb); select * from connection to db2 ( select cast(funcname as char(40)), cast(definer as char(20)) from syscat.functions where funcschema='SASLIB' ); quit;
ps -ef | grep db2sasep
db2v10 23265382 20840668 0 Oct 06 - 4:03 db2sasep db2v10 27983990 16646196 1 08:24:09 pts/10 0:00 grep db2sasep
db2ida -provider sas -stop
db2ida -provider sas -stopforce
cd db2instancepath
rm -fr SAS
cd db2instancepath
rm -fr SASEPHome
db2 list applications
db2 force applications all db2 terminate
db2stop
cd db2instancepath/sqllib/function
rm -fr SAS
ps -ef | grep db2sasep
db2v10 23265382 20840668 0 Oct 06 - 4:03 db2sasep db2v10 27983990 16646196 1 08:24:09 pts/10 0:00 grep db2sasep
db2 list applications
db2ida -provider sas -stop
db2ida -provider sas -stopforce
cd db2instancepath
rm -fr SAS
cd db2instancepath
rm -fr SASEPHome
YourSASDepot/SASFormatsLibraryforDB2/3.1/DB2on<AIX
| Linux64>/
directory.
cd path_to_sh_file
path_to_sh_file
is
the location to which you copied the self-extracting archive file.
chmod 755 -r acceldb2fmt-3.1-n_r64.sh
mv SAS to SAS_OLD /* renames the SAS directory */ rm -fr SAS /* removes the SAS directory */
./sh_file
sh_file
is
either acceldb2fmt-3.1-n_lax.sh
or acceldb2fmt-3.1-n_r64.sh
depending on your platform.
/path_to_sh_file/SAS/SASFormatsLibraryForDB2/3.1-n/bin/InstallAccelDB2Fmt.sh /path_to_sh_file/SAS/SASFormatsLibraryForDB2/3.1-n/bin/CopySASFiles.sh /path_to_sh_file/SAS/SASFormatsLibraryForDB2/3.1-n/lib/SAS_CompileUDF /path_to_sh_file/SAS/SASFormatsLibraryForDB2/3.1-n/lib/SAS_DeleteUDF /path_to_sh_file/SAS/SASFormatsLibraryForDB2/3.1-n/lib/libjazxfbrs.so /path_to_sh_file/SAS/SASFormatsLibraryForDB2/3.1 ->3.1-n
path_to_sh_file/SAS/SASFormatsLibraryForDB2/3.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
db2set DB2LIBPATH=db2instancepath/sqllib/function/SAS
db2instancepath/sqllib
is
the path to the sqllib
directory of
the DB2 instance that you want to use.
db2set
DB2LIBPATH=db2instancepath/sqllib/function/SAS
/sasep
.
The new directory is referred to as EPZipDir throughout
this section.
YourSASDepot/standalone_installs
directory. This directory was created when you created
your SAS Software Depot.
YourSASDepot/standalone_installs/SAS_Core_Embedded_Process_Package_for_DB2on<AIX
| Linux>/12_0/DB2on<AIX | Linux_x64>
directory.
cp en_sasexe.zip /EPZipDir
sasexe
directory is created in the
same location as the en_sasexe.zip file. The self-extracting archive
file is in the /EPZipDir/sasexe
directory.
/EPZipDir/sasexe
directory
on the client machine where the self-extracting archive file exists.
cd path_to_sh_file
chmod 755 -r sepcoredb2*.sh
mv SAS to SAS_OLD /* renames the SAS directory */ rm -fr SAS /* removes the SAS directory */
mv SASEPHome to SAS_OLD /* renames the SASEPHome directory */ rm -fr SASEPHome /* removes the SASEPHome directory */
./sh_file
sh_file
is
either sepcoredb2a-12.00000-1.sh or sepcoredb2l-12.00000-1.sh, depending
on your platform.
/db2instancepath/SASEPHome/bin /db2instancepath/SASEPHome/misc /db2instancepath/SASEPHome/sasexe /db2instancepath/SASEPHome/utilities
dbset DB2_SAS_SETTINGS="ENABLE_SAS_EP:true;
LIBRARY_PATH:db2instancepath/SASEPHome/sasexe"
db2set
DB2_SAS_SETTINGS=ENABLE_SAS_EP:true; LIBRARY_PATH:db2instancepath/SASEPHome/sasexe DB2LIBPATH=db2instancepath/sqllib/function/SAS
db2stop
db2 list applications db2 force applications all db2 terminate db2stop
su root slibclean exit
db2start
ps -ef | grep db2sasep
db2v10 23265382 20840668 0 Oct 06 - 4:03 db2sasep db2v10 27983990 16646196 1 08:24:09 pts/10 0:00 grep db2sasep
cd instance-home/sqllib/db2dump
ls –al sasep0.log
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
db2ida
-stop
command fails and indicates
that the SAS Embedded Process is in use and could not be stopped.
db2ida
-stop
command.
-stopforce
db2ida
-stopforce
command.
db2ida -provider sas -stopforce db2ida -provider sas -start
db2instancepath/sqllib/function/SAS
directory.
You specify the value of db2instancepath
in
the %INDB2_PUBLISH_COMPILEUDF
macro syntax.
%let indconn = server=yourserver user=youruserid password=yourpwd database=yourdb schema=saslib;
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 | 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 and Install the SAS Formats Library and Binary Files for DB2. |
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. |
%let indconn = server=yourserver user=youruserid password=yourpwd database=yourdb schema=saslib;
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 | 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. |