80 pts.
 using %char and removing leading blanks
I have a 6 pos serial number, ex(000022) that I need to CAT onto a qualifier of UN. so the final result should be UN22. I would like to do this using %char. I thought I could do it in one line, but I am having issues with not being able to remove the leading blanks. My result ends up being "UN        22".

Software/Hardware used:
AS400 DB2
ASKED: May 5, 2010  8:29 PM
UPDATED: May 5, 2010  9:03 PM

Answer Wiki:
Dobie, You need to include %trim... Result = 'UN' + %trim(%char(srlnbr)) HTH... Scott
Last Wiki Answer Submitted:  May 5, 2010  9:03 pm  by  Scottlewis   15 pts.
All Answer Wiki Contributors:  Scottlewis   15 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _