HELP: Database unload format selector [NONE] TYPE: NUMBER SYNTAX: UNLOAD=NONE/IMSL/IMSS/IMSH/IHDU/IMSL-BOTH/IMSL-WLEN/IMSL-WOLN/IMSS-BOTH/IMSS-WLEN/IMSS-WOLN/IHDU-BOTH/IHDU-WLEN/IHDU-WOLN/DB2U/DB2S/DB2IX
Selects the database unload format for the binary input files. When set to any value other than NONE, each FORMAT schema file is wrapped in an unload envelope: a prefix block is prepended to every data row and an IMS_EOF catch-all drain row is appended last to absorb the end-of-file sentinel record.
No unload wrapping. The binary input is treated as a plain fixed-block (FB) file and each record is matched directly against the row specs generated from the FORMAT schema files. This is the default.
IMS DFSURGU0 LONG format as produced by IBM z/OS DFSURGU0 with the LONG option. Each logical record begins with a 20-byte prefix:
Offset Size Field Description
------ ---- ------- ------------------------------------------------
0 2 LL Total logical record length (big-endian halfword,
includes LL and ZZ fields)
2 2 ZZ Reserved, must be X'0000'
4 1 PCF Process control flag: X'04' = root segment,
X'00' = end-of-file sentinel
5 1 PEF Process event flag, reserved
6 8 SEGNAM Segment name (EBCDIC, space-padded to 8 bytes)
14 2 SEQOFF Sequence field offset (big-endian halfword)
16 2 SEQLEN Sequence field length (big-endian halfword)
18 2 RES Reserved
20 n/a Data Segment data payload (record layout per copybook)
For each FORMAT schema file, one IMS_<SEGNAME> row spec is generated. The SEGNAM value used for matching is derived from the first 8 characters of the COBOL 01-level name (space-padded). For example, a copybook with a top-level record named BCSV-CHAR-REC produces a row spec matched against SEGNAM = 'BCSV-CHA'.
The input file must be RECFM=VB. The JCL LRECL must be set to the maximum logical record length (20-byte prefix plus the largest segment payload). QSAM automatically strips the 4-byte RDW before the program sees each logical record.
IMS DFSURGU0 SHORT format as produced by IBM z/OS DFSURGU0 with the SHORT option. Each logical record begins with a 4-byte prefix:
Offset Size Field Description
------ ---- ------- ------------------------------------------------
0 2 LL Total logical record length (big-endian halfword,
includes LL and ZZ fields)
2 2 ZZ Reserved, must be X'0000'
4 n/a Data Segment data payload (record layout per copybook)
For each FORMAT schema file, one row spec is generated. Because the SHORT format carries no SEGNAM field, row specs are discriminated by record length (fixlen) only. An IMS_EOF catch-all drain row is appended last in the table to silently absorb the end-of-file sentinel record (LL=X'0004', ZZ=X'0000' -- a 4-byte record with no data payload).
The input file must be RECFM=VB. The JCL LRECL must be set to the maximum logical record length (4-byte prefix plus the largest segment payload). QSAM automatically strips the 4-byte RDW before the program sees each logical record.
The SHORT format does not carry a SEGNAM field. Without a segment name discriminator it is not possible to distinguish between multiple copybooks (segment types) that have the same record length. Use IMSL instead whenever the input database contains more than one segment type, or when any two copybooks have the same record length and cannot otherwise be told apart.
IMS HD Unload (DFSURGL0) format -- a physical database image produced by IBM z/OS DFSURGL0 that contains each segment with its full IMS segment prefix. Each logical record in the VB file begins with a 36-byte physical prefix:
Offset Size Field Description
------ ---- ----------- -------------------------------------------
0 2 SEG-CODE IMS segment code (big-endian halfword; order
in the DBD, e.g. 0x0180 for first segment)
2 2 SEG-PRE-LEN Length of the segment prefix
4 2 ROOT-KEY-LEN Length of the root key
6 8 DB-KEY Database key (EBCDIC)
14 20 POINTERS Pointer block (twin-forward, child, etc.)
34 2 MARKER Delete/marker byte pair
36 n/a Data Segment data payload (record layout per copybook)
For each FORMAT schema file, one IHDU_<SEGNAME> row spec is generated with the 36-byte prefix expressed as drain columns. Row routing uses record-length disambiguation (each segment type in the DBD has a distinct payload length in Wave 1). An IHDU_UNKNOWN catch-all drain row is appended last in the table to silently absorb header/trailer frames with SEG-CODE 0x0080 (DB header) or 0x0098 (DB trailer).
The input file must be RECFM=VB. The JCL LRECL must cover the largest segment payload plus the 36-byte prefix plus the 4-byte RDW. QSAM automatically strips the RDW before the program sees each logical record. Same-record-length segments from different DBD entries are supported via an optional Integer-isNext discriminator (Wave 2b, on request).
IMS DFSURGU0 LONG format, Hewlett-Packard variant. Not yet supported.
Db2 for z/OS DSNUTILB UNLOAD FORMAT UNLOAD. Variable-blocked (RECFM=VB) output from the Db2 UNLOAD utility. Each logical record (after stripping the 4-byte RDW) begins with a 2-byte big-endian OBID (Object Identifier), followed by column data. Nullable columns carry a 1-byte inline null indicator (X'FF'=NULL, X'00'=not null) immediately before the column data. VARCHAR columns have a 2-byte big-endian length prefix followed by the actual data bytes. Not yet supported.
Db2 for z/OS DSNTIAUL sample program output. Fixed-blocked (RECFM=FB). All null indicators are grouped at the beginning of each row (one byte per nullable column in SELECT order; X'6F'=NULL, X'00'=not null), followed by the column data. VARCHAR columns are padded with X'00' to their maximum declared length (no length prefix). Not yet supported.
Db2 PC/IXF (PC Version of the Integration Exchange Format). A self-describing format containing H (header), T (table), C (column descriptor), and D (data) records with the file schema embedded in the C records; no external copybook is required. Not yet supported.
The global UNLOAD= parameter sets the unload envelope for all FORMAT
copybooks at once. When a single BCSV run must process copybooks that
require different unload wrappers, each FORMAT value may carry a
trailing /%<token> suffix (e.g. FORMAT='PART.cpy/%imsl') that
overrides the global UNLOAD= for that copybook only. The supported
tokens are none, imsl, imss, and ihdu (case-insensitive).
A FORMAT value without a /% suffix inherits the global UNLOAD= value.
See the FORMAT parameter manual page for the full syntax and rules.
NONE - Plain fixed-format input, no unload wrapper [default]IMSL - IMS DFSURGU0 LONG format (IBM z/OS): 20-byte prefix, RECFM=VB, SEGNAM discriminator; both framings (=IMSL-BOTH)IMSS - IMS DFSURGU0 SHORT format (IBM z/OS): 4-byte prefix (LL+ZZ), no SEGNAM; fixlen disambiguates rows; both framings (=IMSS-BOTH)IMSH - IMS DFSURGU0 LONG format (HP variant, not yet supported)IHDU - IMS HD Unload (DFSURGL0): physical DB image, 2-byte SEG-CODE prefix, RECFM=VB; SEG-CODE routing (Wave 2); both framings (=IHDU-BOTH)IMSL-BOTH - IMS LONG: emit both the with-prefix and without-prefix (stripped) rowsIMSL-WLEN - IMS LONG: emit only the with-prefix row (fixlen includes the 20-byte prefix)IMSL-WOLN - IMS LONG: emit only the without-prefix row (read.auto-stripped framing)IMSS-BOTH - IMS SHORT: emit both the with-prefix and without-prefix (stripped) rowsIMSS-WLEN - IMS SHORT: emit only the with-prefix row (fixlen includes the 4-byte prefix)IMSS-WOLN - IMS SHORT: emit only the without-prefix row (read.auto-stripped framing)IHDU-BOTH - IMS HD Unload: emit both the with-prefix and without-prefix (stripped) rowsIHDU-WLEN - IMS HD Unload: emit only the with-prefix row (fixlen includes the 36-byte prefix)IHDU-WOLN - IMS HD Unload: emit only the without-prefix row (read.auto-stripped framing)DB2U - Db2 DSNUTILB UNLOAD FORMAT UNLOAD: RECFM=VB, 2-byte OBID prefix, inline null indicator X'FF' (not yet supported)DB2S - Db2 DSNTIAUL sample program: RECFM=FB, grouped null indicators X'6F' at row front (not yet supported)DB2IX - Db2 PC/IXF self-describing format: H/T/C/D records with embedded schema (not yet supported)