Creating and using a temporary storage area (CPad)

A CPad is a named area of memory that a UDX can allocate and use as a temporary storage area and workpad, and from which you can run programs or engines. A UDX that uses a CPad includes special functions and code for the CPad. A UDX that operates in fenced mode cannot use a CPad.

A UDX calls CPad routines to create a CPad, write data to it, and read data from it. A CPad persists only for the lifetime of the transaction or transaction block that called the function that created it. When the transaction completes, the memory that is used for the CPad is automatically freed.

Note: A UDX that uses a CPad writes data directly to memory. Use caution when you are using CPads. You should be familiar with the Db2® architecture and verify your code and memory allocations, as problems in the code can create out-of-memory situations and other effects that would affect the performance and availability of your Db2 system.