The varying-length character type (available in V4R2 and above) can simplify string-handling code as well as make it more efficient.
Use the Keyword “VARYING” on the declaration line (D-Spec) of the character variable.
Example:
Without variable length fields
C EVAL Name = %TRIMR(Lib) + '/' +
C %TRIMR(File) + '(' +
C %TRIMR(Mbr) + ')'
With variable length fields
C EVAL Name = Lib + '/' +
C File + '(' +
C Mbr + ')'
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment