The Index to Relative Position of Substring routine returns an index, which is the relative position of the first occurrence of a substring in the source string. Format LIB$INDEX source-string ,sub-string
1 – Returns
OpenVMS usage:longword_unsigned type: longword (unsigned) access: write only mechanism: by value The relative position of the first character of the substring if found, or zero if not found. On Alpha and I64 systems, if the relative position of the substring can exceed 2**32-1, assign the return value to a quadword to ensure that you retrieve the correct relative position.
2 – Arguments
source-string OpenVMS usage:char_string type: character string access: read only mechanism: by descriptor Source string to be searched by LIB$INDEX. The source-string argument is the address of a descriptor pointing to this source string. sub-string OpenVMS usage:char_string type: character string access: read only mechanism: by descriptor Substring to be found. The sub-string argument is the address of a descriptor pointing to this substring.