On Thu, 12 Mar 2020 14:05:02 -0400, Dennis Lee Bieber wrote:
> Take into account that, for much of COBOL (especially the early
> stuff),
> numeric data was stored as BCD. Later editions offered options for
> machine floating point and native integers (usage is comp). So... the
> PIC description wasn't just defining the print-format, it also defined
> the internal storage format (other than the nature of the sign
> representation -- the sign indicator itself may have been special code
> in the place-holder for the decimal point in the BCD...)
>
That depended on whose hardware and compilers you were using.
IIRC smaller IBM kit (s/360 models 20 and 30, System/3 and System/38 used
BCD because that was the only type of arithmetic they had. I did my time
on AS/400 (RPG3 - yeech! and a bit of PL/1) but don't remember what
arithmetic it used, but probably both BCD and binary. I've never used IBM
big iron.
However, I wrote a lot of COBOL on ICL 1900 kit between 1969 and 1977.
These were 24 bit word-based and didn't do BCD at all. Even the lowly
1901 used 24 bit words, but took two bites at many operations because it
only had a 12bit mill. I have a feeling that the 2900s could do BCD but
programs were more likely to use 32 bit binary because that was faster,
but it was hard to know exactly because 2966 was a very soft box indeed.
So were the 2900 disk controllers - a lot of them were built into desks
and called ICL 2903 office computers. These ran unmodified 1900 code and
all the usual 1900 compilers etc - I wrote PLAN assembler on them too.
Later, I wrote a bit of COBOL on DEC VAX/VMS kit too, and IIRC that was
also word oriented.
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|