4
I need to get all five figures before the ~3L
of the XXX:
~1BLB~2B1C~3L~1TPL~2B39~3L~1RAD~2C1D~3L
And so on and so forth.
I already managed to make it takes the first value before the 3L with this select:
db2 "select SUBSTR(FH01XXX.pnrstring,(POSSTR(FH01XXX.pnrstring,'~3L')-5),5) AS PRNR from UFHDBXXX.fh01tXXX'"
I just can’t think of a way for him to "sweep" the string again to catch the others before the 3L
.
Thank you so much for the answers, but they still haven’t solved my problem for 2 reasons:
I get this string from another system, its content is variable, but there will always be this
"~3L"
.I need to think in a while, for they are about 20
"~3L"
, and I need to show the 5 characters before each"~3L"
.