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
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
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
pure
>>> numbers
>>> >>
>>> >>
>>> >>
>>> >> Lionel B. Dyck <><
>>> >> z Client Architect
>>> >> IBM Corporation - West IMT
>>> >>
>>> >> Mobile Phone: 1-925
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
handle numbers with decimal but works well with pure
>> numbers
>> >>
>> >>
>> >>
>> >> Lionel B. Dyck <><
>> >> z Client Architect
>> >> IBM Corporation - West IMT
>> >>
>> >> Mobile Phone:
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
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
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
--
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.
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"
>>
>>
>>
>>
>>
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
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:
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
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 */
/* -
15 matches
Mail list logo