Re: Formatting a Number with comma's

2013-01-04 Thread Gerhard Postpischil
On 1/4/2013 4:02 PM, John Gilmore wrote: Chapter 8 (Decimal Instructions) of the current PrOp contains full discussions of the EDIT and EDIT AND MARK machine instructions, which perform these operations elegantly, efficiently, and compactly. The OP asked for a way to remove commas from an EBCDI

Re: Formatting a Number with comma's

2013-01-04 Thread Shane Ginnane
On Fri, 4 Jan 2013 16:02:58 -0500, John Gilmore wrote: >Perhaps another point of view will be of some interest. What the hell, here's another ... ... too early in the year for language flames-wars ... ;-) Shane ... -- For IBM

Re: Formatting a Number with comma's

2013-01-04 Thread John Gilmore
Perhaps another point of view will be of some interest. The schemes presented in this thread seem to me to be examples of radically misplaced ingenuity. If I did not know better I should be forced to conclude from them that knowledge of HLASM programming had been lost to this list. Chapter 8 (De

Re: Formatting a Number with comma's

2013-01-04 Thread Mark Zelden
pure >>> numbers >>> >> >>> >> >>> >> >>> >> Lionel B. Dyck <>< >>> >> z Client Architect >>> >> IBM Corporation - West IMT >>> >> >>> >> Mobile Phone: 1-925

Re: Formatting a Number with comma's

2013-01-04 Thread Lionel Dyck
tinationz/index.html/ "Think Inside the z Box" From: Roberto Halais To: IBM-MAIN@listserv.ua.edu, Date: 01/04/2013 12:13 PM Subject: Re: Formatting a Number with comma's Sent by:IBM Mainframe Discussion List Will take numbers with decimal point

Re: Formatting a Number with comma's

2013-01-04 Thread Roberto Halais
handle numbers with decimal but works well with pure >> numbers >> >> >> >> >> >> >> >> Lionel B. Dyck <>< >> >> z Client Architect >> >> IBM Corporation - West IMT >> >> >> >> Mobile Phone:

Re: Formatting a Number with comma's

2013-01-04 Thread Roberto Halais
ne: 1-925-207-4518 > >> E-mail: lionel.d...@us.ibm.com > >> System z: www-03.ibm.com/systems/z/ > >> Linux on z: http://www-03.ibm.com/systems/z/os/linux/ > >> Destination z: http://www-03.ibm.com/systems/z/destinationz/index.html/ > >> > >> "Think Inside the z

Re: Formatting a Number with comma's

2013-01-04 Thread Phil Smith
For ADDING commas, this works pretty reliably, if a tad obscurely: /* Call: "AddCommas(12345,',')" */ AddCommas: procedure parse arg a '.' +0 d, comma a = right(a, ((length(a)+2)%3)*3) do i = 1 to (length(a)%3)-1 a = insert(comma, a, (4*i)-1) end return strip(a) || d

Formatting a Number with comma's

2013-01-04 Thread Phil Smith
That's "commas", btw. John McKown wrote: > nocommas=strip(input,"b",",") You meant: nocommas = space(translate(input, ' ', ','), 0) That is: 1) Translate commas to spaces 2) Remove all spaces from the number ...phsiii --

Re: Formatting a Number with comma's

2013-01-04 Thread Mark Zelden
On Fri, 4 Jan 2013 10:58:57 -0800, Lionel Dyck wrote: >The 'extra' comman before the .12 on the second example as just that the >code does not handle numbers with decimal but works well with pure numbers > > Okay, then if someone needs it to handle decimals also, I suggest looking on TSO-REXX.

Re: Formatting a Number with comma's

2013-01-04 Thread John McKown
l.d...@us.ibm.com >> System z: www-03.ibm.com/systems/z/ >> Linux on z: http://www-03.ibm.com/systems/z/os/linux/ >> Destination z: http://www-03.ibm.com/systems/z/destinationz/index.html/ >> >> "Think Inside the z Box" >> >> >> >> >>

Re: Formatting a Number with comma's

2013-01-04 Thread Bill Ashton
From: Mark Zelden > To: IBM-MAIN@listserv.ua.edu, > Date: 01/04/2013 10:54 AM > Subject:Re: Formatting a Number with comma's > Sent by:IBM Mainframe Discussion List > > > > On Fri, 4 Jan 2013 10:43

Re: Formatting a Number with comma's

2013-01-04 Thread Lionel Dyck
om System z: www-03.ibm.com/systems/z/ Linux on z: http://www-03.ibm.com/systems/z/os/linux/ Destination z: http://www-03.ibm.com/systems/z/destinationz/index.html/ "Think Inside the z Box" From: Mark Zelden To: IBM-MAIN@listserv.ua.edu, Date: 01/04/2013 10:54 AM Subject:

Re: Formatting a Number with comma's

2013-01-04 Thread Mark Zelden
On Fri, 4 Jan 2013 10:43:18 -0800, Lionel Dyck wrote: >I ran across this code from Doug Nadel several years ago and hope that >y'all will find it useful. > > > /* - */ > /* number format code thanks to Doug Nadel

Formatting a Number with comma's

2013-01-04 Thread Lionel Dyck
I ran across this code from Doug Nadel several years ago and hope that y'all will find it useful. /* - */ /* number format code thanks to Doug Nadel */ /* -