IMS Database Processing
When working with IMS data, there are some slight differences in data handling and presentation. When you request access to IMS data, the specified database is read from the beginning of the database in Get Next order. Segments are retrieved until the requested number of segments per page is read, or the end of the database is encountered. When record layouts and XREF are provided, the primary display mode for segment data is the Formatted Row Mode. Formatted Table Mode is not accessible with IMS data. At the top of the Formatted Row Mode display, the Segment name and Parent segment name are identified. In addition, the current concatenated key is provided as an active hyperlink used to access the Go To Key screen to view formatted key fields for the current segment or navigate to another segment.
The Unformatted Mode is accessed via the Unformatted tab control at the bottom left of the data display. In the Unformatted Mode, segment data is shown in raw form and two additional columns are provided to identify the segment Level and Segment name.
Special IMS Navigation functions are provided to move within the database and within a database record. The commands may be accessed via the Navigation icon in the toolbar at the top of Workbench for Eclipse or via the context menu in the Unformatted Table Mode. IMS navigation options include Go To...Segment choices for Root, Parent, Twin, Next, Previous, and Child. In general, they work only within the scope of the current page of segments.
The Go To Segment By Key command allows you to view the formatted concatenated key of a selected segment and to change the key values to navigate to a new point in the database. When using the Key function, any changes to the current page are saved to the database before processing the Key request. If the requested key is found in the database, the database is repositioned to the new point and segments are retrieved in Get Next fashion to fill a new page 1 of the segment buffer.
The Visualize IMS Structure button near the upper right corner of the data display enables you to view a graphical representation of the IMS data currently being browsed or edited . For more information, see Getting Started with File-AID IMS Visualizer.
Editing commands are limited to Copy, Paste, Insert, Repeat, and Delete. Cut is not supported for IMS. (Use Copy and Delete instead). Copy is limited to a single segment and does not copy any children structures of the copied segment. In the case of Paste, Insert, and Repeat, the current segment key is presented to allow the key for the new segment to be specified. Repeat does not currently repeat any children structures of the specified segment. When you Delete a segment, any subordinate segments to the deleted segment are also flagged for deletion.
Any changes made during an edit session are staged and may be cancelled individually (Undo) or as a group (Undo All). Once you Save your data, or relocate to a new position with Key, or use page controls to load a new page of segments, any updates you have made are committed to the database.
Note that when Inserting or Repeating a segment, the new segment retains its appearance and location in the current page, even if you have specified a new root key which is not within the current segments of the current page. However, once you relocate with Key or with Paging, newly added segments will appear in the proper order in the page display.
IMS Modify Key
If a segment is in Pending insert status, using the concatenated key hyperlink brings up a Modify Key dialog. The Modify Key dialog displays the Segment Name and Layout Member, formats all keys in the path to the current segment, and allows you to edit key fields to change key values.
Inserting New Segments
Select a segment to establish the segment type you want to insert. Invoke the Insert Segment action via the context menu (right click in the left-most column) or toolbar icon . If the segment you selected has a child segment, the child segment is presumed to be the inserted segment type. If the selected segment has no children, the selected segment type is presumed to be the inserted segment type. The key of the new segment appears in the Insert Segment dialog box so that you can specify the key for it. Optionally, you may use the Segment Name field to choose a different segment type from the key screen. If the segment type is defined in the XREF with multiple layouts, the Layout Member field becomes active so that you may choose the layout to use to format the new segment. By default the current segment's layout member is used to format the new segment. Once you accept the new key, the new segment displays in Formatted Row Mode with all non-key fields initialized to default values (blanks, zeros). Fill in all the values for all the fields in the segment to complete the insert.
Newly inserted segments are flagged as Pending Insert and retain a position in the current page at the point in which they were inserted. After you save your updates, newly inserted segments are flagged as Inserted. The segment is not displayed in its new position until you load a new page or use the Key navigation command.
Repeating a Segment
Select a segment to establish the segment you want to repeat. Invoke the Repeat Segment action via the context menu (right click in the left-most column) or toolbar icon. The Key of the current segment displays in the Repeat Segment dialog so that you can specify the key for the new segment. If the segment type is defined in the XREF with multiple layouts, the Layout Member field becomes active so that you may choose the layout to use to format the new segment. By default the current segment's layout member is used to format the new segment. Once you accept the new key, the new segment displays in Formatted Row Mode with all non-key fields initialized to the same contents as the segment you repeated. Change any values you wish to complete the repeat.
Newly repeated segments are flagged as Pending Insert and retain a position in the current page at the point they were repeated. After you save your updates, newly repeated segments are flagged as New. The segment is not displayed in its new position until you load a new page or use the Key navigation command.
Deleting a Segment
Select a segment and use the Delete Segment icon to flag the segment for deletion. if the segment has any subordinate segments, they will also be flagged for deletion. Deleting a root segment deletes all segments in that database record. All segments impacted by a delete are flagged, and you may use the Undo command to remove the delete status. When you Save, relocate via the Key command, or move to a new page, all pending changes are committed to the database.
IMS Navigation
Special IMS Navigation functions are provided to move within the database and within a database record.
The commands may be accessed via the Navigation icon in the toolbar at the top of Workbench for Eclipse or via the context menu in the Formatted Row Mode and Unformatted Table Mode. IMS navigation options include Go To...Segment choices for Root, Parent, Twin, Next, Previous, and Child. In general, they work only within the scope of the current page of segments. Only valid commands are available and active. If a command is not valid for a given segment, it will be disabled. For example, Go To Child is disabled for a segment that has no children segments.
A special navigation command, Go To Segment By Key, allows you to view the formatted concatenated key of a selected segment and to change the key values to navigate to a new point in the database. When using the Key function, any changes to the current page are saved to the database before processing the Key request. If the requested key is found in the database, the database is repositioned to the new point and segments are retrieved in Get Next fashion to fill a new page 1 of the segment buffer.
Go to Segment by Key - Relocating to a Specific Segment
The Go To Segment By Key command allows you to view the formatted concatenated key of a selected segment and to change the key values to navigate to a new point in the database. Optionally, you may choose a different segment type by using the segment name pull-down control and selecting a segment from the list of available segments in the database. All keys in the path needed to access the requested segment are formatted and presented and may be edited. When using the Key function, any changes to the current page are saved to the database before processing the Key request. If the requested key is found in the database, the database is repositioned to the new point and segments are retrieved in Get Next fashion to fill a new page 1 of the segment buffer.
Go to Root
Causes repositioning to the Root segment of the currently displayed or selected segment. If the current segment is a root, no repositioning occurs.
Go to Parent
Causes repositioning to the Parent segment of the currently displayed or selected segment. If the current segment is a root, no repositioning occurs.
Go to Twin
Causes repositioning to the next segment in the database that is the same segment type as the currently displayed or selected segment. For non-root segments, the Twin command is limited to the current database record.
Go to Next
Displays the segment following the currently displayed or selected segment.
Go to Previous
Displays the segment preceding the currently displayed or selected segment.
Go to Child
Causes repositioning to the next segment in the database that is a child of the currently displayed or selected segment.