Extract data from screen as a table (set of structured data containing rows and columns).

The Table extraction rule structures screen areas including text into a table XML structure. The generated structure can be used:

• to represent arrays as graphic tables for webization projects, or
• as a structured table for data integration projects.

Prior to running a Table extraction rule, blocks must be properly merged or split so that blocks can be dispatched in the defined cells.
The Table extraction rule works following two modes:

Automatic mode (set by default if no column description is provided): the rule automatically determines the columns of the array and dispatches data in columns depending on their position to the first line of the array.
Explicit mode: the rule is based on the column description made by the Convertigo application programmer to distribute data as required in each column. Each block of the first line represents a column defined as follows: • starting position = block starting column

•ending position = (starting position of next block) - 1.

If complex arrays are involved, it is recommended to explicitly describe array columns by editing the Columns parameter. This is the second mode.
The Table extraction rule is similar to the Subfile extraction rule but must be configured manually. It supports actions lines, and scrolling. With 5250 environments, it is preferable to use the Subfile rule if the application complies with CUA (IBM guide line for designing applications) because the Subfile rule is automatic and does not require a per-screen configuration.
For all other environments (3270, DKU, VT, etc.), use preferably the Table extraction rule. This rule allows to output structured arrayed data whatever the input data, provided that you configure it for a specific screen class.

Property Type Category Description
Actions end pattern String configuration Pattern that ends the block including actions.
Used when actions are extracted from screen.
Some actions lines start and end with patterns: for example (A=Action B=Bound C=Create). In this case, the end pattern is the ")" character.
Actions label separators String configuration Defines the list of separator characters used to separate each action from its action label in the actions line.
Used when actions are extracted from screen.
In our example, this separator is the = character.
Actions separators String configuration Defines the list of separator characters used in the actions line to separate two actions (usually blank space).
Used when actions are extracted from screen.
Actions start pattern String configuration Pattern that starts the block including actions.
Used when actions are extracted from screen.
Some actions lines start and end with patterns: for example (A=Action B=Bound C=Create). In this case, the start pattern is the "(" character.
Actions table XMLVector configuration Defines actions associated with the selection column.
Each action is described using the following items:

Value: value to be typed in by a user in the selection field (in the selection column) to perform a specific action. In our example, would be A.
Key: key used to validate the action. Usually, KEY_ENTER for 3270 and 5250 or KEY_XMIT for BULL DKU.
Label: label to be displayed to the user when clicking on the contextual menu. In our example, Action.

Notes:

• A new action can be added to the list using the blue keyboard icon. The actions defined in the list can be ordered using the arrow up and arrow down buttons, or deleted using the red cross icon.
• This property is used when no actions line is displayed on screen (mostly 3270 application). In other cases, actions can be automatically extracted from the screen by using the Relative index of the actions line parameter.
Auto validate boolean configuration Auto validates action triggered after an option has been chosen in the selection column.
Set this to true if you want the action to be executed immediately after a user has clicked on an option of the contextual action menu. Usually set to false to enable users to click options on several lines before validating by ENTER.
Columns XMLVector configuration Defines the list of columns of the table, with their header, position and width.
This parameter explicitly describes the columns of the array.
For each column, you have to describe the following elements:

Label: text of the title displayed (Webization) and XML tag name of the data (Data integration). The Label property supports the "\" character specifying a line break within the column title.
Initial column: starting position of the column (0 based).
Final column: ending position of the column (0 based).
Line index: for “folded” tables where a logical line of data is represented physically as several lines. Gives the index of the physical line starting from 0.

Notes:

• A new column can be added to the list using the blue keyboard icon. The columns defined in the list can be ordered using the arrow up and arrow down buttons, or deleted using the red cross icon.
• If no column is defined, the rule tries to automatically define the columns (see Automatic mode property description).
Comment String configuration Describes the object comment to include in the documentation report.
This property generally contains an explanation about the object.
Do not accumulate boolean configuration Enables to limit to one page table data accumulation in a same tag (i.e. create one tag per page).
Normally, when accumulating data as a table on several pages (Return property set to accumulate in a transaction’s exit handler), data come in as new lines of the same table. In some specific cases, you will want to disable this feature, by setting this property to true.
Height resize int configuration Defines a number of lines by which increase (positive value) or decrease (negative value) the table height.
The webized height of a table is automatically computed from its number of lines. To enable the scroll feature, set this property to a number of lines smaller than the number of physical lines in the table by setting a negative value into this property.
Index of the selection column int configuration Defines the selection (or action) column using its index in the column table.
Equals to 0 in most of the cases. Set to -1 if there is no selection column.
Selection column definition is important as contextual menus will only appear if it is correctly defined.
Is active boolean configuration Defines whether the extraction rule is active.
Is final boolean configuration Defines if the extraction is final, i.e. whether pending extraction rules should try to match on the current extraction rule matching blocks.

