For Programmers: Free Programming Magazines  


Home > Archive > Cobol > April 2008 > Re: Decimal versus binary arithmetic was Re: J4 - presentation/discussion on "Fu









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Decimal versus binary arithmetic was Re: J4 - presentation/discussion on "Fu
William M. Klein

2008-04-02, 6:59 pm

No, I want it compiled with
NOSNKRS
not
SNKRS

<joke>

Thanks for that. I didn't really think it would do it in binary, but I did
wonder if COMP-5 would change things.

--
Bill Klein
wmklein <at> ix.netcom.com
<docdwarf@panix.com> wrote in message news:ft0kik$60$1@reader2.panix.com...
> In article <WqCIj.292096$Gl5.205581@fe02.news.easynews.com>,
> William M. Klein <wmklein@nospam.netcom.com> wrote:
>
> Given:
>
> WORKING-STORAGE SECTION.
> 01 NUMERATOR VALUE 1 COMP-5 PIC 9(9).
> 01 DENOMINATOR VALUE 5 COMP-5 PIC 9(9).
> 01 QUOTIENT COMP-5 PIC 9(9)V9(4).
> *
> PROCEDURE DIVISION.
> *
> COMPUTE QUOTIENT = NUMERATOR / DENOMINATOR.
> DISPLAY QUOTIENT.
> GOBACK.
>
> ... compiled with
>
> //COB EXEC PGM=IGYCRCTL,
> // PARM='SIZE(MAX),LIB,MAP,DYNAM,LIST,
> // XREF,OPT,FLAG(I,I),NUMPROC(PFD),'
>
> ... and using PP 5655-G53 IBM Enterprise COBOL for z/OS 3.4.1, the result
> I get is:
>
> 000012 COMPUTE
> 0002B6 5840 912C L 4,300(0,9)
> 0002BA 5830 4008 L 3,8(0,4)
> 0002BE 1F22 SLR 2,2
> 0002C0 5870 4000 L 7,0(0,4)
> 0002C4 1F66 SLR 6,6
> 0002C6 5D60 C000 D 6,0(0,12)
> 0002CA 4E70 D108 CVD 7,264(0,13)
> 0002CE F154 D0FC D10B MVO 252(6,13),267(5,13)
> 0002D4 4E60 D108 CVD 6,264(0,13)
> 0002D8 9110 D101 TM 257(13),X'10'
> 0002DC D204 D101 D10B MVC 257(5,13),267(13)
> 0002E2 4780 B0BE BC 8,190(0,11)
> 0002E6 9601 D105 OI 261(13),X'01'
> 0002EA GN=15 EQU *
> 0002EA D203 D0F8 C008 MVC 248(4,13),8(12)
> 0002F0 F070 D0FE 0004 SRP 254(8,13),4(0),0
> 0002F6 5D20 C000 D 2,0(0,12)
> 0002FA 4E30 D118 CVD 3,280(0,13)
> 0002FE F154 D108 D11B MVO 264(6,13),283(5,13)
> 000304 4E20 D118 CVD 2,280(0,13)
> 000308 9110 D10D TM 269(13),X'10'
> 00030C D204 D10D D11B MVC 269(5,13),283(13)
> 000312 4780 B0EE BC 8,238(0,11)
> 000316 9601 D111 OI 273(13),X'01'
> 00031A GN=16 EQU *
> 00031A FDD5 D0F8 D10C DP 248(14,13),268(6,13)
> 000320 F897 D120 D0F8 ZAP 288(10,13),248(8,13)
> 000326 960F D129 OI 297(13),X'0F'
> 00032A D207 D118 A074 MVC 280(8,13),116(10)
> 000330 D204 D11B D125 MVC 283(5,13),293(13)
> 000336 4F20 D118 CVB 2,280(0,13)
> 00033A F144 D11B D120 MVO 283(5,13),288(5,13)
> 000340 4F70 D118 CVB 7,280(0,13)
> 000344 5C60 C000 M 6,0(0,12)
> 000348 1E72 ALR 7,2
> 00034A 47C0 B126 BC 12,294(0,11)
> 00034E 5A60 C004 A 6,4(0,12)
> 000352 GN=17 EQU *
> 000352 1222 LTR 2,2
> 000354 47B0 B130 BC 11,304(0,11)
> 000358 5B60 C004 S 6,4(0,12)
> 00035C GN=18 EQU *
> 00035C 9067 4010 STM 6,7,16(4)
> 000013 DISPLAY
>
> ... so it would seem to ConVert to Decimal (0002CA, 0002D4, 0002FA,
> 000304), Divide Packed (00031A), Zero and Add Packed (000320) and then
> Convert to Binary (000336, 000340)... along with a bunch of Other Stuff.
>
> (What comes next, of course, is Mr Klein's response along the lines of
> 'How interesting... could you compile it again with options SNKRS, LNCHBAG
> and NWSPPR and post what that does?')
>
> DD
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com