• No results found

Setup Data Items fall into one of three categories based on how their values are maintained:

• Setup Data Items with initial values • Setup Data Items without initial values • Setup Data arrays

These categories are described in the following subsections.

Setup Data Items with Initial Values

A Setup Data Item with an initial value is assigned the value of the literal only when your System or Report is started. If the value is changed by logic, the initial value is not

automatically restored.

Do not alter Setup Data Items with initial values.

Setup Data Items without Initial Values

Setup Data Items without initial values are handled differently in Ispecs and in Reports. In an Ispec, a Setup Data Item without an initial value is set to spaces or zeros before Pre-Screen Logic and Pre-LINC Logic.

If an Ispec does not include Pre-LINC logic, Setup Data Items are initialized before Main Logic. This means that a value moved into a Setup Data Item in Pre-Screen Logic is not retained for Pre-LINC or Main Logic.

In a COPY.FROM Ispec, Setup Data Items are initialized in the first copy only. This behaviour differs from earlier Host Builder generated systems.

Note: Group Setup Data Items are treated as alphanumeric items. Subgroup items are initialized to spaces or zeros as appropriate.

In a Report, Setup Data Items without initial values are initialized to spaces or zeros at the beginning of the Report.

Note: Group Setup Data Items are treated as alphanumeric items. Subgroup items are initialized to spaces or zeros as appropriate.

Setup Data Arrays

To access values of an array, define the indexes of the array and then access the array as a simple Setup Data Item.

If invalid values have been moved into the indexes, GLB.STATUS is set to ***** when the array is referenced. For a single command (such as the MOVE; command), execution will continue from the next command in your logic. For an Automatic Entry (AUTO;WRITE), the array will not be updated, but the remainder of the transfer will be actioned.

The value of each array subscript is initialized to zero at only two places in the Runtime Cycle: at the beginning of Pre-Screen Logic and at the beginning of Pre-LINC Logic. At all other times, you are responsible for maintaining the value of the array subscript.

Adding a Setup Data Item

To add a Setup Data Item to an Element using the Model Directory: 1. Double-click the Element in the Model Directory.

2. Select the Setup Data Items option in the navigation dialog box displayed. The Setup Data Item List window is displayed

3. Select the Setup Data option from the Add menu, or click the Add an Element

button. The Setup Data Options dialog box is displayed. 4. Specify a name, description, and type for the item. 5. If you are defining a Group type Setup Data Item:

• Click the Sub Item button. The Setup Data Options dialog box is redisplayed for you to add a Setup Data Item to the Group.

• Key in the required values for each Setup Data Item (the fields are described below).

• Click the Sub Item button to define another Setup Data Item to the Group, or click the OK button to return to the Setup Data Item List window.

If you are defining a Simple, Same.As, or Array type Setup Data Item:

• Key in the fields required in the Setup Data Options dialog box depending on the type of item (the fields are described below).

Edit

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

Length

Key in a numeric value for the length of the Setup Data Item. The default is 1.

Decimal Places

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

Initial Value

Key in an initial value for the item. The default is that the field is blank when the dialog box is opened.

Alphanumeric, maximum length 58. Do not enter an initial value for an array.

National Item

Note: This attribute is effective only for MCP based target hosts.

The National Item attribute enables an alphanumeric Setup Data Item to be sorted in a preferred national collating sequence, specified by the CCSVersion field on the Default DASDL Options tab of the Business Segment options for MCP dialog. If you specify any item to be a National item, you must specify a CCSVersion. This attribute may only be applied to an alphanumeric Setup Data Item (not a Group Setup Data Item).

Same as Item

Type Description

Alpha Alphanumeric (default).

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

Date Date.

Number Unsigned numeric.

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

Selected Like

If you key in the name of an existing Setup Data array 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.

Dim(ension) Name

Key in the name of a Setup Data Item to be the index of an array.

Dim(ension) Size

Key in the size of a Setup Data Item to be the index of an array. The maximum size of a dimension is 9999.