User-defined query masks (Option 2.6)

Overview

Layout definitions are used to define query masks (layouts).

Note on layout groups

It is possible to place multiple layouts into a layout group with the help of the Layout Group field.

When you start a search, Adabas Audit Data Retrieval displays the layouts of the layout group for selection when the layout group has more than one layout.

Using query masks

Layout-based query masks can be used for:

  • Global index search

    If you create a processing instruction for a folder for the global index generation, the name of a layout group must be specified in this processing instruction (required field). The corresponding query mask is used for the global index search for this folder or the superordinate folder group.

    The use of layout definitions is required when working with global indexes.

  • List-based index search

    By default, the following applies for the query panel that is displayed with the line command IX or the primary command IA:

    The query panel is built dynamically according to the indexes available for the list(s). The field descriptions and their order are determined by the settings in the index definitions and the index descriptions at the time when the list is read in.

    Alternatively, the administrator can also define a query mask (layout) which then determines the structure of the query panel.

    The use of layout definitions is optional when working with local indexes.

Query mask for list-based index search

You can define query masks for any list, for example, in order to add help texts in the query panel.

You must define query masks for the search in the indexes of a list in the following cases:

  • If you want to prevent that the values entered by a user are stored in his profile and redisplayed in future queries.
  • If input fields should be grouped as an alternate, for example, to make input required for alternative primary indexes during the search with secondary indexes.

Alternative subgroups of input fields

Normally, the following applies to query panels:

  • All input fields containing values are linked with Boolean AND in the query.
  • Values must be entered in all required fields.

With the help of the subgroup number of the layout definition, it is possible to create several subgroups of input fields, for example, in order to define alternative subgroups with required fields. The following applies to query panels that contain subgroups:

  • Values can be entered only in the fields of one subgroup and in the fields that are not assigned to any subgroup (subgroup 0)
  • Required fields in unused subgroups are ignored

All fields with the subgroup number 0 are not assigned to any subgroup and are valid at all times. They are combined in the query with the fields of the used field subgroup (Boolean operator AND).

Query panel with query mask

This example shows a query panel with a query mask that comprises two subgroups of fields:

The query mask is vertically centered in the query panel. The elements of the query mask are displayed as follows:

  • All field descriptions (in the example Customer number, Order Number and Article) are displayed with the attributes for Normal Output. Field descriptions are right-justified relative to the arrow of the input field.
  • All additional texts (in the example or) are displayed with the attributes of Action Explanations. Additional texts are left-justified relative to the border of the panel.

Required definitions for query masks

The name of the query mask is defined in the layout definition. The elements (lines) of the query mask are defined in subordinate layout definitions.

To define a query mask, create a layout definition under option 2.6 first. Afterwards, create a subordinate layout definition (line command L in front of layout definition) for each line of the query mask.

You can use the Layout Group field in the definition to create a group that contains multiple layouts. Simply specify the same layout group in multiple definitions. Specify the same name in the Layout Group and the Layout Name field if you don't want to work with layout groups.

If a query mask is to be used for a list-based index search, the name of the layout group must be stored in the generation record of the list. Enter the name of the layout group in the list definition so that it will be stored in the generation record at read-in time. You can also change this setting in the generation record after the list has been read in (line command E).

For the global index search, the name of the layout group must be stored in the processing instructions of the folder.

If a layout group contains more than one layout, the layouts are displayed in a table for selection when a user starts a search via the line command IX. Entering line command S in front of a layout takes the user to the query panel.

Query mask only if total match

Before the query panel is displayed, the existing index data are checked first whether they match:

  • For the global index search, at least one global index must exist for each field of the query mask (subordinate layout definition). For a folder group search, it is additionally checked whether the same layout group has been specified for all folders.

    This means that the query mask can only contain layout definitions for global indexes and that the query mask can only be displayed after the global indexes have been successfully created by B97GLOBL.

    Corresponding messages appear in case of error.

    PE97GX05 --------------------------------------------------- Request rejected
    Command ===> ________________________________________________ Scroll ===> PAGE
    MEIRI056 - Global index CUSTOMER# was not built for folder REJTRADE.
    Global Index Search

    IX - Global Index Search S - Select

    Sel Description Owner
    IX Search for Customer Number CUST001
    ******************************* BOTTOM OF DATA ********************************













  • For the list-based index search, a local index generation must exist for each field of the query mask.

    If this is not the case, the query panel is generated dynamically (standard procedure). Online messages display why the query mask (layout name) entered in the list generation record was not used.

    PE97IX05 --------------------------------------------------- Layout rejected
    Command ===> ________________________________________________ Scroll ===> PAGE

    Select List Index Entries
    Form: REJ Extension: INVENTORY Report:





    CUSTOMER ===> ............... ONL
    ORDER ===> ............... ONL






    Items with Hits: 0

    MEIRI052 - Index ARTICLE (layout REJINVENTORY) not built for the selected
    list(s).

    A corresponding check is carried out when the primary command IA is entered. In this case, the fields of the query mask must match the indexes that the lists have in common (intersecting set). In addition, different layout groups cannot be specified in the lists (it is okay though if some lists do not specify any name at all).