Managing Adabas Metadata

Topics:

x

When the serverFOCUS accesses a data source, it needs information on how to interpret the data stored there. For each data source the serverFOCUS will access, you create a synonymMaster and Access File pair that describes the structure of the data source and the serverFOCUS mapping of the Adabas data types.

For the Adapter for Adabas to access Adabas files, you must describe each file you use in a Master and Access File. The logical description of an Adabas file is stored in a Master File, which describes the field layout.

Creating Synonyms

How to:

Reference:

x

Synonyms define unique names (or aliases) for each Adabas table or view that is accessible from the server. Synonyms are useful because they hide the underlying data source location and identity from client applications. They also provide support for extended metadata features of the server, such as virtual fields and additional security mechanisms.

Using synonyms allows an object to be moved or renamed while allowing client applications to continue functioning without modification. The only modification required is a redefinition of the synonym on the server. The result of creating a synonym is a Master File and Access File, which represent the server metadata.

The Create Synonym facility automatically generates Master and Access Files for Adabas files based on information stored in the Field Definition Table (FDT) in Adabas and the Predict dictionary (optionally). The command requires Adabas Release 5.0 or higher and Predict Release 3.1.4 or higher.

The syntax is identical on UNIX, Windows, z/OS, and OpenVMS platforms.

Procedure: How to Create a Synonym

  1. From the Web Console sidebar, click Applications or Connect to Data.

    The Applications page opens.

  2. If you started from the Applications page, right-click an application folder, point to New, and click Synonym on the context menu.

    The Connect to Data page opens.

  3. On the Configured list, click the down arrow next to a connection for the configured adapter, or right-click a connection.

    Depending on the type of adapter you chose, one of the following options appears on the context menu.

    • Show DBMS objects. This opens the page for selecting synonym objects and properties.
    • Create metadata objects. This opens the page for selecting synonym objects and properties.
    • Show files. This opens a file picker. After you choose a file of the correct type, the page for selecting synonym objects and properties opens.
    • Show local files. This opens a file picker. After you choose a file of the correct type, the page for selecting synonym objects and properties opens.
  4. Enter values for the parameters required by the adapter as described in the chapter for your adapter.
  5. After entering the parameter values, click the highlighted button on the ribbon.

    The button may be labeled Next, Create Synonym, Create Base Synonyms, Create Cluster Synonym, or Update Base Synonyms.

    The synonym creation process for most adapters has been consolidated so that you can enter all necessary parameters on one page. However, for some adapters such as LDAP, you must click Next buttons until you get to a page that has a Create Synonym button.

The synonym is created and added under the specified application directory.

Note: When creating a synonym, if you choose the Validate check box (where available), the server adjusts special characters and checks for reserved words. For more information, see Validation for Special Characters and Reserved Words.

Reference: Synonym Creation Parameters for Adabas

The following list describes the parameters for which you will need to supply values, and related tasks you will need to complete in order to create a synonym for the adapter. These options may appear on multiple panes. To advance from pane to pane, click the buttons provided, ending with the Create Synonym button, which generates the synonym based on your entries.

Current DBID

Enter identification number of the database to access. (Required for all platforms.)

Associator data set name

Enter name of the Adabas Associator data set. (Required only for z/OS.)

Use Predict Metadata

Put a check mark in this checkbox to use metadata from an existing Predict file dictionary. This refreshes the pane, adding two entry boxes in which you can set the Default Predict Setting by entering the following:

File Number

Adabas file number where the Predict file is located.

DBID

Database ID (DBNO) for the Adabas DBMS containing the Predict dictionary data.

Then press Select Tables to summon the second Create Synonym pane (Step 2 of 2).

Provide values for the following superdescriptor processing parameters:

Mode

There are two options:

Extended (NEW)

Describes superdescriptors as groups in the Master File. Neither the groups nor their components (fields) have field names specified in the Master File. Aliases are populated using the Adabas FDT (2-byte name).

The Adapter for Adabas uses new logic to process the selection criteria of requests involving that synonym. Screening conditions within the request are analyzed and the superdescriptor that covers the highest order component fields required by the selection criteria are used. For more information, see NEW Synonym Setting for Superdescriptors.

Note that you must specify CALLTYPE=RL in the Access File in order to take advantage of superdescriptor-based access.

Standard

Incorporates the usual CREATE SYNONYM behavior, which does not trigger the new logic for requests using superdescriptors. Standard is the default value.

