|Editing Data Files||Using Record Layouts with Data Files|
This chapter describes the Data File Converter that Mainframe Express provides for converting data files on your PC.
For detailed information about using the Data File Converter, see the Mainframe Express online help. (Click Help Topics on the Help menu. Then, on the Contents tab, click Development Environment, Working with Data Files, Converting.)
The Data File Converter removes the need for you to recreate data already produced or to write special conversion programs.
Use the Data File Converter to convert data files between file organizations and formats:
Converting files from one format to another enables you to restructure data. For example, you can convert from sequential organization to indexed or add extra secondary indices as the needs of an application change.
The Data File Converter also provides an easy method for data conversion between EBCDIC and ANSI.
If records contain non-text data items, such as COMPUTATIONAL data, you can use record layouts to define the data items to be converted and those data items that should remain unconverted. For more information on record layout files, see the chapter Using Record Layouts with Data Files.
The Data File Converter can convert internal floating-point formats between S/370 format and IEEE format, using the record layout descriptions.
You can increase or decrease the minimum and maximum record length for the new file:
When you specify the input filename, the Data File Converter reads the input file details by using the process outlined in the section File Types and Record Lengths in the chapter Editing Data Files. You need to specify the output file's name. You can change the default organization and record format values picked up by the Data File Converter for the output file. If no file details are available, you need to specify them.
For a definition of the record format codes and organization codes, see the chapter Advanced Data Set Information in your IDE Technical Guide.
If you have selected the output file to have indexed organization, you need to define the keys for the new file. See the section Defining Keys for Indexed Files in the chapter Editing Data Files.
Note: If you request a conversion of a sequential file to an indexed file with unique keys and some of the records contain duplicate key values, Data File Converter ignores these records and does not convert them. At the end of the conversion, Data File Converter informs you of the number of records rejected.
You can find further information about converting files in the chapter File Conversion Utilities in your Administrator's Guide.
The Data File Converter is presented in a mainframe-style or PC-style view. The view that you get depends upon whether or not you have checked Use Catalog in the Data Tools dialog box.
To view the Use Catalog setting, click Data Tools on the Options menu. For more information about the Use Catalog setting, see the section Data Tools Settings in the chapter Working with Data Files: an Introduction.
To convert a data file with a mainframe data set-name, file organization and record format, you need to transfer the mainframe file to the PC in binary format (see the section Transferring a Mainframe File to the PC). You should also click Data Tools on the Options menu, check Use Catalog and click OK.
Before opening the Data File Converter, you can select a file from the catalog for conversion. Or, you can open the Data File Converter and then select a file. In both cases, the Data File Converter extracts file information from the catalog entry.
For mainframe-style files, the Data File Converter looks like this:
Figure 12-1: The Dataset Convert Dialog Box
The Data File Converter picks up record lengths and key information for the output file, which you can change, from the input file's catalog. For a definition of organization codes and record format codes, see the chapter Advanced Data Set Information in your IDE Technical Guide.
If you select indexed organization for the output file, you need to define the keys for the new file. See the section Defining Keys for Indexed Files in the chapter Editing Data Files.
To convert PC-style files, click Data Tools on the Options menu, uncheck Use Catalog and click OK.
When you convert PC-style files, the Data File Converter presents conversion options based on PC file handling. In addition, there are options to convert file types not available for mainframe-style files:
Figure 12-2: The Data File Convert Dialog Box
You can use the PC-style conversion to convert:
As an alternative to looking at mainframe-style files from your PC through a project, you can also transfer mainframe files to your PC and work on them as PC-style files.
Transfer mainframe files to the PC in binary format. If a mainframe file is variable length, read the section Variable Length Files.
If a file is initially a variable length file, you should ask your administrator to use the mainframe program VRECGEN to perform an initial reformat of the file on the mainframe. You can then use the Data File Converter to convert the file from the VRECGEN format (see the section PC-style Files).
When you want to upload the file to the mainframe, use the Data File Converter to convert the file to VRECGEN2 format. Then, ask your administrator to use the mainframe program VRECGEN2 to reformat the data for the mainframe.
For more information about VRECGEN and VRECGEN2, see the chapter File Conversion Utilities in your Administrator's Guide.
You may need to convert report files that have been produced on the mainframe and then either downloaded to the PC or created by a mainframe application run on the PC.
Mainframe report files can only be converted to PC print files. Similarly, a PC print file can only be converted to a mainframe report file. The mainframe report file should be an EBCDIC-encoded file and the PC print file should be ANSI-encoded.
A mainframe report file contains carriage control characters that the Data File Converter converts to PC-printable formats. When the output file is the mainframe file, the record length includes the carriage control character. When the output file is the PC print file, the record length is solely the data length.
If you specify the input file as a mainframe print format file but it was created on the PC, you may receive error message 139 ("Input file not 'real' mainframe report format"). You can prevent this by ensuring that you use normal mainframe dialects to create an EBCDIC report file.
Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.
|Editing Data Files||Using Record Layouts with Data Files|