Adding Group Fields in a Synonym
For data sources that support groups, you can assign
a unique name to multiple fields to create a group field. A group
field is created by two or more alphanumeric fields, physically
next to each other. A group field provides an efficient means for
grouping similar or logically connected fields that will be accessed
as a single unit, but do not warrant a separate segment.
Note: In the Maintain environment group fields
are supported in a Master File as long as they are not group keys,
that is groups that are actual fields, as supported by VSAM. If
you create a group field in the Maintain environment, the group
will not be visible, only the fields that make up the group will
be visible.
x
Procedure: How to Add a Group Field to a Segment
-
From the Projects
or Data Servers area, open a synonym by double-clicking a Master
File from the Master Files folder.
The
Synonym Editor opens.
-
Right-click a segment (or column) and
click Insert.
-
Select Group
from
the Insert submenu.
Note: The group option
may not be available for some data sources.
A
group is added to the synonym and its attributes and values appear
on the right.
-
Type
a name for the group in the GROUP field.
-
Select
the USAGE Type value for the group. Specify
the length, the decimal places (if applicable) and any display options
for the group.
-
Click
the I - Index box if you want the group to be
indexed.
-
Select
the ACCESS_PROPERTY values to specify access options for the group
data.
-
Optionally,
you can specify the TITLE and DESCRIPTION display options.
-
Click Save from
the File menu to save the synonym.
-
To close
the Synonym Editor, select Close from the
File menu or click the control button in the upper-right corner.
x
Procedure: How to Add a New Field to a Group Field
-
Right-click the group field to which
you want to add a new field and select Insert.
-
Select Field
from
the Insert submenu.
A field is added
to the group and its attributes and values appear on the right.
-
Supply
the required information for the group field. For more information about
field attributes, see Viewing and Editing Synonym Attributes.
x
Procedure: How to Add an Existing Field to a Group Field
-
Click
the field you want to add to the group field.
-
While
holding the left mouse button down, drag the field and drop it on the
group field name.
The field is added to the group field.
x
Procedure: How to Delete a Group Field From a Segment
-
Right-click the group and select Delete.
A
confirmation appears stating that all fields/columns within the
group will be deleted.
-
Click Yes to
delete the group and move the fields (within the group) under the
root segment of the synonym.
Click No to
delete the group and all of the fields within the group.
Click Cancel to close the Confirm
Delete dialog box and return to the Synonym Editor.
x
Procedure: How to Delete a Field From a Group Field
Right-click the field, then select Delete.
x
Reference: Group Field Attributes
Group
fields in a synonym can have the following attributes:
-
General
-
-
GROUP
- Is the name of the group.
-
ALIAS
- Assigns an alternative name for a group.
If you create a report, the group name appears as a column
heading unless you have specified an alternate title for the group.
Aliases cannot be used as column titles.
-
TITLE
- Supplies a title to replace the group name that is normally
used in reports and enables you to specify multiple language titles
for the group.
-
USAGE
- Contains the format for the group field. Since the group field
is made by concatenating together several other fields, the Synonym
Editor determines what this format needs to be. For example, if
the group field has two alphanumeric fields in it, each 20 characters
long (A20), then the group field must be alphanumeric and 40 characters
long (A40). The group field is always alphanumeric, regardless of
the fields that make it up.
-
Miscellaneous
-
-
DESCRIPTION
- Contains a description or comments about the group. The description
displays in Field lists and on the status bar.
Field descriptions also appear as bubble help in OLAP-enabled
reports. If you do not include a description, bubble help shows
the field name (column title).
For information on displaying bubble help
in OLAP-enabled reports, see the Creating Reporting Applications With Developer Studio manual.
-
FIELDTYPE
- Identifies an indexed group. You can index the values of a field
to enhance data retrieval performance. To do so, select the Index
check box when you add a field and before you add the data. An index
is an internally stored and maintained table of data values and
locations that enhance the performance of data retrieval. A Master
File can have several associated indexes, but the combined total
of indices and segments cannot exceed 64.
Note: FIELDTYPE=R indicates a read-only
column. This setting is useful for columns that are automatically
assigned a value by the RDBMS.
Tip: You can turn on the index after adding
data to a field, however, you will have to use the Rebuild Index
option to create the index.
-
ACCESS_PROPERTY
- Specifies access options for the column data.
INTERNAL defines a column that does not appear in sample
data or in the list of available columns. Restricts the field from
showing in any of the Field Lists in the reporting tools.
NEED_VALUE defines a column that requires
a value to access the data. Indicates that a selection is needed
in the report request (WHERE condition).
Select By defines a column by value, range, or multivalues:
- If Value is
checked, only one value should be defined for selection in the report
request.
- If Range is
checked, a range selection should be defined in the report request.
- If Multivalues
is checked, multiple values are allowed for selection in the report request.
Note: The attributes available depend
on the type of synonym.