How actions are implemented in mappings: AID key, Input, Extract, and Insert

This topic describes how mappings are used to describe how Input actions, AID key actions, Insert actions, and Extract actions are to be performed.

Recall that during flow recording the host editor creates for each new action that is created one or more mappings that describe how the operation that is specified in the action is to be performed (see Overview of creating an action).

The mapping or mappings that are generated for each of the four actions are described below. You can see and edit these mappings if you open the primary mapping file for a terminal flow and view the appropriate mapping routine.

"Fields" data structure: A mapping for an Input action, an Extract action, or an Insert action uses a message element that contains subelements corresponding to all the fields in the particular application screen for which the action was created. There is a subelement for every field in the application screen (whether the field is used in the mapping or not) and each subelement has the name (the custom name if any, otherwise the default name) of the field that the subelement corresponds to: Field2, Field 136, Field162, and so on.

a) AID key action:

  • For an AID key action, two mappings are generated. Each of the two mappings uses an Assign transform to store a literal value into one of the fields of an IBMTerminal structure:
    • The first mapping stores an AID key identifier string (such as 'PF8') into the PF_Key field of the IBMTerminal structure.
    • The second mapping stores the 1-based offset of the cursor in the session screen as an integer (such as 542) into the CURSOR field of the IBMTerminal structure.

  • The mapping routine that contains these two mappings is associated with the input terminal of the Invoke screen operations node that corresponds to the application screen where the input occurred during flow recording (see Implementation of Extract actions and Insert actions).

b) Input action:

  • For an Input key action, a mapping is generated for each field of the application screen into which you typed text.
    • The target message is a "fields" data structure (see "Fields" data structure).
    • Each of the mappings uses an Assign transform to store the text that was typed into the field of the application screen during flow recording (such as 'user25' into the appropriate subelement of the "fields" data structure (such as Field162).

  • These mappings are located in the same mapping routine that contains the mappings for the AID key (see AID key action).

c) Extract action:

  • For each Extract action, one or more mappings are generated to copy the value from the specified Extract field or rectangular area of the Extract action into the specified Extract variable.
    • The source element is a "fields" data structure (see "Fields" data structure).
    • The target element is the variable (such as strExtractItemNumber) in the variable message that you specified for the Extract action during flow recording (see The variable message of a flow).
    • For an Extract action that specifies a field, the mapping uses a Move transform to copy the text from the appropriate subelement of the "fields" data structure (such as Field 242) into the extract variable.
    • For an Extract action that specifies a rectangular area, the mapping uses one or more Custom Mapping transforms to copy the text from the appropriate subelement or subelements of the "fields" data structure (such as Field 242) into the extract variable.

  • This mapping is located in the mapping routine associated with the output terminal of the preceding Invoke screen operation node or Assign node (see Implementation of Extract actions and Insert actions).

d) Insert action:

  • For each Insert action, a single mapping is generated to copy the value from the specified insert variable into the specified field of the application screen.
    • The source message element is the variable (such as strInsertUserID) in the variable message that you specified for the Insert action during flow recording (see The variable message of a flow).
    • The target element is a "fields" data structure (see "Fields" data structure).
    • The mapping uses a Move transform to copy the text from the insert variable into the appropriate subelement of the "fields" data structure.

  • This mapping is located in the same mapping routine that contains the mappings for the AID key and Input action (see AID key action).