Controlling content of segment record prefixes and suffixes

When you select EXTRACT_FORMAT=USER as the general extract formatting option, you can also control the content of the segment prefix and suffix by using the SEGMENT_RECORD_PREFIX and SEGMENT_RECORD_SUFFIX keywords.

The SEGMENT_RECORD_PREFIX keyword specifies a list of expressions. The value of each expression is evaluated and placed into the prefix portion of the segment output record in the order that the expressions are specified. If the SEGMENT_RECORD_PREFIX keyword is omitted, the output record contains no data (zero bytes) in the prefix when EXTRACT_FORMAT=USER has been specified.

The SEGMENT_RECORD_SUFFIX keyword specifies a list of expressions. The value of each expression is evaluated and placed into the suffix portion of the segment output record in the order that the expressions are specified. If the SEGMENT_RECORD_SUFFIX keyword is omitted, the output record contains no data (zero bytes) in the suffix when EXTRACT_FORMAT=USER has been specified.

For details about the operations and syntax of the SEGMENT_RECORD_PREFIX and SEGMENT_RECORD_SUFFIX keywords and syntax rules for coding expressions, see the Fast Path/EP Series Reference Manual documentation Open link .

The example in the following figure uses the SEGMENT_RECORD_PREFIX keyword to generate a simple prefix for the output segment records. The prefix will contain the segment name and its concatenated key value.

EXTRACT DBD=
dbdname, IAREA=ALL,EXTRACT_FORMAT=USER,
  SEGMENT_RECORD_PREFIX=(SEGMENT_NAME,SEGMENT_CKEY)

The example in the following figure uses the SEGMENT_RECORD_SUFFIX keyword to generate a simple suffix for the output segment records. The suffix will contain the segment code and its hierarchical level.

EXTRACT DBD=dbdname, IAREA=ALL,EXTRACT_FORMAT=USER,
  SEGMENT_RECORD_SUFFIX=(SEGMENT_CODE,SEGMENT_LEVEL)


This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Comments