Fujitsu J2X0-1634-01EN Computer Accessories User Manual


 
SQL descriptor area
An SQL statement may be dynamically modified to manipulate data. In other words, the SQL statement may be
entered from outside the application program. In this case, however, the type of SQL statement to be entered cannot
be determined when the application program is created. For example, a variable used to fetch data from a data base
must normally be declared in the application program. However, if the type of SQL statements to be entered is not
known, the variable cannot be declared. This is also the case when data is to be inserted into a data base.
So, the system allocates a temporary work area, the SQL descriptor area, to manipulate data to dynamically modify
SQL statements. After declaring appropriate variables in the application program, use this work area to manipulate
data. The location of the SQL descriptor area is as follows.
Preparable statements
Certain SQL statements can be dynamically created and executed at run-time after preparation. These statements
are:
· Single row SELECT statement
· INSERT statement
· UPDATE statement (searched)
· DELETE statement (searched)
· Multiple row SELECT statement
· UPDATE statement (positioned)
· DELETE statement (positioned)
· Schema definition statement
· Schema manipulation statement
· Storage structure definition statement
· Storage structure manipulation statement
· User control statement
· Access control statement
Of these SQL statements, the following can only be used in this way: single row SELECT statement, multiple row
SELECT statement, UPDATE statement (positioned), and DELETE statement (positioned). The syntax of the single
row SELECT statement is the same as that of the query specification.
132