Fields and Flags for Edit Routines

Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.

You can pass a screen field or error flag as an argument to an error routine by prefixing the name of the field or flag with the screen name and a hyphen.

You can interrogate the following AMB-generated flags and data fields to determine input data errors.

APS-EDITS-PASSED Flag that AMB sets to T(rue) if there are no input errors and F(alse) if there are
APS-EDIT-ERRORS-CTR Data field containing the number of screen fields in error
screenname-fieldname-FLAG Flag that AMB sets to T(rue) if an error occurs and F(alse) if not

You can use the following AMB-generated fields to code your application edit routines. The column Before / After indicates whether the routine executes before or after the name and format. The field edits determine which field to reference.

Input/ Output Before/After Field Name Description
Input After Screenname-fieldname. Internal picture was updated by any previous field edits.
Input Before Screenname-fieldname-INPT. Data field containing any invalid data entered by the end user. Edits have not been performed; data is in screen input format. Field length is field length painted on the screen; definition is PIC X.
Output After Screenname-fieldname-EDIT. Data was moved to -EDIT by previous output edits. Data may contain special symbols. Default length is field length painted on the screen; definition is PIC X.
Output Before Screenname-fieldname. Data was not processed by previous output edits and is still in the internal format. Data in this field moves to the -EDIT field when an output format is specified. Default length is field length painted on the screen; definition is PIC X.
Either Either (APS-ROW-SUB) This data field contains the row number being processed for fields in a repeated block, or in a list box or combination box.
Either Either APS-EDIT-MESSAGE Data field that lets you display an error message in addition to any you defined in the field edits for the field. Move a literal or data name containing the text into this field.
Either Either Screenname-fieldname-LEN For CICS only. Contains the length of the field; definition is PIC X.
Either Either Screenname-fieldname-ATTR For CICS only. Contains the attribute values assigned to the field; definition is PIC X.

AppMaster Builder processes input data from the screenname-fieldname-INPT field. After the data passes the input edits, the data moves to screenname-fieldname and takes on the characteristics of the internal picture. For output, the data moves to the screenname-fieldname-EDIT field and takes on the characteristics of the output format specifications.

Application edit routines execute for a field whether the data passes or fails field edits, unless you set various switches in the APFEIN control file. To indicate an error in an application edit routine, move T to screenname-fieldname-FLAG. This tells AMB to execute error processing; you can display an additional error message from the APS-EDIT-MESSAGE field.

Note: Do not code database calls in application edit routines.