To build each functional area of your application when running DB/Assist, follow these general steps. (To build the entire application, repeat this procedure for each functional area.)
1.Start DB/Assist
2.Build the variable file as described in Building the Variable File. (If the file already exists, proceed to the next step.)
3.Create a new SAM or open an existing SAM for the functional area you are developing.
4.Build the SQL statements in the SAM that are required for the functional area.
5.Dynamically run each SQL statement to test the result set.
6.For each SQL statement, use the Auto Create push button in the Link Variables dialog box to link ESL variables to each column.
If you are using the recommended methodology, you should already have generated these variable names in the SAMPLE.VAR variable file. If the database changes, modify the variable declarations as needed in SAMPLE.VAR.
7. Select SQL Access Module Ø Compile or the Compile button to compile the SAM
In the Specify File for Generated Code dialog box, specify the name of the file that contains DB/Assist- generated code for the functional area. For example, for a functional area named A, add the action routines to a file named FUNCTA.ACT.
DB/Assist writes the generated ESL action routines to the specified file.
You can now write ESL action routines that call the DB/Assist generated SQL and error handling routines.
For information about using positioned UPDATE and DELETE statements in your application, see the sample program in Sample Program for Positioned SQL.