SELECT SEGMENT
Use to specify the segments you want the EXTRACT command to include in the output file. (If you do not replace or select a segment, it is not included in the output file.)
- If you are selecting more than one segment, you specify the SELECT SEGMENT keyword for each segment you want to select.
- You can only specify SELECT SEGMENT once for each segment name. For example, you cannot specify SELECT SEGMENT twice for SEG01.
If you specify the name of the segment:
- Without specifying a condition using WHEN, the EXTRACT command selects the segment
- And you specify a condition using WHEN (expression), the EXTRACT command selects the segment when the condition in the expression is true

Required or Optional | Optional |
|---|---|
Synonym | None |
Values | If you want to select: All the segments, specify * (If you specify *, you cannot use the WHEN keyword.) A single segment, specify the name of the segment (This segment becomes the current segment that the EXTRACT command uses in the WHEN expressions.) More than one segment, specify the SELECT SEGMENT keyword for each segment you want selected. For information, see WHEN-DELETE-REPLACE-and-SELECT-SEGMENT. |
Default Value | None |
Example |
EXTRACT( DBDNAME ( &dbdname ) OUTPUTFILE( DDNAME( &outdd ) FORMAT ( DEFINED ( &format ) ) SELECT SEGMENT ( &segname ) ) ) |
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*