If the third argument is not present, SUBSTRING should return from <startpos> to the end of the string.
But with long text blobs, it returns a maximum of 32767 characters, as the following query demonstrates:
with q (s) as (
select cast(cast('abc' as char(32767)) as blob sub_type text)
|| cast('def' as char(32767))
|| cast('ghi' as char(32767))
r (sub_for, sub_nofor) as (
select substring(s from 8000 for 120000),
substring(s from 8000)
select char_length(s), right(s, 3),
char_length(sub_for), right(sub_for, 3),
char_length(sub_nofor), right(sub_nofor, 3)
from q cross join r
The result is (98304, 'jkl', 90305, 'jkl', 32767, ' ').
Columns 5 and 6 should be the same as 3 and 4: 90305, 'jkl'.