Using ILF Routines
An application consists of a number of related components, including the data dictionary specifications and various processes, such as menus, inputs, and outputs. You can develop an entire application in APPX using the specification method, traversing through the APPX application design menus and providing responses to predefined questions and choices. You support these specifications with appropriate screen and report image definitions.
Complex applications may require more specific control over the editing or processing criteria. For example, you may want to check the relationship between two different field values for consistency. In an order processing application, you could use ILF (Integrated Language Facility) statements to verify that the cost of a new order cannot exceed a customer’s credit limit. If the order value exceeds the credit limit, you can display an error message and prevent any subsequent processing.
You implement this type of edit checking by including an ILF routine within the context of the input process that checks a user’s entries and displays an appropriate message. This is a simple example where a few lines of ILF code achieve the desired results. In many applications, you may want to perform significantly more complex condition testing and logic operations.
You also use the ILF as the link between APPX and program routines written in other languages, such as COBOL and “C,” and to invoke other programs like word processing or command editors. To execute a non-APPX program, you invoke either a CALL or RUN statement (each of which is described in detail in Chapter 4-6: ILF Keyword Reference).