ISN field

No - Indicates that Adabas Internal Sequence Numbers (ISN) are not to be included in the Master File.

GFBID field

Global Format Buffer ID (GFBID) support is applicable only if a GFBID field is present in the Master File. This field has a user-defined field name, and an ALIAS of GFBID. This field is used to determine the Global Format Buffer ID that will be defined in read requests with identical field lists for the same database.

Yes

Specifies that a field generated in the Master File is to be used to specify Adabas Global Format Buffer ID values.

No

Indicates that Global Format Buffer ID values are not to be included in the Master File.

Enter the following additional parameters for synonym field name processing options:

Validate

Select the Validate check box if you wish to convert all special characters to underscores and perform a name check to prevent the use of reserved names. (This is accomplished by adding numbers to the names.) This parameter ensures that names adhere to specifications. See Validation for Special Characters and Reserved Words for more information.

When the Validate option is unchecked, only the following characters are converted to underscores: '-'; ' '; ' \'; '/'; ','; '$'. No checking is performed for names.

Make unique

Select the Make unique check box if you wish to set the scope for field and group names to the entire synonym. This ensures that no duplicate names are used, even in different segments of the synonym. When this option is unchecked, the scope is the segment.

Application

Select an application directory. The default value is baseapp.

Prefix/Suffix

If you have tables with identical table names, assign a prefix or a suffix to distinguish them. For example, if you have identically named human resources and payroll tables, assign the prefix HR to distinguish the synonyms for the human resources tables. Note that the resulting synonym name cannot exceed 64 characters.

If all tables and views have unique names, leave the prefix and suffix fields blank.

Overwrite Existing Synonyms

To specify that this synonym should overwrite any earlier synonym with the same fully qualified name, select the Overwrite existing synonyms check box.

Note: The connected user must have operating system write privileges in order to recreate a synonym.

Reference: Managing Synonyms

Once you have created a synonym, you can right-click the synonym name in the Adapter navigation pane of either the Web Console or the Data Management Console to access the available options.

For a list of options, see Synonym Management Options.

Reference: Adabas-specific Create Synonym Notes

  • Only one Adabas file description can be generated in the Master File. If multiple Adabas files must be described in one Master File, a description for each Adabas file must be created and combined in one Master File manually.
  • The Create Synonym facility describes Adabas files within the constraints of the Adapter for Adabas. For more information, see Platform-Specific Functionality. Superdescriptors, subdescriptors, periodic elements (PE groups), and multi-value fields (MU) are included. Comments are used to describe unsupported fields in the generated Master File.
  • The Create Synonym facility allows you to customize the output using data from the Predict dictionary. You can:
    • Replace generic field names constructed based on Adabas field names (xx_FIELD) with the names obtained from the Predict dictionary.
    • Replace the USAGE format and length generated from an Adabas FDT (Field Definition Table) with the format and length from the Predict dictionary.
    • Include the NATURAL column heading stored in the Predict dictionary in the Master File for use as the default column heading in server reports.

Example: Creating Synonyms When Adabas Fields Are Defined With the NC Option

The Create Synonym facility adds the parameter NC=YES in the Access File for fields defined with the NC option.

If a field with the NC option does not have the NN option, then the parameter MISSING=ON is also added to the field definition in the Master File. Subdescriptors and superdescriptors derived from this field will be defined as the fields with the following options: TYPE=NOP, NC=YES, and MISSING=ON. No component fields will be associated with these subdescriptors and superdescriptors.

Sample Master File and Access File contents with the NC option:

Master File:

