Using the reformat definition editor


In this example, you use the Reformat Definition Editor to define the new format of the FASAMP.EMPLOYE2 data set. Using the editor, complete the following tasks:

  • Initialize new and existing fields with literals.
  • Define selection criteria to select only those records that meet the criteria for reformatting.

The Reformat Definition Editor screen as shown in the following figure, is divided into two parts: the source record layout fields are located in the top portion of the screen and the target record layout fields are located in the bottom portion of the screen.

Reformat Definition Editor

image2021-6-18_12-30-53.png

Because we asked for Move Corresponding = Y, target fields are pre-filled with references to corresponding source layout fields by field name. For example, /EMP-NUMBER in the target field EMP-NUMBER means to move data from source field name EMP-NUMBER.

When you execute your reformat, moves are performed using the rules of COBOL. If an alphanumeric field is moved to a larger field, blanks are added on the right. If move to a shorter field, data is truncated to the length of the target field.

Scrolling

You can scroll the data in both the source and target windows of the editor independently or at the same time.

The location of the cursor determines which window(s) is scrolled. If the cursor is located within the source layout fields, then only the upper window is scrolled. The lower window only scrolls when the cursor is located in the lower window fields. If the cursor is on the command line, both windows scroll.

The Existing (Source) Record Layout (Upper Window)

The source window displays information about the source record layout. It is in this window that you specify the field selection criteria to use to select specific records to be reformatted.

The New (Target) Record Layout (Lower Window)

Use the target window fields to specify which source fields to use as a source of data. Optionally, you can specify a constant for a target field to initialize new fields or to mask sensitive data during the reformat.

Field references are specified in the Data Area to the right of each target field, by entering a slash (/) followed by the field name or number.Constants are specified by entering a string of decimal digits for numeric fields or a quoted string for alphanumeric fields.

Notice that on entry to the Reformat Editor, the target fields already contain field references (for example, /EMP-NUMBER, /EMP-FIRST-NAME, etc.). These references are automatically generated when you specify a value of YES in the Move corresponding field.

Commands EX, SAVE, CANCEL, END

Use the following commands from the Reformat Definition Editor:

SAVE

Saves the reformat definition member in the reformat data set.

EX

Saves the reformat definition and displays either the online or batch Execute Reformat screen.

END

Saves the reformat definition and redisplays the Reformat Definition screen.

CANCEL

Terminates the reformat definition session without saving any changes you made to the reformat definition.

Scrolling both windows

When the cursor is positioned in the command line and you specify a scrolling command or press a scrolling PF key (for example: PF8=DOWN, PF7=UP), File-AID scrolls both windows in the reformat definition editor.

Reformat Editor - DOWN command Scrolling Both Windows.

image2021-6-18_12-32-13.png

Steps:

  1. Position the cursor in the command line (HOME).
  2. Press the PF key for DOWN (PF8),
    or
    Type the command DOWN in the COMMAND field and press Enter.

Result of scrolling DOWN both windows.

Reformat Definition Editor. Establishing Constants in the Target Layout.

image2021-6-18_12-33-8.png

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*