.title maxlength return the maximum length of a char(*) var .psect wes_code pic,usr,con,rel,lcl,shr,exe,rd,nowrt ; dcl maxlength entry(char(*) var) returns(fixed bin(31)); ; dcl a char(80) var; ; dcl b fixed bin(31); ; b = maxlength(a); would return 80 maxlength:: .word 0 ;entry mask -- no regs used beside r0 movzwl @4(ap),r0 ;get length from descriptor ret .end