|
Hello John, You wrote: >I would like to put a number in an error message as a substitution parameter. I'll edit it into a character field first, Don't bother. The message handler will do this for you automatically when you send the message. >Then... >I want it to read nice, ie. >if the number is 115090 (say 11 long, 2 decimal) >i want it to appear in string as: 1,150.90 but >in a readable fashion The message handler will do this for you automatically when you send the message. >GOOD...: Yadda yadda 1,150.90 sumtin else. >NO GOOD: Yadda yadda 1,150.90 sumtin else. >Another time the number might be 187.25 >I don't want to end up with: >NO GOOD: Yadda yadda 187.25 sumtin else. >which looks even more 'unprofessional'. ADDMSGD MSGID(ABC1234) MSG('Yadda yadda &1 sumtin else.') + FMT((*DEC 11 2)) Read the help text for the FMT parameter. Create a data stucture in your program that maps the substitution data: D msgDta DS D value 11P 2 and use the data structure as substitution data when sending the message. A piece of the proverbial ... Regards, Simon Coulter. -------------------------------------------------------------------- FlyByNight Software AS/400 Technical Specialists http://www.flybynight.com.au/ Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\ Fax: +61 3 9419 0175 mailto: shc@flybynight.com.au \ / X ASCII Ribbon campaign against HTML E-Mail / \ --------------------------------------------------------------------
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.