• No results found

Adding a Data Item to an Ispec or Global Logic To add a Data Item to an Ispec or a Global Logic using the Model Directory:

1. Select the Ispec or Global Logic by clicking on it.

2. Select the Data Item option from the Add menu. The Screen Data Item dialog box is displayed.

3. Key in the required information. The fields and expected input are described below.

Literal Description

(*****) Alphanumeric literal (12) Unsigned numeric literal (-12) Signed numeric literal

(-12.34) Signed numeric literal with decimals (@7C@) Hexadecimal value for the literal @

(@F2@) Hexadecimal value for the literal 2

Name

Key in an identifier for the Data Item. Alphanumeric, maximum length 12.

Review “Naming Elements: Reserved Words” on page 4-1 before naming a new Data Item.

Same As

If you key in the name of an existing Data Item here, Developer will copy all the attributes of the existing item to the new one. Leave this blank if you wish to specify the attributes for the new item.

Note: If the Data Item you are copying from is a Component array Data Item, the new item you create will be a Simple Data Item by default.

Usage

Select a usage type from the drop-down list. The usage types are:

Edit

Select an edit type definition from the drop-down list. The edit types are:

Type Description

Default Data Item takes the same usage as the Ispec.

Inquiry Display only. Cannot be entered on screen, is not stored in database. Input Value entered on screen.

I-O Input/Output. Value entered on screen, stored in database. Output Value stored in the database.

Type Description

Alpha Alphanumeric (default).

Credit Signed (CR or DR) numeric. Default is CR. Date Date.

Kanji Kanji data. This option is displayed only if you have selected Japanese character set support for your Business Segment and set a 2 byte CLEAR.WHEN character. Number Unsigned numeric.

Signed Signed (CR or DR) numeric. Default is DR.

Note: For MCP and OS 2200 based Systems, EDIT; W Data Items are treated in the same way as alphanumeric items. For Systems running on UNIX, EDIT; W Data Items require double the amount of internal storage (for example, an item is displayed as length 10 on the screen but requires 20 bytes of storage).

EDIT; W Data Items use an alphanumeric CLEAR.WHEN character.

You cannot use a Hankaku-Katakana character as the alphanumeric CLEAR.WHEN character.

Length

Key in a numeric value for the length of the Data Item. The default is 1. The following table contains limits for Data Items.

Note: For Systems with a target host of UNIX, an ORACLE restriction prevents data items of type long from being indexed. (A long data item has a length greater than 4000 characters. Each Ispec in a System running on UNIX can have only one long data item.) This means that such a data item should not be declared as an Ordinate of a Component or Profile. In addition, the total length of an index key formed by concatenating all keys must be less than 240 characters.

Decimals

Key in the number of decimal places (for numeric items only).

Ordinate

Check this check box if you want to define this Data Item as an Ordinate.

Note: If the Data Item is used in a Report Frame, it cannot be used as the Ordinate of an Ispec.

You can use the Data Item Analysis Design Audit function to find any Ordinates that are used in Report Frames.

Type of Data Item

Maximum Length

Normal Ispec Big Buffer Ispec

Alphanumeric 78 4095

Usage Inquiry, Alphanumeric 80 4095 Usage Output, Alphanumeric 4095 4095 Ispec, Numeric, with

NO.DECIMAL.KEYED 18 18

Ispec, Numeric, with DECIMAL.KEYED 17 17 Date Exactly 6 by default (can

be specified as 8 to include the century)

Exactly 6 by default (can be specified as 8 to include the century)

Presentation

Select a presentation type for the Data Item in Painter Graphics mode. The types are field, image, check box, push button, radio button, list box and combo box.

Presentation types are discussed in detail in “Defining Presentation Attributes” on page 5-17.

CopyFrom Order

This field refers to the order in which a Data Item cell is populated on a graphical screen. It displays 1-22 or 1-9999 for big buffer enabled CopyFrom Ispecs for Unix, OS2200, and Windows OS.

Note: This field is visible for CopyFrom Data Item cells only.

For MCP, this field displays 1-99, for big buffer enabled CopyFrom Ispecs.

Note: This field is visible for CopyFrom Data Item cells only.

Record Serial Number

Checking this check box on the Screen Data Item dialog box defines the Data Item as the Record Serial Number (RSN) for the Ispec. There can only be one RSN Data Item per Ispec. If this check box has been checked for a Data Item in the Ispec it is disabled for all other Data Items. A Data Item cannot be both the RSN and the Ordinate. The Ordinate check box is disabled if the Record Serial Number check box is checked, and vice versa. Only one RSN Data Item can be defined for the EVENT structure. Therefore, once this option is set for one Event Data Item, it cannot be set for a Data Item in any other Event.

Checking the Record Serial Number check box sets and disables the following fields:

This option applies to MCP-based hosts only. It is disabled if MCP is not selected in the Target Host options of the Business Segment Options dialog box. If the MCP target host option is unchecked after the RSN data item is defined, the Record Serial Number check box remains enabled.

Data Items defined as RSN are displayed in the Model Directory using the System color, which is red by default.

Field Value

Usage Output

Edit Numeric

When defining a Data Item into which RSN values can be moved, you can use GLB.RSN in the Same As field to ensure they have the correct attributes. If using a Data Item that has not been defined with GLB.RSN, you must ensure that it is large enough to store the RSN value.

The RSN functionality is only included in the files generated from Builder if the Extended Edition check box is checked on the Default DASDL page of the Business Segment Options for ClearPath MCP. If the Extended Edition check box is not checked, or if the system is generated to a host platform other than MCP, the Data Item is generated as a simple Data Item with Edit = Numeric, Usage = Output, and Length = 12. After defining these fields you can click the OK button to save the definition, or you have the option of defining the data attributes, display attributes, and presentation attributes of the Data Item. These topics are described in the following subsections. You can also click the Next button to define another Data Item.

Defining Data Attributes