Offline EXTRACT command


The scenarios in this section show how to use the offline EXTRACT command in conjunction with key related keywords and subcommands.

Collectively, these examples demonstrate all options that are available for customizing the output of a data extract. To exemplify segment selection/exclusion, the scenarios in this section use the segment hierarchy shown on Sample library JCL.

Primary command/scenario task

Subcommand/keyword

Concept/process

Page

EXTRACT

Extract and Output Only Selected Segments

EXTRACT_FORMAT= EXTRACT

EXPAND

EXCLUDE SEGMENT with WHERE

OFILECTL with OAREA

OUTPUT SEGMENT

  • Conditional requirement to expand data
  • Specify extract format
  • Conditionally exclude segments
  • Relationship between excluded data and output data
  • Define output files

EXTRACT

Generate a Subset of Area Data

EXTRACT_FORMAT= HDUNLOAD

INCLUDE SEGMENT

SAMPLE_LIMIT

SAMPLE_INTERVAL

OFILECTL

  • Create output file in HDUNLOAD format
  • Include sampling of root segments of interval and limit criteria
  • Define and dynamically allocate output files

EXTRACT

Extract a Selected Segment and Sort Data

EXTRACT_FORMAT= EXTRACT

SORT

EXPAND

OUTPUT SEGMENT with FIELDS

  • Sort output data
  • Dynamic allocation of output files
  • Expand compressed segments

EXTRACT

Modify Segment Layout during Extract

INPUT_DSN_MASK

EXTRACT_FORMAT= HDUNLOAD

EXPAND

OFILECTL

OUTPUT SEGMENT with FIELDS

  • Dynamic allocation of input areas
  • Create output file in HDUNLOAD format
  • Expand compressed data
  • Define and dynamically allocate output files
  • Manipulate output fields in specified segments

EXTRACT

Create a Customized Extract File Format

EXTRACT_FORMAT=USER

USER_RECORD with BREAK / BEFORE

USER_RECORD with BREAK / AFTER

FIELDS

SEGMENT_RECORD_ PREFIX

  • Create customized format for output file
  • Define multiple header records
  • Define trailer record
  • Specify prefix for segment record

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*