In this example, the application program retrieves a locator for a LOB value; then it uses the locator to extract the data from the LOB value.
Using this method, the program allocates only enough storage for one piece of LOB data (the size is determined by the program). In addition, the program needs to issue only one fetch call using the cursor.
The CHECKERR macro/function is an error checking utility that is external to the program. The location of this error checking utility depends on the programming language that is used. In this example, C language is used so check_error is redefined as CHECKERR and is located in the util.c file.