Culprit programs have the ability to call user defined modules that are written in a non-culprit language. These modules can have different subschemas and access a different database than the calling culprit program or access a database when reading a flatfile. The basic process is to pass arguments to the user module, have that module either perform a calculation, edit, etc. or access data based on the passed arguments and send the results back to the culprit program.
All user modules must be stored in APPLPROD using the basic format of CULLUSnn. They should then be compiled into the appropriate loadlib depending on which dictionary they are accessing. Examples of compile for a specific database are in librarian. Review the Culprit manual for user modul names used by C.A. and review APPLPROD (request CULLUS** on LB) for user module names used internally.
CULLUS70 is an example of a COBOL user module that accesses the IAI database. It is called from a culprit program (PERSONS) that accesses the UNM database (see CALL US70). The JCL to run the culprit is stored in the PERSONS dataset.
Things to pay attention to:
We haven't done any benchmarking of the time involved in linking to a COBOL program within a culprit. If anyone writes a user module that must be called repeatedly for each record, it would be interesting to see how much additional time is involved if any.