FILENAME=ADANC1, SUFFIX=ADBSINX , $
  SEGMENT=S01, SEGTYPE=S0, $
    FIELDNAME=AA_FIELD, ALIAS=AA, USAGE=I6, ACTUAL=I2, FIELDTYPE=I, $
    FIELDNAME=AB_FIELD, ALIAS=AB, USAGE=I6, ACTUAL=I2, FIELDTYPE=I, MISSING=ON, $
    FIELDNAME=AC_FIELD, ALIAS=AC, USAGE=I6, ACTUAL=I2, FIELDTYPE=I, $
    FIELDNAME=AD_FIELD, ALIAS=AD, USAGE=I6, ACTUAL=I2, MISSING=ON, $
    FIELDNAME=AE_FIELD, ALIAS=AE, USAGE=I6, ACTUAL=I2, $
    FIELDNAME=BA_FIELD, ALIAS=BA, USAGE=A2, ACTUAL=A2, FIELDTYPE=I, $
    FIELDNAME=BB_FIELD, ALIAS=BB, USAGE=A2, ACTUAL=A2, FIELDTYPE=I, MISSING=ON, $
    FIELDNAME=BC_FIELD, ALIAS=BC, USAGE=A2, ACTUAL=A2, FIELDTYPE=I, $
    FIELDNAME=BD_FIELD, ALIAS=BD, USAGE=A2, ACTUAL=A2, MISSING=ON, $
    FIELDNAME=BE_FIELD, ALIAS=BE, USAGE=A2, ACTUAL=A2, $
   GROUP=G1_GROUP, ALIAS=G1, USAGE=A6, ACTUAL=A6, $
    FIELDNAME=CA_FIELD, ALIAS=CA, USAGE=A2, ACTUAL=A2, $
    FIELDNAME=CB_FIELD, ALIAS=CB, USAGE=A2, ACTUAL=A2, MISSING=ON, $
    FIELDNAME=CC_FIELD, ALIAS=CC, USAGE=A2, ACTUAL=A2, $
$ $$$$$$$$$$$$$$$$$$$$$$ Superdescriptor $$$$$$$$$$$$$$$$$$$$$$$$$$ $
    FIELDNAME=S1_FIELD, ALIAS=S1, USAGE=A6, ACTUAL=A6, FIELDTYPE=I, MISSING=ON, $
  $ FIELD=BA_FIELD_S01       ,ALIAS=BA         ,A2    ,A2    ,INDEX=I,$
  $ FIELD=BB_FIELD_S01       ,ALIAS=BB         ,A2    ,A2    ,INDEX=I,$
  $ FIELD=BE_FIELD_S01       ,ALIAS=BE         ,A2    ,A2    ,       ,$
$ $$$$$$$$$$$$$$$$$$$$$$ Superdescriptor $$$$$$$$$$$$$$$$$$$$$$$$$$ $
     FIELDNAME=S2_FIELD, ALIAS=S2, USAGE=A6, ACTUAL=A6, FIELDTYPE=I, MISSING=ON, $
$ FIELD=BA_FIELD_S02       ,ALIAS=BA         ,A2    ,A2    ,INDEX=I,$
$ FIELD=BC_FIELD_S02       ,ALIAS=BC         ,A2    ,A2    ,INDEX=I,$
$ FIELD=BD_FIELD_S02       ,ALIAS=BD         ,A2    ,A2    ,       ,$
$ $$$$$$$$$$$$$$$$$$$$$$$ Subdescriptor $$$$$$$$$$$$$$$$$$$$$$$$$$$ $
     FIELDNAME=S3_FIELD, ALIAS=S3, USAGE=A1, ACTUAL=A1, FIELDTYPE=I, MISSING=ON, $
$ $$$$$$$$$$$$$$$$$$$$$$$ Subdescriptor $$$$$$$$$$$$$$$$$$$$$$$$$$$ $
    FIELDNAME=S4_FIELD, ALIAS=S4, USAGE=A1, ACTUAL=A1, FIELDTYPE=I, $
$

Access File:

 RELEASE=6, OPEN=YES, $
 SEGNAM=S01, ACCESS=ADBS, FILENO=120, DBNO=3, CALLTYPE=FIND,
   UNQKEYNAME=AA_FIELD, WRITE=YES, $
$   CALLTYPE=RL  ,SEQFIELD=AA_FIELD                        ,$
$ FIELD=AA_FIELD ,TYPE=DSC       ,NC=   ,$
  FIELD=AB_FIELD, TYPE=DSC, NC=YES, $
  FIELD=AC_FIELD, TYPE=DSC, NC=YES, $
  FIELD=AD_FIELD, TYPE=, NC=YES, $
  FIELD=AE_FIELD, TYPE=, NC=YES, $
