Synergy Data Language syntax and usage

The following conventions are used to document the Synergy Data Language statement syntax:

Together, these elements form a definition, as shown in the example below.

1. Synergy Data Language definition.

General usage rules

FIELD ccname TYPE date SIZE 8 STORED YYYYMMDD
DESCRIPTION "Opened account" LONG
DESCRIPTION "Opened account (YYYYMMDD)"
"Type 'Return' to continue"
'Type "Return" to continue'

Recommended definition order

In general, definitions can be specified in any order. If multiple types of definitions (e.g., template, structure, etc.) are combined within one schema file, global formats must be specified before templates, and templates must be specified before structures. For slightly faster processing times, load definitions in the following order:

1. Global formats.
2. Enumerations.
3. Templates in reference order. That is, define all parent templates before their child templates.
4. Each structure in reference order, along with all of its formats, fields, keys, relations, and aliases.

A structure referenced within an implicit group specification or as a Struct data type must be defined before the structure that references it.

Each structure must be followed by its formats, fields, keys, aliases, relations, and tag. The formats must occur before any fields. The fields must be grouped together and must occur before any keys or aliases that reference them. Relations can occur anywhere within the structure, except between fields. (Relations are not validated until the end of the schema loading process, so if they are not defined with their structure, they may be placed after all structures in the schema file.) A structure’s tag must be defined before the group of fields or after the entire group.

5. Files.

General processing rules

A Synergy Data Language file (schema file) can be used to create a new repository or update an existing one.

When a repository has been successfully loaded or updated, you should run both the Verify Repository utility and the Validate Repository utility on the new (or copied) repository.

The Load Repository Schema utility is able to process the specification of both new and existing repository definitions. The way each is handled depends on the options you set when running the utility.

Replace deletes the current definition and stores the new one from the schema file. Replacing an existing structure essentially deletes all fields, keys, etc., for the current structure, and adds back only those specified in the schema file.

Overlay updates existing fields, etc., with those in the schema file and adds new fields, etc. It does not delete any fields, etc. Overlay is typically used to add to the attributes of existing definitions.

Important

The Load Repository Schema utility attempts to load all the definitions in the schema file into the repository. If your file contains definitions you do not wish to load, you must remove them from the file. For example, if your schema file contains both new and existing definitions, and you want only to update the existing ones, you must remove the new definitions from the file before loading the schema.

The table below summarizes the rules that your schema must follow to use the Load Repository Schema utility to update (merge) an existing repository. Carefully review this table before merging schemas.

Rules for Schema Files

Option

Definition type

Rules

Add

<All>

All required keywords and data must be specified. Non-specified, non-required attributes are set to default values.

Global formats

Must be defined before any templates or structures, if multiple definition types are combined in one schema file.

Enumerations

No additional rules.

Templates

Must be defined before any structures, if multiple definition types are combined in one schema file.

Structures

No additional rules.

Formats

Must be defined before any fields.

Fields

Must be defined before any keys.

Keys

Must be defined before any relations.

Tags

Must be defined before any fields or after all fields for the current structure.

Files

No additional rules.

Replace

<All>

(See “Add” above.)

Global formats

No additional rules.

Enumerations

No additional rules.

Templates

No additional rules.

Structures

No additional rules.

Notes: New fields, keys, etc., are added. Existing fields, keys, etc., are replaced. Non-specified existing fields, keys, etc., are deleted. New alias structures and alias fields are added. All alias fields in existing alias structures are replaced by specified alias fields. Non-specified alias structures (and their fields) are unaffected.

Formats

No additional rules.

Fields

No additional rules.

Keys

No additional rules.

Relations

No additional rules.

Tags

No additional rules.

Files

To disassociate structures from a file, specify only the ones you want to keep. Specifying no assigned structures clears all current assigned structures.

Overlay

<All>

The definition name must be specified, followed by the attributes to be overlaid or added to the definition. (Exceptions to this rule are listed below.) All other attributes remain unchanged.

Global formats

All keywords and data except JUSTIFY must be respecified.

Enumerations

All members must be respecified when you overlay one or more members.

Templates

No additional rules.

Notes: When a parent is added to an existing template, both the existing override flags and the template attributes that are explicitly specified in the schema file are retained as parent overrides.

Structures

No additional rules.

Notes: New fields, keys, etc., are added. Existing fields, keys, etc., are updated. Non-specified existing fields, keys, etc., remain unchanged. New alias structures and alias fields are added. All alias fields in existing alias structures are replaced by specified alias fields.

Formats

All keywords and data except JUSTIFY must be respecified.

Fields

No additional rules.

Notes: When a template is added to an existing field, only the existing override flags and the field attributes that are explicitly specified in the schema file are retained as template overrides.

Keys

All key segments must be respecified when you overlay one or more segments. (To clear all segments, use Replace.)

All compression options must be respecified when you overlay one or more options.

Relations

All attributes must be respecified.

Tags

All attributes must be respecified.

Files

All assigned structures must be respecified (along with any ODBC table names) when changing one or more.