Code Comments
Programming Forum and web based access to our favorite programming groups.On Sun, 27 Jan 2008 13:34:41 +1300, "Pete Dashwood" <dashwood@removethis.enternet.co.nz> wrote: > > >"Clark F Morris" <cfmpublic@ns.sympatico.ca> wrote in message > news:5phnp39cnk3nd7vc4nsi2flb4psm9emmco@ 4ax.com... > >I started with COBOL 61 as well :-) You forgot to mention that, prior to th e >introduction of PICTURE, data was defined with SIZE, CLASS, and *USAGE* >clauses. I forgot about USAGE or the RCA 301 compiler didn't have it since everything was 6 bit characters. > > >Yep, me too... and it very often was :-) > > >Well, I did it similarly, ensuring the input record was defined with what >was required, but then testing each supposedly numeric field in an AN field . >If they all passed, it was safe to proceed. My programs did this stuff in a >VALIDATE-INPUT SECTION. It worked pretty well and I seldom had 0c7 crashes >caused by bad input (usually it was bad programming... Ah, happy days, when >we were learning...:-)) I used the numeric descriptions because the results would be different depending on whether the field could be signed. The expectations are different and thus the description of the field as expected is needed. This would be true even with sign is separate. > > >Maybe. The problem was that with packed fields as soon as you tried to use >them, you'd crash with 0c7. It therefore was better to ensure that what you >stored there was valid... Actually with the 360 DOS COBOL (or one of its successors) the move could bomb out because they generated a gratuitous Zero Add Packed for at least some signed fields and I seem to recall some moves to unsigned fields generated Zero Add Packed, Or Immediate. > > >Pete.
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.