Since an HDS locator only refers to a data object and does not itself contain any data values, it is possible to have several locators referring to the same object. A duplicate locator for an HDS object may be derived from an existing one by a process called cloning, which is performed by the routine DAT_CLONE, as follows:
CALL DAT_CLONE( LOC1, LOC2, STATUS )
This returns a second locator LOC2 which refers to the same data object as LOC1.
Cloning is not required frequently, but it can occasionally be useful
in allowing an application to "hold on" to a data object when a
locator is passed to a routine which may annul
it; i.e. you simply pass the original locator and keep the
cloned copy.
HDS [1ex