Segment selection

Segment selection is done by using the SELECT subcommand.

The selection criteria can be based on:

  • Key value
  • Segment data content (On the basis of a positional offset, operator, and data type)

You can specify multiple comparisons per the SELECT subcommand by using the WHERE keyword. Each comparison supports:

  • EQ, NE, GT, GE, LT, LE, ==, <>, >, >=, =>, <, <=, and =< operations
  • Hexadecimal, character, fullword, and packed decimal data type

If you specify any comparison with the SELECT subcommand for a compressed segment, you must expand the segment with the COMPRESS=NO keyword.

The same segment name can appear in more than one SELECT subcommand. Each SELECT subcommand specification is evaluated independently for a match, which allows for Boolean OR logic between SELECT subcommands. You can do the following:

  • Skip a number of segment occurrences
  • Stop selection after a number of segment occurrences
  • Select every Nth occurrence of a segment

If the SELECT subcommand selection criteria are met, the selected segments, their dependents, and the parent hierarchy chain above the segments are forwarded for output processing.

If no SELECT subcommand is specified, all root segments and their dependent segments are selected, including SDEP segments between logical begin and logical end in the DMAC.