This topic deals with DL/I concepts related to database I/O only. DL/I calls are also used in IMS™ to handle terminal and program-to-program communications. See Using non-database PCBs in DL/I programming.
The position pointer is set on any successful DL/I call to point to the segment following the last segment accessed on the call. If no calls are issued, the current position indicates the start of the database. If the end of database condition is encountered, the current position becomes the start of the database.
As DL/I continues scanning a database for a segment that satisfies the SSA list criteria, DL/I accesses each root segment in the order it appears in the database. When DL/I finds a root segment, it accesses all the dependents of the root before scanning the next root. As DL/I scans the dependent segments, it first tries to read the next segment at the next lower level. If there is not a lower level, it reads the next segment at the same level. If there are no more segments at the current level, it returns to the previous level to search for the next segment. This process is called the “top to bottom, left to right” search order.
Related concepts:
DL/I database support