Back to Notenik Docs


The Notenik Knowledge Base

12.4 Merge Commands ↑

12.4.6 definegroup command

This is the first of several commands that define key fields and then conditionally write output when there is a break on any of those fields.

Up to ten group break fields can be defined. Each must be assigned a number from 1 to 10. Numbers should be assigned sequentially beginning with 1.

Input data should normally be sorted by the same fields used in any definegroup commands.

A definegroup command should normally follow a nextrec command. Each time that a definegroup command is encountered, Notenik stores the value of the variable, and checks for a change in the value for the specified group number.

Definegroup commands should precede ifendgroup and ifnewgroup commands, and should generally be specified in ascending order by group number.

The definegroup command has two operands.


Next: 12.4.7 ifendgroup command