If set to true, once the rule applies on a matching block, Convertigo doesn’t apply the following rules on this block. This can be used to prevent a block from being modified by other rules.
Keep empty lines boolean configuration Defines whether to keep empty lines from the table.
Empty table lines are removed by default (property set to false. Set this property to true to keep them.
Mashup event String configuration Defines mashup events dispatched on click.
Mashup events can be of two types:

• Calling directly a transaction or a sequence in Convertigo,
• Launching an event in Mashup Composer.

Mashup event property allows to define a combination of one direct call to a Convertigo transaction or sequence and/or one launch of Mashup Composer event. Filling this property adds a mashup_event attribute to the block, containing the previous combination in a JSON syntax of one of the following formats:

{"requestable":{"__transaction":"<transaction name>","__connector":"<connector name>"}} for a transaction call only,
{"requestable":{"__sequence":"<sequence name>"}} for a sequence call only,
{"event":"<event name>"} for a mashup event only,
{"requestable":{"__transaction":"<transaction name>","__connector":"<connector name>"},"event":"<event name>"} for a transaction call and a mashup event,
{"requestable":{"__sequence":"<sequence name>"},"event":"<event name>"} for a sequence call and a mashup event.

This mashup_event attribute and its content have to be handled by the XSL file applying at the end of the transaction to generate a real Convertigo call and/or Mashup Composer event on click on the displayed object.
Offset int configuration Defines the table offset (in lines) used to shift the table position.
After extraction, the table is displayed on the webized screen exactly where the data zone has been defined. In most cases, a title line appears above the table in addition to the table title line. You can then use the offset parameter to shift the table up and cover the redundant title line.
Usually set to the number of lines of the title zone (2 in our example, to shift up the table by two lines). Please note that the Offset property supports negative values (moves the webized table down).
Relative index of the actions line int configuration Defines where actions are in relation to the table.
Set this parameter to relative line of the actions line from the top of the data zone. In our example, the index is -4. This enables the Table extraction rule automatically extract the actions table from the screen. Set this to 0 if no actions line is to be extracted.
Remove actions line boolean configuration Defines whether to remove actions line or not from webized screen (leaving the actions as a popup when clicking a row in the table).
If set to true, the actions line is removed from the webized screen and shown in selection fields contextual menu only.
Remove titles boolean configuration Defines whether the title row of the table must be removed.
When extracted, the XML table contains titles in the first row, which is useful for webization projects. But for data integration projects (web services), titles are usually unwanted. In this case, set the property to true.
XML tag name String configuration Defines the XML tag name for the generated block (of type “table”).
The default XML Tag name (table) can be overridden using this property. Can be useful for data integration projects, for example to extract two tables from the same screen (by setting a different tag name for each table).
Attributes int selection Defines the presentation attributes on which the rule applies, i.e. the rule applies on blocks matching these presentation attributes.
This property allows to configure the rule so that it applies only to parts of screens having specific attributes, for example green text on black background.
Presentation attributes to configure are :

Color: Foreground color, Background color, to choose in a list of predefined colors or “not to take into account”.
Decoration: bold, reverse, underlined, blink, for each decoration choose between “with the decoration”, “normal” (i.e. without the decoration), or “not to take into account”.
Screen zone XMLRectangle selection Defines the screen zone on which the rule applies, i.e. the rule applies on blocks completely contained in this screen area.
This property allows to configure the rule so that it applies only to areas of screens. All blocks found within the specified perimeter are matching this screen zone and can be processed by the rule.
The screen area is defined through four coordinates:

• x (area left corner),
• y (area upper corner),
• w (area width),
• h (area height).

All values are given in characters, with the upper left corner being (x=0, y=0).
-1 represents an undefined value: (x=-1, y=-1, w=-1, h=-1) is an undefined area representing the whole screen, i.e. all blocks, whatever their coordinates, are matching this screen zone and can be processed by the rule.
Type String selection Defines, using a regular expression, to which block types the rule applies.
For example, if set to:

static, the rule applies to blocks of static type only.
static | field, the rule applies to blocks of static or field type only.
[^field], the rule applies to all but field type blocks.

Notes:

• For more information about regular expression patterns, see the following page: http://www.regular-expressions.info/reference.html.
• To test regular expressions, you can use the regular expression tester at the following URL: http://www.regular-expressions.info/javascriptexample.html.