$ FIELD=BA_FIELD ,TYPE=DSC       ,NC=   ,$
  FIELD=BB_FIELD, TYPE=DSC, NC=YES, $
  FIELD=BC_FIELD, TYPE=DSC, NC=YES, $
  FIELD=BD_FIELD, TYPE=, NC=YES, $
  FIELD=BE_FIELD, TYPE=, NC=YES, $
  FIELD=CB_FIELD, TYPE=, NC=YES, $
  FIELD=CC_FIELD, TYPE=, NC=YES, $
  FIELD=S1_FIELD, TYPE=NOP, NC=YES, $
  FIELD=S2_FIELD, TYPE=NOP, NC=YES, $
  FIELD=S3_FIELD, TYPE=NOP, NC=YES, $
  FIELD=S4_FIELD, TYPE=NOP, NC=YES, $

Note: The following processing rules apply for fields defined with the NC=YES and MISSING=ON parameters:
  • The default value is set to the SQL NULL value when a new record is created:
    SQL
    INSERT INTO ADANC1
       (AA_FIELD,   AB_FIELD,   AC_FIELD,
        BA_FIELD,   BC_FIELD,   BE_FIELD,
        CA_FIELD,   CC_FIELD)
        VALUES (21, 22, 23, 'B1', 'B3', 'B5','A2', 'C2');
    END
  • The value could be set to the SQL NULL value when a record is updated:
    SQL
      UPDATE ADANC1 SET AB_FIELD=NULL
      WHERE  AA_FIELD = 21;
    END
  • These fields can be used in search criteria for selecting records that either have or do not have SQL NULL values, as in the following examples:
    SQL
      SELECT AA_FIELD, AB_FIELD, AC_FIELD, AD_FIELD, AE_FIELD FROM ADANC1
      WHERE  AB_FIELD IS NULL AND AA_FIELD GE 10;
    END 
    SQL
      SELECT AA_FIELD, AB_FIELD, AC_FIELD, AD_FIELD, AE_FIELD FROM ADANC1
      WHERE  AB_FIELD IS NOT NULL;
    END 
    TABLE FILE ADANC1R
      PRINT AA_FIELD AB_FIELD AC_FIELD AD_FIELD AE_FIELD G1_GROUP
      WHERE AB_FIELD EQ MISSING;
    END
  • Subdescriptors and superdescriptors can be used only in search criteria. Their values cannot be reported. Here are several examples:
    SQL
      SELECT AA_FIELD, AB_FIELD, AC_FIELD, AD_FIELD, AE_FIELD FROM ADANC1
      WHERE  S1_FIELD = 'A1A2A4' AND AA_FIELD > 10;
    END 
    SQL
      SELECT AA_FIELD, AB_FIELD, AC_FIELD, AD_FIELD, AE_FIELD FROM ADANC1
      WHERE  S1_FIELD IS NOT NULL AND AA_FIELD > 10;
    END
     
  • On the mainframe platform, subdescriptors and superdescriptors defined with the NC=YES and MISSING=ON parameters cannot be used to search for an SQL NULL value, as that causes an Adabas RC 61.

Reference: Master File Field Attributes

The following field attributes describe Adabas data segments.

Field Attribute

Description

FILE

Master File name. It may or may not match the file name in the Adabas DBMS.

SUFFIX

Always ADBSINX.

SEGNAME

Segment names in the description generated by the Create Synonym facility. They follow a logical format to provide uniqueness within the file.

FIELD

Field name from the Predict dictionary (if used) or generated automatically (xx_FIELD).

GROUP

Identifies fields described as simple groups or PE groups. Is the field name from the Predict dictionary (if used) or generated automatically (xx_GROUP).

ALIAS

Actual Adabas short name. It can be detailed for counter fields without standard length. For order fields, it has the value ORDER.

USAGE

USAGE format and length of the field. This attribute determines how the value is displayed in reports. Values are determined based on ACTUAL format and length and then may be detailed by value from the Predict dictionary (if used). For fields without standard length, it has the maximum value for the format.

ACTUAL

Field standard format and length as stored in the Adabas Field Definition Table (FDT) for a given file. For fields without standard length, it has the maximum value for the format. For fields with format A and option LA (Long Alphanumeric, used only for z/OS) the ACTUAL length must have a value greater than 253. Value 500 is assumed.

INDEX=I

Indicates the field is a superdescriptor, subdescriptor, or simple descriptor.

TITLE

Column heading used in reports. This attribute is included only if the Predict dictionary is used and the field has a column heading value in the Predict dictionary.

GROUP

Identifies fields described as simple groups or PE groups.

$GRMU

Group that contains a PE group or an MU (multi-value) field.

$2LONG

Group field whose total length exceeds the maximum of 4096 characters supported by the server.

