Problem Note 44456: SAS® Real-Time Decision Manager DS2 Activities that use external function calls might receive the error "Borrow callableStatement from pool failed"
SAS Real-Time Decision Manager enables you to create Activities that use the SAS DS2 programming language. If your DS2 Activity uses in_out variables of type CHAR or VARCHAR, then you might receive the following error in your Design Server log when you execute the Activity:
com.sas.analytics.ph.RTDMException: org.apache.commons.dbcp.SQLNestedException:
Borrow callableStatement from pool failed
at
com.sas.rtdm.implementation.activity.sasactivity.DS2Activity.execute(DS2Activity.java:106)
...
The error occurs when you use in_out variables of type CHAR or VARCHAR in calls to external functions. The external functions in DS2 are:
- collate
- compbl
- dequote
- indexc
- indexw
- intck
- intnx
- lengthc
- lengthm
- quote
- reverse
- right
- scan
- translate
- tranwrd
- verify
- whichc
Activities that are migrated from SAS Real-Time Decision Manager 5.4 to SAS Real-Time Decision Manager 5.4.1 do not encounter this problem. They do not make use of in_out variables. All migrated Activities use local variables when they use the functions listed above.
To work around this problem in your DS2 Activity, create a local variable for each problematic in_out variable. Assign the value of your in_out variable to the local variable immediately before the call to the external function. Then use the local variable to replace the in_out variable within the external function call. Assign the value of the local variable to the in_out variable immediately after the external function call if you want to use the value stored in the local variable. Continue to use the in_out variable in the portion of the Activity code that does not contain an external function.
Here is an example in which the in_out variable sc_msg is used with the local variable msg:
msg=sc_msg;
reverse(msg);
sc_msg=msg;
Operating System and Release Information
SAS System | SAS Real-Time Decision Manager | Microsoft® Windows® for x64 | 5.4_M1 | 6.1 | | 9.2 TS2M0 |
64-bit Enabled AIX | 5.4_M1 | 6.1 | | 9.2 TS2M0 |
64-bit Enabled Solaris | 5.4_M1 | 6.1 | | 9.2 TS2M0 |
Linux for x64 | 5.4_M1 | 6.1 | | 9.2 TS2M0 |
Solaris for x64 | 5.4_M1 | 6.1 | | 9.2 TS2M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
SAS DATA Step 2 (DS2) Activities cannot use in_out CHAR or VARCHAR variables in external function calls.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2011-10-13 13:05:10 |
Date Created: | 2011-09-28 16:12:20 |