Beginning with Release 7.1, Optim introduces support for Extract and Insert processing of IMS DEDB SDEP segments. This segment type has unique characteristics.
Sequential Dependent Segments (SDEPs)
An IMS Data Entry Database (DEDB) may be defined to include sequential dependent segments (SDEPs). SDEPs have these unique properties:
- They are not sequenced.
- They are inserted first, resulting in a LIFO (last in, first out) sequence when retrieved from the root path using the DL/I API.
- They can be deleted by the IMS SDEP DELETE utility. They cannot be deleted using the IMS DL/I API.
- They cannot be modified.
- They are stored in a separate area of the database.
- They can be read directly (not using the API or the root path) from the separate area of the database (that is, not via the root path) by the IMS SDEP SCAN utility.
SDEP segments are written to the SDEP CIs (Control Intervals). When the SDEP CIs are filled, the SDEP area is re-used serially. (Before the area fills you must run the IMS SCAN and DELETE utilities to make the space available for reuse.)
When IMS commits an SDEP segment, a timestamp is created and associated with the SDEP segment. SDEPs in non-shared databases are written in ascending timestamp order. When a DEDB is shared, each participating IMS pre-allocates SDEP CIs. Thus, for shared DEDBs, IMS writes some SDEP CIs that are not in time order.
Optim's SDEP Support Implementation
Optim utilizes the DL/I API to minimize operational impacts. Due to the unique properties of SDEP segments and the limitations of the DL/I API, there are limitations and restrictions in Optim's support.
Optim does not delete the SDEP segments from the database. This is not supported by the DL/I API. If you select the processing option to delete all rows, the SDEP segments will appear to be deleted when retrieved by the DL/I API, but they will still be present in the SDEP area. You must run the IMS SDEP DELETE utility before running the Optim Insert to restore the SDEP area to its original state.
Optim always restores the SDEP segments into the original order as seen by the DL/I API. However, while Optim does restore the SDEPs in the original timestamp sequence (and physical sequence, except when the database is shared), the original timestamp and physical position is not recreated.
SDEP timestamps and physical position are created by IMS when the SDEP is inserted. When Optim inserts the SDEP segment, the time and physical sequence (if not shared) is recreated, but not the original timestamp and physical location.
When a DEDB is shared, each participating IMS pre-allocates SDEP CIs. Thus IMS writes SDEP CIs that are not in time order in the area dataset. Optim cannot recreate both the physical and time order using the DL/I API. Optim recreates the time order which preserves the root SDEP chain order and is most important to applications processing the SDEP segments read from the SDEP area.
Inserting the data into the destination database should be done all at once rather than incrementally, if it is important to preserve the original order of the SDEP segments. If you need to perform multiple extracts, and want to preserve the original order of SDEP segments, you can do this by:
1. creating incremental Extract files
2. creating a point-and-shoot list from those Extract files
3. using the combined point-and-shoot list to extract from the database
4. then, inserting the resulting Extract File into the database.
Be aware of these restrictions when you are using Optim to Extract or Insert SDEPs:
- Do not perform any updates to relevant database records while extracting or inserting SDEPs
- Do not run the IMS SDEP DELETE utility while extracting or inserting SDEPs.
- Only SDEPs that are chained to a root will be extracted (the API cannot read or process SDEPs from deleted roots).
Requirements and Limitations for Extract and Insert processing
Extract processing requires a second PCB (Program Communication Block) for the DEDB with sensitivity to ROOT and SDEP segments with PROCOPT=G. Other segments can be present and the PCB can have update intent but this may cause unnecessary overhead. If the PCB in the Extract Request has PROCOPT=H, then PROCOPT=H must not be specified in the second PCB due to IMS limitations.
For Insert Processing, run the IMS SDEP DELETE utility to delete the SDEP segments before using the Insert function.
Shown here are sample Insert options:
With Processing Option “Delete Before Insert” set to “Y”
- Requirements: If an SDEP table is included, you must also include a Table Map for the ROOT
- Limitations: Does not delete SDEP segments from SDEP area.
With Processing Option “Process Mode” set to “U” (Update) or "B" (both Update and Insert)
- Requirements: None.
- Limitations: SDEPs cannot be updated. If the Extract File has an SDEP segment, the Table Map for the Insert process must exclude the SDEP segment.
For details on creating IMS Legacy Tables, see the Move User Guide, Chapter 3. Definitions, section for Creating an IMS Legacy Table.
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.