Path Calls


Path calls are used to retrieve/ update an entire path of the hierarchy. Sometimes these can be used to retrieve/update the portion of a path. A path call is requested by using the Command Code ‘D’. Lets discuss what is command code D at the end of this topic. The path calls are basically three types.

  1. Retrieval path calls.
  2. Insert path calls.
  3. Update path calls.

Retrieval Path Calls:


A retrieval path call (GU, GHU, GN, or GHN) is used to read some/ all segments in a hierarchical database path.DL/I place the segments in the io-area. The segments can be placed like one after the other and from left to right.

The io-area length must be at least as long as the sum of the segment lengths to be retrieved. To retrieve a segment in the path, command code D needs to be used in SSA.

To skip a segment in the path, command code ‘-’ in SSA. DL/I will almost always retrieve the lowest level segment in the path and no ‘D’ command code is required on the lowest level.

Path calls are more efficient when application program has several calls to retrieve segments in a path. If the length of a higher level segment changes, io-area length should modify accordingly to accommodate it. Not only higher level, if any segment level changes at any length, IO-area length should change accordingly.

Insert Path Calls:


An insert path call (ISRT) is used to insert an entire path of segments, or selected segments in a path with one path call.DL/I expect the segment in the io-area.

The segments must be in the order of the hierarchical path.Each segment length must be exactly as long as defined in the DBD. The entire path must be inserted. To insert a path of segments, command code D in SSA of the first segment to be inserted.

Update Path Calls:


A replace path call (REPL), is used to replace an entire path of segments in single shot.DL/I expect the segments in the io-area.The segments in the IO-AREA should be one after the other and from left to right.

The segments must be in same order of in the hierarchical path.Each segment must be exactly as long as defined in the DBD. The entire path does not have to be replaced.

The command code ‘N’ is used to indicate segments that are not required to be update.The REPL must have unqualified SSAs.DL/I will not update segments with SSA have the command code ‘N’.

Path Call Usage:


One call to IMS can accomplish the task done by several calls. The application program becomes less ‘data independent’ with path calls.

Command Code ‘D’:


The ‘D’ command code mainly used to make a path call. A path call processes down in the database hierarchy. Application program can use path call to process several segments in the hierarchical path.

The application program can retrieve, insert and update segments with one path call to IMS. The application program can update the segments as a group and can selectively update segments in the path call using a different command code.