$PEMU

PE group that contains an MU (multi-value) field or is a group field that contains a PE group or an MU field. In both cases, the field cannot be used to retrieve data using the adapter.

$FIELD

Field that belongs to a commented group or superdescriptor composed of partial fields (NOP).

Reference: Access File Attributes

The following Access File attributes describe Adabas data segments:

Attribute

Description

RELEASE

Adabas release. If RELEASE is 5 or less, then FILENO can be 1–255 and DBNO can be 0–255. If RELEASE is 6 or greater, then the adapter supports two-byte FILENO (1–5000) and DBNO (1–65535).

OPEN

Determines whether the adapter should issue Adabas OPEN and CLOSE calls for each report request.

SEGNAM

Segment name as described in the Master File.

ACCESS

Access method for the segment. ADBS indicates segments that contain non-repeating data. PE indicates segments that describe periodic groups. MU indicates segments that describe multi-value fields.

DBNO

Adabas database number. On UNIX, Windows, and OpenVMS, this attribute must be included in the Access File. DBNO depends on RELEASE. If RELEASE is 5 or less, DBNO can be 0–255. If RELEASE is 6 or greater, DBNO can be 1–65535.

FILENO

Adabas file number. If RELEASE is 5 or less, FILENO can be 1–255. If RELEASE is 6 or greater, FILENO can be 1–5000.

CONNECTION

Is the parameterized form of the logical Connection Name defined in the adapter connection attributes. It is usually created as &&ADA_CONNECTION. It can be re-assigned in an a focexec through a -SET command. For example:

-SET &&ADA_CONNECTION=ADA814
UNQKEYNAME

Field name that will be used as a unique key during file updating. The first unique indexed field from the root segment is used. If that does not exist, then a value from SEQFIELD is used.

CALLTYPE

FIND. Creates an additional commented line with CALLTYPE=RL if the Predict file view contains SEQFIELD data or the root segment contains an indexed field. The line with the preferable value of CALLTYPE can be chosen depending on the method used to retrieve the data from the database.

SEQFIELD

SEQFIELD name taken from the Predict file view, if used, or the first unique indexed field, or the first indexed field from Root segment. If CALLTYPE=FIND, then no value is entered for SEQFIELD in the Access File.

FIELD

Describes a descriptor, superdescriptor, subdescriptor, phonetic descriptor, hyperdescriptor, or a component of a superdescriptor.

TYPE

Type of descriptor for FIELD. Values are SPR for superdescriptors, NOP for subdescriptors or superdescriptors composed of partial fields, PDS for phonetic descriptors, HDS for hyperdescriptors, or DSC for a simple descriptor.

NU

Indicates if the field uses null suppression. Values are YES or NO.

NC

Specifies SQL null representation (NC stands for "not counted"). When on, forces the Create Synonym facility to insert "MISSING=ON" for this field in the associated MFD. NN option below further qualifies the SQL interpretation.

NN

NN "not null" or "null value not allowed" option indicates that an associated NC field must have a value (including zero or blank) defined; it cannot contain "no value.

PASS

Adabas password for the file. This attribute can be added manually.

KEYFLD

Only for child segments. This is the common field in the parent segment, which is used to relate the two files.

IXFLD

Only for child segments. This is the common field in the child segment, which is used to relate the two files.

Reference: Comments in Master and Access Files

The generated Master File and Access File contain several commented entries. They are provided for the client and are not used by the server. Comments are provided for the:

  • CREATE SYNONYM time stamp and creator's User ID (included in both the Master and Access Files).
  • Predict file name, file number, and DBID, if Predict is used.
  • Headers before special fields: super/sub/hyper/phonetic descriptors or fields without standard length.
  • Fields not supported by the adapter.
  • Component fields of superdescriptors that are composed of partial fields (described as NOP type).

Reference: Usage of Master File Fields With ISN Support

The Adapter for Adabas can employ a data retrieval strategy through Read Logical by ISN (L1) calls. It can be used to determine the Internal Sequence Number (ISN) of a record that was read or that will be inserted into an Adabas file.

ISN-based access is applicable only if an ISN field is described in the Master File. This field has a field name that is user-defined and an ALIAS of ISN. The Usage format is I and the Actual format must be I4. This field can be defined only in segments that contain non-repeating data (that is, using an access method defined in the Access File as ADBS):

FIELD=ISN_FIELD, ALIAS=ISN, I10, I4, $

Equality tests on the ISN field can be used to retrieve a single record when the:

  • Report request contains an equality operator in the selection test on an ISN list.

    or

  • ISN field is used as the cross-referenced field in the Join to an Adabas file.

Adabas returns the Response Code 113 if the record with the ISN defined in the test is not present in the Address Converter for the file. The adapter returns the following message: "Record is not found".

The Adapter for Adabas uses Read Logical by ISN (L1) calls to retrieve all records for the entry segment when the:

  • Report request does not contain optimizable selection criteria on an inverted list.
  • Access File contains a SEQFIELD value for the segment whose value is equal to the ISN field name.

For example, the Access File ADATEST contains:

SEGNAM=S01, ACCESS=ADBS , ... ,SEQFIELD=ISN_FIELD ,$

Adabas returns each record in ascending order by the value of the ISN.

Example: Equality Test on ISN Field

SELECT AA_FIELD, AJ_FIELD FROM ADATEST
WHERE ISN_FIELD = 1100;

Note: Multifetch option will be suppressed for this call.

Read Logical by ISN (L1) calls to retrieve a subset of records for the entry segment when the:

  • Report request contains the GE/GT relational operator in the selection test on an ISN list.
  • Report request does not contain any selection tests on an inverted list.
  • Access File contains a SEQFIELD value for that segment.

Example: Inequality Test on ISN Field

Access File ADATEST contains:

SEGNAM=S01, ACCESS=ADBS, ... ,SEQFIELD=AA_FIELD ,$

Read Logical by ISN (L1) is used:

SELECT AA_FIELD, AE_FIELD FROM ADATEST
WHERE ISN_FIELD > 1100;

Reference: ISN for Insert

After issuing an Insert request on a file with an ISN field in the Master File, the resulting ISN generated by Adabas is displayed by the message FOC4592:

(FOC4592) RECORD IS INSERTED WITH ISN : nnnnn 

Example: Issuing an Insert Request

SQL
 INSERT INTO ADBTEST (AA_FIELD, AJ_FIELD)
VALUES ('11111111', 'TAMPA');
END
ADBTEST ADBSINX ON 09/20/2002 AT 15.22.16
(FOC4592) RECORD IS INSERTED WITH ISN : 11
(FOC4566) RECORDS AFFECTED DURING CURRENT REQUEST : 1/INSERT
TRANSACTIONS: TOTAL = 1 ACCEPTED= 1 REJECTED= 0
SEGMENTS: INPUT = 1 UPDATED = 0 DELETED = 0

You can assign a value for the ISN field if the Insert request contains the ISN field and the assigned value is not 0.

The adapter will issue an Adabas N2 Direct Call to assign this ISN value to the inserted record. Adabas returns Response Code 113 if this value was already assigned to another record in the file or if it is larger than the MAXISN in effect for the file.

Reference: Master File Fields and GFBID Support

The Adapter for Adabas can optimize the performance of queries that use the same Adabas field lists repeatedly. Field lists are generated in Adabas format buffers, and can be retained.

Global Format Buffer ID (GFBID) support is applicable only if a GFBID field is present in the Master File. This field has a user-defined field name, and an ALIAS of GFBID. This field is used to determine the Global Format Buffer ID that will be defined in read requests with identical field lists for the same database. The GFBID field has a USAGE format of A8 and an ACTUAL format of A8. This field can be defined only in segments that contain non-repeating data (that is, the access method defined in the Access File is ADBS).

Example: Using GFBID Syntax in a Master File

FIELD=GID_FIELD, ALIAS=GFBID, A8, A8, $
Note:
  • If the field list is changed but the same GFBID is used in a request, then incorrect results may be displayed. In some cases, a message about the possible mismatch between the Field Definition Table (FDT) and Master File will be issued.
  • If two requests have the same list of selected fields but different fields are used in selection criteria, then the requests must use different GFBID values.

The GFBID field can be defined in the Master File manually or using the Create Synonym facility with option PARMS GFBID.

Reference: Using the GFBID Parameter With the Create Synonym Facility

x

Tip: You can change this setting manually or from the Web Console by clicking Adapters on the menu bar, clicking a configured adapter, and choosing Change Settings from the right-click menu. The Change Settings pane opens.

The value of GFBID can have up to 8 bytes and must start with a digit or uppercase character.

