Calling Sequences
LeasePak Documentation Suite NETSOL website
End User Code Objects

End User Code Objects

Calling Sequences


The SQL code objects are arranged in a specific hierarchy. This hierarchy controls which code objects can call other code objects. Both Sybase and Oracle require that called code objects be already defined in the logical database when they are first referenced by a calling code object. This necessitates a specific sequence for loading the code objects into a new or existing logical database.

Two mechanisms exist for determining this sequence. The first mechanism applies to SQL code objects delivered by NetSol Technologies as standard components. This mechanism applies to SQL code objects designated as NetSol (mt, mpkg, and mp objects) and as custom (cp objects). This first mechanism operates by loading the four covered types of code objects in a specific order (mpkg objects first, then mp, then mt, and finally cp); within each type of code object, the load order is strictly ASCII sort order by filename.

The second mechanism applies to SQL code objects originated by the end user; that is, those designated as user code objects (upkg and up objects). This second mechanism operates by loading the upkg and up objects in the order specified by a file created and maintained by the end user; if the file does not exist at the time of load, then it is created by listing first the upkg and then the up objects, and then by ASCII sort order by filename within each type of code object.

In either case, whether the file is created by the end user or by the system by default as described above, the file is used by the loader to determine the sequence in which the individual files are to be loaded. The user code object files may be listed in any order that suits the needs of the site's customized code; if the end user lists the code objects in an order that does not provide for predefinition of objects, then the code load will fail.

In any case, the load order is first the user code objects, according to the load sequence file, then the NetSol code objects, and finally the custom code objects. This arrangement prevents either user code objects or NetSol code objects from calling custom code objects.

If the end user's implementation of the functionality of a user code object requires that the user code object be able to call a custom code object, then the end user will have to refactor the functionality of the custom code object into one or more user code objects and utilize the load sequence file mechanism to insure that the user code objects will be loaded in the desired order.