4 15 1 What are RDML Commands

LANSA for i

4.15.1 What are RDML Commands?

As already described in this chapter, every function within LANSA has associated with it a set of commands.

The commands instruct the IBM i to what actions the user wishes to take when executing the function.

The commands are referred to as Rapid Development & Maintenance Language or "RDML" commands.

When a function is compiled into an executable program the commands are converted in RPG instructions which are then compiled into a program that can be executed on the IBM i.

Every command has 3 major components:

  • A label or tag. This is a name associated with a particular command that allows control to be passed to it. For instance the command GOTO LABEL(L10) transfers control to the command that has label L10.
  • The name of the command itself. This specifies exactly which command is to be executed.
  • Additional parameters. These are specific to each type of command. For instance the GOTO command has parameter LABEL, which specifies the label to which control is to be passed. When a parameter on a command is not specified, it usually adopts a default value.

Whenever RDML commands are displayed they usually have the format described above. For instance a simple "function" (or "program") of RDML commands might look like this:

Label

Command

Additional Parameters

L10

REQUEST

FIELDS(#ORDERNO #PRODUCT #QUANTITY)

 

INSERT

FIELDS(#ORDERNO #PRODUCT #QUANTITY) TO_FILE(ORDERS)

 

GOTO

LABEL(L10)

 

 

What this RDML program does is:

  • Request that the user input (at the workstation) an order number, a product number and a quantity.
  • Adds a record to file ORDERS using the values just input be the user.
  • Transfer control back to the first command in this program.

The first question that springs to mind when looking at this RDML program is "How does it ever end?".

To answer that you must always remember that parameters that are not specified adopt their default values.

The REQUEST command has parameters EXIT_KEY and MENU_KEY which have default values EXIT_KEY(*YES *EXIT) and MENU_KEY(*YES *MENU).

This tells LANSA that the EXIT and MENU (or Cancel) function keys are to be enabled at the workstation. If the EXIT function key is used: exit from LANSA, if the MENU (or Cancel) function key is used: transfer back to the process's main menu.

This has been a very brief description of what RDML commands are and what RDML programs look like, the rest of this section describes topics like:

  • How an RDML program such as this could be manually input.
  • How the RDML program could be fully checked for errors before it is submitted for compilation.
  • How the screen design facility could be used to modify any screen layouts used in the RDML program.
  • How the report design facility could be used to modify any report layouts used in the RDML program.

For a complete list of RDML commands refer to the Technical Reference Guide.

In the Technical Reference Guide you will find details of each RDML command and RDML programming techniques and examples.