This feature enables you to calculate the size of a COBOL variable (or a group of COBOL variables) that is defined as per the COBOL coding standards. It works for the COBOL editor and the Unisys Common Editor (text editor).
The element containing the variable structure can be opened from one of the following:
OS 2200 Projects
OS 2200 File Explorer
Local File-system (Open With, Open External File With or Drag/Drop over the editor-area)
To calculate the field size of a variable or a group of variables, do the following:
Highlight the block or line containing the variable.
Note: If no selection is made, the current line is considered for selection.
Partially highlight a variable or a group of variables.
Notes:
In a partial selection, the first line is selected if it starts with a level number and the last line is selected if it contains a period at its end. If there is no period, the next 2 lines are scanned for a period or a level number. The line is selected if a level number or period is found in it, otherwise both the lines are considered for selection.
If a group-level variable is selected, all the variables under this group are selected.
Click
OS 2200 > Field
Size. Alternatively, you can click
on the tool
bar.
The Field Size dialog box appears displaying multiple fields as has been described in the following table.
Descriptions for Fields in the Field Size Dialog Box |
||
Field Name |
Field Type |
Description |
Containing Text |
Text box |
Editable and adjustable text box. Contains the selected variables. |
Offset Display Type |
Drop-down list |
Contains the following three different Offset Display types:
Note: By default, the Decimal Characters type is selected, irrespective of the last selection made when the dialog box was opened. |
Selection |
Tabular Column |
Non-editable tabular column consisting of the formatted selection. Each line in this field represents the definition of a single variable. |
Offset Value |
Tabular Column |
Non-editable tabular column consisting of the offset and the size of each variable that is included in the selection. |
Refresh |
Button |
When the editable text box is modified, press Refresh to process the change. However, this action is not required when selecting a different Offset Display Type for the current selection. If the current selection is modified and you do not refresh but change the Offset Display Type, then the older selection in memory is considered for processing the field size. |
Notes:
The processing time to calculate the field size depends on the size of the selection, though there is no limit to the size of selection. Since the processed output is not cached in memory, it will be recalculated every time.
The comments and tags within a selection are included to retain the text in its original format.
The tab characters in a selection are converted to spaces where 1 tab = 4 spaces.