|
Barbara, I would use the XLATE keyword to translate the space back to the zero. Sometimes, you just have to go with what works, and then find a better solution a little while down the road. :-) Or define AlphaNum in the "D" spec initialized as *zeros, and substring or *cat the values in there. -Tracy -----Original Message----- From: Dave [mailto:dschopp@imt.net] Sent: Friday, October 18, 2002 2:52 PM To: rpg400-l@midrange.com Subject: Re: Concatenate text + numeric Barbara Morris <bmorris=G1DYhSM1WHTQT0dZR+AlfA@public.gmane.org> helped spread the news by saying: > Dave wrote: >> >> I need to combine an alpha field with a numeric field to create a >> single alpha-numeric field (makes sense) like thus: >> >> Alpha = "XX" >> Number = 01234 >> >> When I use the statement >> >> EVAL AlphaNum = Alpha + %char(Number) >> >> I end up with AlphaNum = "XX 1234". I've tried >> > > Dave, try > > EVAL AlphaNum = %trim(Alpha) + %char(Number) > Barbara - Wouldn't this would give me "XX1234 " ? That wouldn't be what I'm looking for. -- David Schopp WISDM Team Leader Computers Unlimited _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.