View a Data File Unformatted

To view the data file you just created, load it into the Data File Editor:

  1. In Classic Data File Tools, click File > Open and navigate to the ClassicDataToolsDemo project folder.
  2. Select staff.dat; then click Open.

    Depending on options set, either the Data File Editor window appears immediately or a message box appears, explaining that all edits to indexed and relative file types are applied immediately.

  3. If the message appears, and you want to prevent it from appearing again, check Do not show this message again; then click OK.

    The Data File Editor loads the contents of staff.dat and displays them as shown here:

    Figure 1. The IDE with a Data File Editor Window
    The IDE with a Data File Editor Window

    Each record is shown as one line. Because the Data File Editor does not know the lengths of the fields in the record, each line is simply a continuous line of text; the records are unformatted. Non-character fields such as COMP items generally display as non-standard characters or, if they don't correspond to any printable character, as The IDE with a Data File Editor Window.

  4. Experiment with any of the following editing features:
    • Edit the file by typing over the existing data.
    • Click Search > Data File Editor and use any of the following methods to search the data file:
      • Data File Find and Replace
      • Find On Current Key

        This option is available for indexed files only. Depending on whether the Data File Editor window is open and, if so, the current key of reference, this option name can also read as Find on prime key and Find on alternate key number n.

      • Goto record
      • Locate Field

        Use this option to find a field within the current record. This option is available only when you have a formatted view available for the data file. To obtain a formatted view involves loading a record layout file which we shall do later on in this tutorial.

    • Become familiar with the information on the status line at the bottom of the IDE. The status line shows various statistics, depending on the file details:
      • Relative record number (relative files only)
      • Length of the selected record, followed by (minimum length, maximum length) if variable length
      • Number of records (sequential files only)
      • Cursor position - line number and column position, both starting at 0
  5. Right-click in the Data File Editor window and select File Information from the context menu. The File Information window displays information such as the file format and organization.
  6. To view more information about the file, click the Keys and the General tabs.
  7. Click Cancel to close the File Information window, but do not close the Data File Editor.
Note: The Data File Editor window might have a pane visible on the right side, displaying A record layout file must be loaded before using this window. We use this option in a later section of this tutorial.