Editing Data

You can use the Data File Editor to edit both unformatted and formatted data, and indexed or non-indexed data.

Note: If a field or record contains invalid data, it represents the invalid data as asterisks (*). If you select such a field or record, the Data File Editor prompts you for an opportunity to initialize it.

Unformatted Data

When you insert or delete data in the unformatted view, you can potentially create a shift in all of your data thereby causing file corruption. To avoid this, we suggest that you check the Always overtype in unformatted view configuration option. For more information, see Configuring the Data File Editor.

Tip: If you have applied a record layout file, you can see the edits made in the unformatted view applied to the formatted view. To do this, click View > Data File Editor > Refresh Formatted Pane.

Formatted Data

In the formatted view, the editing rules depend on whether you are editing alphanumeric or numeric data.

Numeric data
You always edit numeric fields in overtype mode regardless of configuration settings. Numeric fields can accept numeric data only. When you delete numeric data, each digit is set to zero.
Alphanumeric data
You always edit alphanumeric fields in insert mode regardless of configuration settings; however, you can only insert new characters into an alphanumeric field if the field has space for them. For example, if a PIC X(4) field already has four characters in the field, you must delete these and replace them with the new data. When you delete alphanumeric characters without replacing them, the Data File Editor adds spaces to the right edge of the field.

Indexed Data

When editing an indexed file, exercise caution when making changes to key values:

  • Do not change a key in one record to the same value as another unless duplicate key values are allowed. You should not have duplicate primary keys in a file.
  • If you edit a record area containing a key, be careful not to change the logical position of the record in the file.