When you define a new procedure body, you must set up its description, type and other fundamental properties in the procedure overview using the dialog below:

Enter a brief description of the procedure body. Initially the description from the procedure is copied to this field, but you may change it if you wish; the procedure and procedure body descriptions are independent.
Select the required procedure type from the menu. The types are as follows:
| Procedure Body Type | Description |
|---|---|
| Interactive | Data entry procedure |
| Batch | Procedure without data entry or printing. |
| Menu | Procedure offering the user a choice of actions from a simple menu without pull-downs |
| Procedure to send output to a print device | |
| Combined menu/entry | Data entry procedure terminated using a function key to select an action |
| Action bar menu | Procedure offering the user a choice of actions from a menu with pull-downs |
| Save/exit menu | Procedure to confirm or abandon changes before the database is updated - for programs where the private database facility is being used |
| Sub device output | Procedure to select or print to a different sub device, and for multi-output devices |
| Device select/print | Procedure to select an output device interactively, at run-time |
| Run another program | Procedure to call another QA Build program, non-QA Build program, or use a set of built-in commands |
| Link to C | Procedure which selects a procedure body written in C |
| Hot key set up | Procedure to set up hot key actions which can be called when executing subsequent procedures |
The links in the table above will help you fill in the remaining fields in this dialog as appropriate for that procedure type.
Depending on the program type, and the procedures above this one in your procedure tree, some procedure types may be disabled.
This field is only used for procedure bodies of types Device select/print and Sub device output.
For Device select/print procedures you must enter the name of one of the available "Device Initialisation" PODs stored on your system database. Press <Ctrl+P> to choose from a list of the available devices.
If you select the "default_printer" device, at run time QAB ignores this device and requests the print device specified in the C variable pr_device. This will either be the device specified in the Default Output Devices dialog, or if another device select print procedure that does not use "default_printer" has already been executed, it will have been replaced by the device specified in the last such procedure executed.
For Sub device/output procedures you must enter the name of one of the PODs belonging to the same device group as your main print device. Press <Ctrl+P> to choose from a list of the available devices. This procedure type is most commonly used with devices that control an OSDI. For example your program may need to switch between "receipt" and "journal" printers belonging to the same device.
Enter (as an integer) the required bit mask for input devices. Press <Ctrl+P> to choose from the available input devices.
In some menus you may wish to prevent the user from escaping by pressing <Esc> or you may wish to perform some special processing when <Esc> is pressed. You can do this by forcing the <Esc> key to be treated as a regular option number. If you do this, however, ensure that you set a condition to repeat for the procedure, so that the user has a way out.
Each procedure body can use maps from two distinct mapsets:
Either or both mapnames can be blank, in which the name used is inherited from the procedures above. You may use the same mapset for both groups of map if you wish. More information and advice on using mapnames can be found in Mapsets and QAB.
Enter the name of the main mapset to be used by this procedure. If you leave this field blank, the procedure will inherit the mapset name from the procedure above (or the mapset name it inherited) , and so use the same mapset as it. If mapnames are blank all the way to the top of the procedure tree the program name is used as a mapset. A blank mapname is useful when the same procedure body is used in several programs but with minor differences, such as headings, in the maps. The mapset name that will be inherited is displayed at the top of the screen, to the left of the information about programs that are affected by changes to the procedure.
If you enter the name of a mapset, that mapset will be loaded. This is useful if the procedure always uses the same maps; it also simplifies maintenance.
The Remarks mapname is treated similarly to the main mapname - if it is blank, it is inherited from See the notes on Main mapname above. If you leave this field blank, the procedure will use the currently loaded mapset. You may, however, prefer to keep all your messages in a special mapset shared by all programs to ensure, for example, consistency of error messages.
Enable this option if the procedure uses the database. Disable this option only if the procedure does not access or update any tables. The most likely use of such non-database procedures is as pause routines and to display headings. (Non-database procedures, however, may refer to previously defined database fields.)
Enable this option if this procedure updates or deletes any records in the database.
Enable this option if the user is required to confirm that the data is correct before the database is updated.
Enable this option if you wish to ensure that changes made up to this point in the program will be preserved in the event of a crash. Think carefully about your answer because disabling this option may mean that transactions are lost in a crash, while enabling it will slow the program down. Usually you should enable the option at the top level of a multi-level program, but disable it in batch update programs.
Enable this option if you require the procedure to repeat until either the user selects an escape option (in an interactive program) or there are no more records to process (in a batch program). Be careful not to repeat procedures such as heading routines which do not access the database, unless they are interactive or a condition to repeat is set.
Enable this option if the procedure is repeated but you wish to make the repetition conditional. Select the condition from the Formula Editing Menu .
Error subsidiaries
Normally subsidiary procedures are not executed if the user chooses to delete the record being processed, if there is a checkpoint failure or if the record cannot be processed. Enable this option if you wish to execute subsidiaries even under these circumstances. You must, however, ensure that there are suitable entry conditions on each subsidiary.
If the procedure is of the Run another program type, enter the command line for the program you want to run. You can find full information on the command syntax in Running Other Programs and Special Commands.