These sample programs use a text user interface to maintain the Employee table in the DB2 Sample database. The project contains two sample applications. Each includes a client that connects to server programs that in turn access the Employee table.
Detail application: DetailClient/DetailServer interacts with a single EMPLOYEE row. It allows the user to use Select, Insert, Update or Delete functions against individual rows in the table. EGL syntax features used include the case statement, try/onException blocks, and passing an SQL record to a called program.
List application: ListingClient/ListingServer loads an entire result set from the Employee table into an array. EGL features include dynamic record arrays, passing a dynamic record array to a called program, and using a single get statement to fill the dynamic array.
Aliases:
Because these applications are meant to be generated for both Java and COBOL platforms,
many of the EGL parts have aliases. These aliases will have an affect on generated
file
and class names and need to be known for deployment and execution.
Part | Alias |
---|---|
DetailClient | DCLIENT |
DetailForms | DFORMS |
DetailHelps | DHELPS |
DetailServer | DSERVER |
ListingClient | LCLIENT |
ListingForms | LFORMS |
ListingHelps | LHELPS |
ListingServer | LSERVER |
Running the application:
DetailClient.egl
or ListingClient.egl
and select Debug EGL program
EmployeeLinkage.eglbld
file into your build descriptor
EmployeeLinkage.eglbld
file into your build descriptor
EGL parts included in the application:
Shared definitions:
Emtenu.egl
- Emtenu table definition (Error Message Table)
Errorhandler.egl
- ErrorHandler function and ErrorRecord Record definitions
Sexchk.egl
- Validator dataTable definition used by TextForm DetailForm for input
validation
SQLParts.egl
- SQL Record and item definitions
Server programs:
DetailServer.egl
- Server program called by DetailClient to provide single detailed
access to EMPLOYEE table
ListingServer.egl
- Server program called by ListingClient to fill an array from a result set
Client programs:
DetailClient.egl
- TUI client for interacting with a single row from the EMPLOYEE
table
DetailForms.egl
- Employee Details Form Group definition
DetailHelps.egl
- Employee Details Help Form Group definition
ListingClient.egl
- TUI client for retrieving a result set from the EMPLOYEE table
ListingForms.egl
- Employee List Form Group definition
ListingHelps.egl
- Employee List Help Form Group definition