VisualAge Generator used web transactions to adapt its Text UI development approach to the web. EGL uses a virtually identical Text UI approach. EGL web transactions somewhat resemble Text UI, except that the VGUIRecord replaces the Form.
EGL treats the VGUIRecord differently depending on whether you are generating code for Java™ or COBOL. When you generate a VGWebTransaction program for COBOL, the program automatically includes the information in the associated VGUIRecord, and displays the record as it would a form in Text UI. In Java generation, the VGUIRecord generates a .jsp file that becomes the user interface for the customer; that .jsp file is used to generate a java bean on the server. Therefore, web transactions produce an actual web interface in Java, but not in COBOL.
When you generate for Java, you can use parameters with web transactions. When you generate for COBOL, using parameters with a web transaction passes validation, but is flagged as an error during generation.
Web transactions require that you set the genVGUIRecords build descriptor option to YES. You may want to modify other, related build descriptor options; for more information, refer to the EGL Generation Guide.
The VGUIRecord is a main part; it resides in a source file that has the same name as the part. The name should be no more than 8 characters in length. When you generate a VGUIRecord for Java, EGL creates a Java Server Page, adding a .jsp extension to the name of the record.
VGUIRecords are structured records, and use properties to manage options, links, called programs, validation information, and more. For more information, see VGUIRecord properties and VGUIRecord field properties.
In a VGWebTransaction program, you declare a variable based on the VGUIRecord definition, then use an EGL converse or show statement to display the page.
Web transaction development in EGL usually involves the following steps: