Please enable JavaScript to view this site.

ESL Documentation

Navigation: ESL Documentation > ESL DB/Assist > FAQs

Q12 What happens when the Compile option is used?

Scroll Prev Top Next More

When you click on the compile icon, select "Compile" from the "SQL Access Module" pull down menu, or press the F5 function key. To compile a SAM in DB/Assist the following actions are executed in this order:

1.the changes made to the database in the current DB/Assist session are committed

2.the variables linked to each SQL statement are registered with DB/2

3.the syntax for each SQL statement in the SAM is validated

4.a variable of the appropriate type is linked to each SQL statement

5.a set of equivalent ESL action routines within a .ACT file are generated for each valid SQL statement in the SAM

6.a bind file is created for the SAM and if checked in the Bind Options dialog box, a database access plan is also created

Once you have successfully compiled all the SQL Statements within the SAM file, you must then re-compile all ESL applications that include the action routines that have been generated. Otherwise, a timestamp error will occur as the package details held within DB/2 will differ from the details compiled into each ESL application.