Information
Space announcement: BMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.

Line Commands to Edit Index Mode


Line commands are entered in the two-position field next to the appropriate segment line. Line commands enable you to insert, delete, and repeat segments; to change your current position in a database; and to select segments for Formatted or Unformatted editing. Following are the valid Index mode line commands:

Browse/Edit Mode

K

Displays the Key Specification screen

S

Enters the Formatted mode

SU

Enters the Unformatted mode

Edit Mode Only

I

Insert

D

Delete

R

Repeat

RA

Repeat All

The following rules apply to the use of line commands:

  • Only one occurrence of the I, R, RA, K, S, or SU command can be entered at one time.
  • Any number of D line commands can be entered simultaneously, with or without an occurrence of one of the other line commands.
  • D line commands are processed before any other line command.
  • No other line command can be entered on any dependent segment line when a D line command is entered on a segment line.
  • The next hierarchical segment occurrence after the last segment deleted becomes the new current segment if all of the segments currently displayed are deleted at the same time.
  • Any line commands entered at the same time as a CANCEL primary command are ignored. The CANCEL primary command is always executed before processing the remainder of the screen.
  • A primary command is ignored if the K, S, or SU line command is entered with any primary command other than CANCEL.
  • Other line command and primary command combinations are valid. Line commands are always processed before the primary command, except as noted for CANCEL.

Key (K) Command

The K line command enables you to change your position in a database from the current segment position to any other segment position. You can enter the K line command next to any segment displayed on the Index screen. After K is entered and ENTER is pressed, the Key Specification screen is displayed, showing the key values for each segment type in the hierarchical path to the segment where the K was entered. On the Key Specification screen, you can specify key values for any of the displayed Key Value fields. You can reposition only to another occurrence of the same segment type as the segment where K was entered. Upon returning to the Index screen, the segment whose fully concatenated key was specified becomes the new current segment displayed on the first line of the screen body.

See topic Key Specification for an explanation of how to use the Key Specification screen.

Select Formatted (S) Command

The S line command enables you to select any segment occurrence on the Index screen and switch to Formatted mode with that segment. When you enter Formatted mode with your selected segment, that segment becomes the new current segment.

Select Unformatted (SU) Command

The SU line command enables you to select any segment occurrence on the Index screen and switch to Unformatted mode with that segment. When you enter Unformatted mode with your selected segment, that segment becomes the new current segment.

Insert (I) Command (Edit only)

The I line command enables you to insert a single occurrence of any segment type displayed on the Index screen. You can enter the I line command next to any segment displayed on the screen. The segment type inserted is restricted to the same segment type as the segment line where the command was entered. After I is entered and ENTER pressed, the Key Specification screen is displayed. On the Key Specification screen, you can specify the fully concatenated key of the segment to be inserted. When you leave the Key Specification screen and return to the Index screen, the new segment is inserted in the database.

The execution of an insert line command does not cause your current segment position to change. If, according to the fully concatenated key specified on the Key Specification screen, the newly inserted segment fits onto the display under the current segment, the new segment is displayed when you return to the Index screen. If the new segment does not fit into the current hierarchy displayed, the segment is inserted in the database but not displayed on the Index screen.

When inserting a segment, File-AID for IMS first attempts to do a formatted insert (as described in INSERT Command (Edit only). The following instances prevent File-AID for IMS from performing a formatted insert:

  • The segment layout for the segment type to be inserted was not successfully defined to File-AID for IMS using the Batch XREF Update Facility.
  • When inserting a multiple record type segment (one defined by multiple segment layouts), File-AID for IMS validates the record type values contained in the segment on the line where the I command was entered. If the record type values are valid, the corresponding segment layout defined to File-AID for IMS using the Batch XREF Update Facility is used for a formatted insert and the record type values are pre-formatted in the new segment. If the record type values are not valid, the formatted insert is not performed.
  • If the segment being inserted is fixed length and the corresponding segment layout does not match the segment’s length.
  • If the segment being inserted is variable length and the corresponding segment layout is either shorter than the segment’s minimum length or longer than the segment’s maximum length.

When File-AID for IMScannot perform a formatted insert of the new segment, it performs an unformatted insert as described in INSERT Command (Edit only).

Delete (D) Command (Edit Only)

The D line command enables you to delete segment occurrences from a database while in Index mode. You can enter the D line command next to any segment displayed on the screen. When D is entered, the segment and all dependent segment occurrences are deleted. If you delete the first segment displayed (the current segment), the next segment occurrence that is not a dependent of the first segment becomes the new first segment displayed (the new current segment). If you delete the last segment displayed, the next segment occurrence that is not a dependent of the last segment appears on the last segment line.

If the Integrity Check feature is active and the segment was updated by a concurrent user, File-AID for IMS automatically displays the current version of the segment again. This process enables you to review the current segment before deleting it.

Repeat (R) Command (Edit only)

The R line command enables you to repeat any single segment occurrence in a database. You can enter the R line command next to any segment displayed on the screen. The segment line where you enter the R is the segment occurrence that is repeated. After R is entered and ENTER is pressed, the Key Specification screen is displayed showing the key values for each segment type in the hierarchical path to the segment where R was entered. On the Key Specification screen, you can specify the fully concatenated key for the new segment to be created. Upon returning to the Index screen, the new segment is inserted. All non-key field data in the new segment are copied from the segment where R was entered.

Your current position does not change when you execute an R line command in Index mode. When you return to the Index screen from the Key Specification screen, the newly created segment may or may not be displayed, depending on the fully concatenated key specified.

Repeat All (RA) Command (Edit only)

The RA line command enables you to repeat any hierarchical substructure in a database. You can enter the RA line command next to any segment displayed on the screen including a root segment. The segment line where RA is entered is the parent of the hierarchical substructure to be repeated. After RA is entered and ENTER is pressed, the Key Specification screen is displayed showing the key values for each segment type in the hierarchical path to the segment where RA was entered. On the Key Specification screen, you can specify the fully concatenated key for the parent of the new hierarchical substructure to be created. Upon returning to the Index screen, the new parent segment and its substructure are inserted. All nonkey field data in the new parent segment are copied from the segment where the RA was entered. All data in the children under the new parent are copied from the children under the segment where RA was entered.

Your current position does not change when you execute an RA line command in Index mode. When you return to the Index screen from the Key Specification screen, the newly created parent segment may or may not be displayed, as well as some or all of its children, depending on the fully concatenated key specified.

Related topics

 

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

BMC Compuware File-AID for IMS 21.01