File Handler Utilities (UNIX) | Converting Files |
It is often useful to be able to view and change items in a data file, or create reports from them. There are several tools in Object COBOL and Micro Focus Workbench to enable you to do this.
UNIX:
These tools are not available on UNIX systems.
Micro Focus Workbench contains a set of tools for editing data files at the record level, or at the byte level.
The Data File Editor is the main tool for viewing/editing data files. You use the Structure Editor to specify the structure of a data file to the Data File Editor, and then use the Data File Editor to view/edit the file at the record level. You can change the data, insert new records or delete records. You can view the data as ASCII or EBCDIC, or, at the byte level, in hexadecimal.
Figure 9-1: Data File Editing Tools
The Data File Services (DFS) tools include:
The Structure Editor enables you to produce structure (.str) files, which you can associate with the data files created by your applicaton or by using the Data File Editor. A structure file contains information describing the record layout of your data file. It also associates conditions with record layouts thereby specifying when each record layout is used. Once you have created a structure file for a particular data file, you do not need to recreate it unless you change the record layout of the data file.
The other DFS tools use the structure file to map structures to records within a data file.
The File Converter enables you to convert data files from one file organization to another, from one data format to another, from ASCII to EBCDIC and vice versa and between Btrieve and the format used by this COBOL system. You can also use it to convert both data and report files between PC and mainframe formats, and to recover corrupt indexed files. It can convert between the IEEE and S/370 floating-point representations. You can select a structure, created using the Structure Editor, to associate with a data file during conversion.
The Data File Filter enables you to create SQL statements that can be executed to take the contents of up to five files and selectively merge or concatenate them to form a new file. It can add or remove fields to create a new data file, and can create test data by copying fields from current data files.
The tool, Hex Edit , enables you to load any file as a byte stream, and view it as both hexadecimal and ASCII or EBCDIC characters. You can change the contents of a byte, but you cannot insert or delete bytes. A find facility enables you to locate any sequence of bytes in the file.
If you don't already have Workbench, contact your sales representative. If you do have Workbench, refer to your Workbench User Guide for more details of the DFS tools. See your Workbench Character Tools for details of Hex Edit, and the character version of Data File Editor.
Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names
used herein are protected by international law.
File Handler Utilities (UNIX) | Converting Files |