| United States-English |
|
|
|
![]() |
ALLBASE/SQL FORTRAN Application Programming Guide: HP 9000 Computer Systems > Chapter 1 Getting Started with ALLBASE/SQL Programming in FORTRANThe Stored Section |
|
A section consists of ALLBASE/SQL instructions for executing an SQL command. The preprocessor creates a section for each SQL command embedded in a program except for the following commands:
The preprocessor assigns a number to each section and references the appropriate stored section in the generated code:
A section serves two purposes:
By creating and storing sections at preprocessing time rather than at runtime, you improve runtime performance. A section is assigned one of two states at preprocessing time: valid or invalid. A section is valid when access validation criteria are satisfied. If the SQL command references objects that exist at preprocessing time and the individual doing the preprocessing is authorized to issue the command, the stored section is marked as valid. A section is invalid when access validation criteria are not satisfied. If the SQL command references an object that does not exist at preprocessing time or if the individual doing the preprocessing is not authorized to issue the command, the stored section is marked as invalid. After being stored by the preprocessor, a valid section is marked as invalid when such activities as the following occur:
At runtime, ALLBASE/SQL executes valid sections and attempts to validate any sections marked as invalid. If an invalid section can be validated, as when an altered table does not affect the results of a query, ALLBASE/SQL marks the section as valid and executes it. If an invalid section cannot be validated, as when a table reference is invalid because the table owner name has changed, ALLBASE/SQL returns an error indication to the application program, which in turn can determine what to do. When a section is validated at runtime, it remains in the valid state until an event that invalidates it occurs. Program execution during which validation occurs is slightly slower than program execution following section validation. |
||||||||||||||||||||||||||||||||||
|
|||||||||||||||