Nice pieces of code, especially the TRIMN('') pseudo-constant and the KUPDATE. Thanks for sharing ! What's more, according from the documentation - and to its 1st letter name, as well - the KUPDATE function generously applies to single-byte encoding variable *and* multi-bytes UTF also, therefore full viya enabled. Why not byte off more than you can chew ? ;-)