POS command and call
With DEDBs, you can use the position (POS) command and call to retrieve the location of a specific sequential dependent segment or the location of the last inserted sequential dependent segment. The POS command and call also provides information about unused space.
You can specify only one SSA with the POS request; that is, either the root segment, or a sequential dependent segment. You can use POS to locate a specific sequential dependent segment when you already have a valid position of a root segment. If you do not already have one, you must first issue a separate POS request, or other request, to establish the position of a root segment.
See EXEC DLI keywords and corresponding DL/I CALL command codes and Comparing EXEC DLI commands and DL/I calls for brief comparisons of commands and calls. For further guidance on the differences between commands and calls, see Application programming design in IMS product documentation.
Format of POS command
EXEC DLI POS|POSITION
USING PCB(n)
INTO(data-area)
[KEYFEEDBACK(area)[FEEDBACKLEN(expression)]]
[SEGMENT(name)|SEGMENT((area))]
[WHERE(qualification_statement)[FIELDLENGTH(expression)]]
Format of POS call
CALL 'CBLTDLI' USING POS,dedb_pcb,i/o_area[,ssa]