Convert mainframe data files with complex record layouts using Micro Focus
Created by Peter West
Environment: Production | Source: Mainframe EBCDIC Data Files | Target: Micro Focus ASCII Data Files |
R Type: Rehost | Workload: All other workloads | Technologies: Mainframe; Modernization |
AWS services: AWS Mainframe Modernization |
Summary
This pattern shows you how to convert mainframe data files with non-text data and complex record layouts from EBCDIC (Extended Binary Coded Decimal Interchange Code) character encoding to ASCII (American Standard Code for Information Interchange) character encoding by using a Micro Focus structure file. To complete the file conversion, you must do the following:
Prepare a single source file that describes all the data items and record layouts in your mainframe environment.
Create a structure file that contains the record layout of the data by using the Micro Focus Data File Editor as part of the Micro Focus Classic Data File Tools or Data File Tools. The structure file identifies the non-text data so that you can correctly convert your mainframe files from EBCDIC to ASCII.
Test the structure file by using the Classic Data File Tools or Data File Tools.
Prerequisites and limitations
Prerequisites
An active AWS account
Micro Focus Enterprise Developer for Windows, available through AWS Mainframe Modernization
Product versions
Micro Focus Enterprise Server 7.0 and later
Tools
Micro Focus Enterprise Developer
provides the run environment for applications created with any integrated development environment (IDE) variant of Enterprise Developer. Micro Focus Classic Data File Tools
help you convert, navigate, edit, and create data files. The Classic Data File Tools include Data File Converter , Record Layout Editor , and Data File Editor . Micro Focus Data File Tools
help you create, edit, and move data files. The Data File Tools include Data File Editor , File Conversion Utilities , and the Data File Structure Command Line Utility .
Epics
Task | Description | Skills required |
---|---|---|
Identify source components. | Identify all possible record layouts for the file, including any redefinitions that contain non-text data. If you have layouts that contain redefinitions, you must factor these layouts down to unique layouts that describe each possible permutation of the data structure. Typically, a data file’s record layouts can be described by the following archetypes:
For more information on creating flattened record layouts for files that contain complex record layouts, see Rehosting EBCDIC applications on ASCII environments for mainframe migrations. | App developer |
Identify record layout conditions. | For files with multiple record layouts or files that contain complex layouts with a REDEFINES clause, identify the data and conditions within a record that you can use to define which layout to use during conversion. We recommend that you discuss this task with a subject matter expert (SME) who understands the programs that process these files. For example, a file might contain two record types that contain non-text data. You can inspect the source and possibly find code similar to the following:
The code helps you identify the following:
You can document the values that are used by this field to associate the record layouts with the correct data records in the file. | App developer |
Build the source file. | If the file is described over multiple source files or if the record layout contains non-text data that’s subordinate to a REDEFINES clause, then create a new source file that contains the record layouts. The new program doesn’t need to describe the file using SELECT and FD statements. The program can simply contain the record descriptions as 01 levels within Working-Storage. Note: You can create a source file for each data file or create a master source file that describes all the data files. | App developer |
Compile the source file. | Compile the source file to build the data dictionary. We recommend that you compile the source file by using the EBCDIC character set. If the IBMCOMP directive or ODOSLIDE directives are being used, then you must use these directives in the source file too. Note: IBMCOMP affects the byte storage of COMP fields and ODOSLIDE affects padding on OCCURS VARYING structures. If these directives are set incorrectly, then the conversion tool won’t read the data record correctly. This results in bad data in the converted file. | App developer |
Task | Description | Skills required |
---|---|---|
Start the tool and load the dictionary. |
| App developer |
Create the default record layout. | Use the default record layout for all records that don’t match any conditional layouts.
The default layout appears in the Layouts pane and can be identified by the red folder icon. | App developer |
Create a conditional record layout. | Use the conditional record layout when there is more than one record layout in a file.
| App developer |
Task | Description | Skills required |
---|---|---|
Start the tool and load the dictionary. |
| App developer |
Create the default record layout. | Use the default record layout for all records that do not match any conditional layouts.
The default layout appears in the Layouts pane and can be identified by the blue “D” icon. | App developer |
Create a conditional record layout. | Use the conditional record layout when there is more than one record layout in a file.
| App developer |
Task | Description | Skills required |
---|---|---|
Test an EBCDIC data file. | Confirm that you can use your structure file to view an EBCDIC test data file correctly.
| App developer |
Task | Description | Skills required |
---|---|---|
Test an EBCDIC data file. | Confirm that you can use your structure file to view an EBCDIC test data file correctly.
| App developer |
Task | Description | Skills required |
---|---|---|
Test the conversion of an EBCDIC file. |
| App developer |
Related resources
Micro Focus
(Micro Focus documentation) Mainframe and legacy code
(AWS Blog posts) AWS Prescriptive Guidance (AWS documentation)
AWS Documentation (AWS documentation)
AWS General Reference (AWS documentation)
AWS glossary (AWS documentation)