Managing Supra Metadata

In this section:

This topic explains how the Adapter for Supra allows you to describe and report from Supra database views. You should become familiar with these topics, because most of the concepts affect the way Supra files are described to the server.

When the server accesses a data source, it needs information on how to interpret the data stored there. For each data source the server will access, you create a synonym that describes the structure of the data source and the server mapping of the Supra data types.


Top of page

x
Master File

Reference:

The syntax for describing a Supra database in a Master File is like that of any other Master File and uses the same keywords. A Master File can contain a File record, Segment records, and Field records. The keywords are described in the following sections.



x
Reference: File Keywords

Keyword

Format or Value

FILENAME

Arbitrary name up to eight characters in length.

SUFFIX

Is SUPRA when accessing RDM or PDM data using the Supra RDM. If RDM is not available, the SUFFIX=TOTIN is used for PDM data access. For more information, see Supra PDM.



x
Reference: Segment Keywords

Keyword

Format or Value

SEGNAME

Segment name.

SEGTYPE

Segment type. Sn means that the first n fields are components of the key, in the order listed. This information is used only if the Access file is missing, or if no value is specified for the KEYNAME attribute of the Access File. If the two values disagree, the value specified in the Access File is retained. A message is displayed only if FSTRACE is allocated to the screen or to a file.

PARENT

Segment name of the parent. If you describe several Supra views or user views as a hierarchical structure in one Master File, then you must define one view as the root segment and all other views as descendant segments. Each descendant segment must include the PARENT attribute to identify its parent in the hierarchy. You must also identify the shared fields for each pair of segments by specifying the KEYFLD and IXFLD attributes in the Access File.



x
Reference: Field Keywords

Keyword

Format or Value

FIELD

Any name; 66 characters is the maximum length.

ALIAS

Name of the view column as defined to Supra. The total length must not exceed 66 characters.

USAGE

USAGE format values are A (Alpha), I (Integer), F (Floating point), D (Decimal), or P (Packed).

ACTUAL

Specifies the actual Supra format (that is, the format defined by the DBA in the view definition that an application program would use for accessing the data).

Some examples of Supra formats and their corresponding ACTUAL formats are:

  • Supra B 1, 2, 4, 8 (with decimal) fields may be defined as F or D.
  • Supra C 1-32,767 fields may be defined as A (the maximum length of an alphanumeric field is 256 characters).
  • Supra F 4, 8, 16 fields may be defined as I.
  • Supra P 1-16 (with decimal) fields may be defined as P.

    The ACTUAL format does not specify the number of decimal places in the number. The USAGE format defines the number of decimal places; it must be large enough to accommodate all of the digits in the number, the decimal point, and a possible minus sign. For example, if the Supra format is P5 with 2 decimal places, you can use the following specifications:

    ACTUAL=P5, USAGE=P8.2
  • Supra Z 1"18 (with decimal) fields may be defined as Z.

Note: You can place different views into one Master File. If they have shared fields (fields with the same value in both views), then one view is described as the parent segment, and the other views are described as the child segments.


Top of page

x
Access File

Reference:

The Access File provides the information necessary for selecting the appropriate Supra database, view, and access strategy (that is, the linking of items between different tables).

A logical record in the Access File consists of a list of attributes (keyword = value pairs) separated by commas and terminated by a comma and dollar sign (,$). The list is freeform and can span several lines. The keywords can be specified in any order.

The Access File contains two types of logical records: HEADER and SEGMENT.



x
Reference: HEADER Logical Record

Keyword

Value

USER

Supra user name. If omitted, it defaults to FOCUS.

PASSWORD

Supra user password. If omitted, it defaults to FOCUS.



x
Reference: SEGMENT Logical Record

Keyword

Value

SEGNAME

Segment name.

VIEW

Supra view (defaults to SEGNAME).

USERVIEW

Supra user view corresponding to the segment identified by segname (defaults to VIEW).

KEYNAME

Composite of at most nine field names that constitute the key of the view. The field names are concatenated with the symbol "/", without intervening blanks. The keyword value can span more than one line. If omitted, the first n fields, as specified by the SEGTYPE keyword in the Master File, are assumed.

KEYFLD

Field name in the parent segment or a defined field that establishes the embedded cross reference. It is mandatory in all but the root segment. Its value is a composite of a maximum of 9 field names concatenated with the symbol "/", without blank spaces. The keyword value can span more than one line.

IXFLD

Field name in the descendant segment that establishes the embedded cross reference. It is mandatory for all but the root segment. The values of this field should match the values of the KEYFLD. The keyword value consists of a maximum of 9 field names concatenated with the symbol "/", without blanks. The keyword value can span more than one line.


Top of page

x
Embedded Cross-Reference

If your request references fields from two segments defined in the same Master File, the two views are automatically cross-referenced. The fields that implement the cross-reference are specified in the Access File with the KEYFLD and IXFLD attributes. The selection of the shared fields is transparent to you.

The following rules apply a:

In all cases, the length and the format of KEYFLD and IXFLD must be consistent (a list of fields may be joined to a simple field and vice versa, as long as their formats are alphanumeric).


Top of page

x
Supra PDM

Accessing PDM data requires using SUFFIX=TOTIN in the Master File.


iWay Software