If GFBID is used in a request against a file that contains simple PE/MU segments, it will be applied to Adabas calls to get the field values from these segments. The GFBID value will be adjusted for each non-ADBS segment, that is, a segment number will be placed in the last (8th) byte of the GFBID field.

Calls to a PE (periodic element) with MU (multi-value) child or an MU with PE parent segment will not use GFBID values.

Note: To make the GFBID value unique within Adabas, do not use 8 byte GFBID values for these types of calls.

  • If a GFBID field is defined in the Master File, it can be used in a request as part of the selection test. The adapter will take the GFBID value from the selection criteria, deactivate the field, and remove it from the match array. The GFBID value is placed in the ADD5 field of the Adabas Control Block for the request.
  • If the GFBID is applied to an Adabas call, then field name ADD5 appears in the adapter trace. GFBID values that were issued in all requests to the database are accumulated in the Adabas internal queue. These values can be removed from the queue by issuing the following adapter SET command:
    ENGINE ADBSINX SET GFBID_OFF ALL/<value> DBID <number>

When a single <value> is in the SET command, all values issued for child segments are removed as well. If <value> contains blanks, then value must be enclosed in single quotation marks.

ALL clears all GFBID values.

Example: Using GFBID Syntax

Master File ADATEST contains:

FIELD=GID_FIELD, ALIAS=GFBID, A8, A8, $

Request 1. Global ID = ABC1:

SQL
SELECT AA_FIELD, AJ_FIELD, ISN_FIELD, AQ0201_OCC, AR_FIELD, AS_FIELD, 
AT_FIELD
FROM EMPLOYEES
WHERE ISN_FIELD > 1100 AND GID_FIELD = 'ABC1';
END

Result:

PAGE 1
 
 AA_FIELD AJ_FIELD     ISN_FIELD AQ0201_OCC AR_FIELD AS_FIELD AT_FIELD
 -------- --------     --------- ---------- -------- -------- --------
 30034517 DERBY        1105      1          UKL      6500     750
 30034517 DERBY        1105      2          UKL      6800     1240
 30034517 DERBY        1105      3          UKL      7100     1345
 30034517 DERBY        1105      4          UKL      7450     1450
 30034517 DERBY        1105      5          UKL      7800     1700
 50005600 VIENNE       1106      1          FRA      165810   10000
 50005300 PARIS        1107      1          FRA      166900   5400
 
 NUMBER OF RECORDS IN TABLE= 7 LINES= 7

Request 2. Global ID = ABC1, but field's list is changed:

SQL
SELECT AA_FIELD, ISN_FIELD, AQ0201_OCC, AR_FIELD, AS_FIELD, AT_FIELD
FROM EMPLOYEES
WHERE ISN_FIELD > 1100 AND GID_FIELD = 'ABC1';
END

Result:

(FOC4567) POSSIBLE MISMATCH BETWEEN FDT AND MFD : file=19879548
(FOC4591) ERROR RETURN ON READ BY ISN : S01 /999:ffffffcd001d00
 
 NUMBER OF RECORDS IN TABLE= 0 LINES= 0

Request 3. Remove value 'ABC1' from Adabas:

ENGINE ADBSINX SET GFBID_OFF ABC1 DBID 3

Request 4. Repeat request 2.

SQL
SELECT AA_FIELD, ISN_FIELD, AQ0201_OCC, AR_FIELD, AS_FIELD, AT_FIELD
FROM EMPLOYEES
WHERE ISN_FIELD > 1100 AND GID_FIELD = 'ABC1';
END

Result:

PAGE 1
 
 AA_FIELD ISN_FIELD AQ0201_OCC AR_FIELD AS_FIELD AT_FIELD
 -------- --------- ---------- -------- -------- --------
 30034517 1105      1          UKL      6500     750
 30034517 1105      2          UKL      6800     1240
 30034517 1105      3          UKL      7100     1345
 30034517 1105      4          UKL      7450     1450
 30034517 1105      5          UKL      7800     1700
 50005600 1106      1          FRA      165810   10000
 50005300 1107      1          FRA      166900   5400
 
 NUMBER OF RECORDS IN TABLE= 7 LINES= 7

Request 5. Remove all GFBID values for Database 3 from Adabas:

ENGINE ADBSINX SET GFBID_OFF ALL DBID 3

WebFOCUS

Feedback