Defining a new structure

You can define a new structure from scratch or by copying and modifying an existing structure.

1. From the Structure Definitions list,

The Structure Definition input window is displayed. (See figure 1.)

1. Defining a structure.

2. Enter or modify data in each field as instructed below.

Structure name

Enter a unique structure name. The structure name can have a maximum of 30 characters and must begin with a letter. The remaining characters can be letters, digits, underscores (_), or dollar signs ($).

File type

Select the file type to which you want to be able to assign this structure. The structure can be assigned only to files of this type. The available types are






Enter a description for the structure, with a maximum of 40 characters. This description is available when Repository displays a list of structures. If you are using ReportWriter, enter a unique description, so that ReportWriter can use it, along with the file description, to identify your files.

Tag type

Tags are associated with structures and used when multiple structures are assigned to one file. The tag uniquely identifies one structure (or record type) from another. Tags are also used by xfODBC and ReportWriter to filter records. Select the tag type:

None = The structure is not tagged. (default)

Field = The structure is to be identified by specific field comparison criteria. These criteria are defined when you define the structure’s attributes.

Size = The structure is to be identified by its record size. (This is useful only for variable‑length record files.)

See Defining tags for information on defining Field type tags.

3. You’ll probably want to define the attributes for your new structure before you exit the Add Structure function. You can define fields, keys, relationships between structures, redisplay formats used by the fields in the current structure, tags, and aliases. Refer to these sections for more information:

Working with Fields

Defining keys

Defining relations between structures

Defining field formats

Defining tags

Defining aliases

If your structure has a file type of relative, Repository has already created one key for you. This key defines the relative record number as the access method. See Defining keys for more information about relative file keys.

4. Exit the window to save the new structure.

If you’ve selected any of the attribute functions from the menu, you are prompted

Structure has been modified. Do you want to save changes?

Select Yes to save your new structure definition and all its attributes in the repository. If you select No, the new structure is not saved.

Assigning a long description to a structure

You can assign an 1,800‑character description to a structure. This enables you to store more detailed information about the structure and its use.

1. In the Structure Definitions list, highlight the structure to which you want to assign a long description.
2. Select Structure Functions > Edit Long Description.
3. Enter a long description.
4. Exit the window to save your changes.

Assigning a user‑defined text string to a structure

You can associate a 60‑character user‑defined text string with a structure to store additional information you want to access at run time with the Repository subroutine library.

1. In the Structure Definitions list, highlight the structure to which you want to assign a user‑defined text string.
2. Select Structure Functions > Edit User Text.
3. Enter a user text string.
4. Exit the window to save your changes.