Editing in character and vertical formatted mode


The following editing procedures apply to character and vertical formatted mode editing:

  • Combining data sets
  • Overwriting data sets and creating new members
  • Modifying record lengths in variable-blocked data sets.

Combining data sets

Data records from multiple data sets or members can be combined by editing one data set and using the COPY or MERGE primary command to copy data from another file. The COPY command inserts records from another file at a specified location in the data set (see COPY). The MERGE command copies records from another data set and inserts them in correct key order in the keyed data set being edited (see MERGE). The records to copy/merge are specified on the File-AID Edit Copy screen (Edit COPY Screen).

Overwriting Data sets and Creating New Members

Records from the edit data set can be used to overwrite an existing data set or member using the REPLACE command or to create a new member of an existing PDS using the CREATE command. In both cases, the records of the edit data set to be written are specified with the C (copy) line command.

The attributes of the destination data set must be compatible with the data set being edited. A CREATE or REPLACE command is not allowed under the following conditions:

  • The record format or LRECL would cause record truncation or require record padding.
  • The destination data set is keyed, and the relative key position (RKP) and key length (KEYLN) are not identical with the edit data set.
  • The destination data set is keyed and there are currently duplicate records or sequence errors in the edit data set.

See CREATE (CRE) and REPLACE for more information.

Modifying Record Lengths in Variable-Blocked Data sets

You can modify the length of a record within a variable-blocked data set by using the BNDS (bounds) line command and the left “(“ or right “)” shift characters. The basic procedure for modifying the record length is as follows:

  1. Enter the BNDS command in the sequence number field.
  2. Move the left bounds marker “<“to the byte in the record that corresponds with the modification start point.
  3. Enter a shift line command “(“or ")".

When you are expanding the length of a record the new bytes are initialized to the default pad character as defined in your profile. To lengthen the record, enter the shift right character ")" and the number of bytes to expand. To modify a block of records use the block shift characters "((" and "))".

Example 1

Add 15 bytes to the end of the record.

Before:
=BNDS>    <         >
)15 01 ABC
V      CCC
V      123
After:
=BNDS>    <         >
000001 ABC
V      CCC000000000000000
V      123000000000000000

Example 2

Remove 5 bytes from the middle of the record.

Before:
=BNDS>            <                >
(5 001 THIS RECORD IS VERY LONG
V      ECCE4DCCDCC4CE4ECDE4DDDC
V      389209536940920559803657
After:
=BNDS>            <                 >
000001 THIS RECORD IS LONG
V      ECCE4DCCDCC4CE4DDDC
V      3892095369409203657

To cause the record length to be shortened when shifting left, the right bound ">" must be at least one byte beyond the current record length. If the right bound is not located beyond the last byte of the record being shifted, then the record length does not change. A record cannot be lengthened (shifted right) beyond the right bound or the maximum record length.

In formatted mode, overtype the LENGTH value on line 3 to change the record length. You can also overtype the value of a field that is the object of an OCCURS DEPENDING ON clause.

 

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