Expanding the records or segments

When using the OS Callable Interface, the records/segments in the HD unload file can be expanded easily by using the standard call parameter list with the Data Packer DPICALL routine.

For more information, see the COBOL example in COBOL.

The standard IMS HD unload data set contains one record for each database segment that is unloaded, plus a header and trailer record. Each record consists of a prefix (not the prefix for the segment) and segment data. The HD unload file record layout is contained in the IMSVS.ADFSMAC(DFSURGUF) macro library.

To expand the records/segments

  1. To determine which segment the unload record is for, interrogate the Segment Name field that is contained in the 35-byte prefix.
  2. Strip off the 35-byte prefix, and only pass the compressed segment data of the record to the EXPAND function for the DPICALL routine.

    The DPICALL EXPAND function provides the expanded record/segment as output.

  3. To create a new, valid HD unload record, append the expanded record/segment data to the 35-byte prefix that you stripped off in Step 2.

Was this page helpful? Yes No Submitting... Thank you

Comments