Block action rules

The following rules apply to block actions.

If the block action does not have an end marker, then it ends on the record preceding the next block section. If there are no other block sections in that file, then the block section ends at the last record of the flat file. Examples:
  • The following is an example of a block section that does not have an end marker and is followed by another block section:
    H_ACT_REQ Comment
    //ADD start of block section ADD
    end of block section ADD
    //MOD start of block section MOD

    Comment

  • The following is an example of a block section that does not have an end marker and is not followed by another block section:
    H_ACT_REQ Comment
    //ADD start of block section ADD
    end of block section ADD
    <end of data>  
  • Line actions take precedence over block actions. For example, if you have a block section with modification action of ADD that starts on line 1 and ends on line 5, and you have also specified a DEL modification action on line 3 (within the block section), the line action DEL takes precedence and will be used on line 3, and the block action ADD will apply to the rest of the block:
    H_ACT_REQ Comment
    //ADD start of block section ADD
    ... (within ADD block section)
    DEL (DEL line action takes precedence)
    ... (within ADD block section)
    // end of block section ADD