4.15.10 Function Checker
After you have edited an RDML program (using either the LANSA or the IBM SEU editor) you may choose to use the online function checker.
You have the option to use the function checker whenever a message like this appears at the top of the current screen:
Invoke the function checker________ YES,LIST,DESIGN,NO
The function checker performs the following tasks:
- It checks the syntax of the RDML commands.
- It checks the validity of the RDML commands.
- It creates default screen/report designs and extracts information that is required by the screen/report design facilities.
In addition, the function checker can produce a report that details all the screen designs being used by the function and fully indented listing (with imbedded error messages) of the RDML program.
To invoke the function checker enter YES, LIST or DESIGN in response to the prompt that appears at the top of the screen. To avoid using the function checker enter NO.
When the function checker has completed execution the RDML program will be re-displayed. Some points to note about this are:
- If the screen is "input capable" then the function checker has found some fatal error(s) in the RDML programs. Each command that is in error will be displayed in reverse image and the associated error message(s) will be displayed at the bottom of the screen. Correct the errors and run the function checker again.
- If the screen is not "input capable" then no fatal errors were found by the function checker. However, some warning messages may have been issued. Review any warning messages issued and take any appropriate action. In addition there will be a prompt at the top of the screen that allows the screen design facility to be used. This is described in detail in the following section.
- If the LIST option was used then 2 separate reports will have been produced. The first details every screen format that is designed as a result of REQUEST or DISPLAY commands (or as far as possible considering the errors in the RDML program). The second lists the RDML program in full with all associated error messages. The RDML program listing is very useful because the error messages appear directly after the command which caused them and include the second level message text. The same messages will be displayed at the workstation, but they appear in a group at the bottom of the screen and if there are a lot of messages it is sometimes difficult to determine which command(s) they relate to.
- If the DESIGN option was used, only commands that affect the design of screen and/or report layouts will have been checked. This means that some commands that contain errors may not be shown as containing errors. This is not a problem however, because when the job to compile this function is eventually submitted, a full check of the function will be performed. This will pick out the errors and print details of them in the resulting function listing.
It is easy to code an RDML program that will not "compile". Such errors usually result from spelling or syntax problems. The function checker will locate any error that will prevent an RDML program from "compiling" and highlight it with the appropriate error message(s). In such situations you should correct the error and run the function checker again.
Note the use of the word "compile" in this context. If the RDML program contains errors that prevent it from "compiling" then it must be corrected by you. This is because the error exists at the RDML level.
However, if no errors are found in the RDML program by LANSA, but the resultant RPG program generated by LANSA will not compile, it indicates a problem in LANSA itself. In such situations report the problem to your LANSA product vendor.
The function checker will never operate quickly. A typical RDML program takes 10 - 30 seconds to check. Many factors influence the speed of the function checker, however the most significant is the number of DISPLAY and REQUEST commands in the RDML program. Since each DISPLAY or REQUEST command used causes the function checker to validate and design a screen format it is easy to see how they slow it down.