-
From the
Micro Focus Data File Tools window, click
.
The
Open dialog box appears.
-
Navigate to an
.idy file for a compiled program that uses the data file that you plan to apply this structure file to, then click
Open.
Note: Programs must be compiled for debug in order to produce an
.idy file.
A new Structure tab is displayed, which contains the Data Division of the
.idy file in the Available Layouts pane. The group structures are maintained, but the levels use consecutive numbering instead
of the numbering used in the COBOL source.
-
To create a default layout, from the Available Layouts pane, right-click the required level entry and select
Create Default Layout.
The new default layout appears in the Selected Layouts pane, and consists of the selected level entry and any sub-level entries.
This is the layout that a record will use if there are no other layouts, or no other layouts that have criteria that matches
with the record.
-
(Optional) Create a conditional layout:
The ANSI/EBCDIC indicator (displayed to the right of the
Browse button) defaults to the character set specified when the COBOL compilation generated the debug file (.idy file). It indicates the character set representation to be shown when adding condition values to the next conditional layout.
-
If the indicator is showing a character set other than the one required, click the indicator and select the required character
set.
-
Right-click another level entry in the Available Layouts pane, then select
Create Conditional Layout.
The new conditional layout appears in the Selected Layouts pane.
Note: You can differentiate the layouts by the icons
(Default) and
(Conditional).
-
In the Selected Layouts pane, expand the layout to display the field on which to base the condition, then right-click it and
select
Properties.
Note: Conditions cannot be applied to group fields within a layout.
The
Field Properties dialog box appears.
-
Check
Convert if you plan to use this layout with the Data File Converter and want this field to be converted between EBCDIC and ANSI.
Clear this option if the field contain non-text data items (for example, binary values), which you do not want to be converted
(as they will corrupt the converted file).
The presence of
in the Selected layouts pane indicates which fields within the record would be converted:
-
From the
Condition section, select
Set Condition to enable the condition properties.
-
Click the current operator and select an appropriate operator from the list.
-
Complete the value(s) for the condition.
-
Click
OK.
Note: You can add more conditions to other entries; any record must match all conditions for all entries in order to use the layout.
-
On the
File menu, select
Save As....
The
Save As dialog box appears.
-
In the
Filename field, type the name of the structure file and click
Save.
Tip: If you save the file with the same basename and in the same location as the data file that it will be applied to, this structure
file is automatically applied when you open the data file. Similarly, if you already use a structure file of the same basename
and in the same location (for example, to store the file header details), select it again to append the layout information
for the file.