[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[open-cobol-list] Binary pictures
From: |
Dave Stratford |
Subject: |
[open-cobol-list] Binary pictures |
Date: |
Sat, 21 Nov 2009 17:18:53 -0000 (GMT) |
User-agent: |
SquirrelMail/1.4.8-5.el5.centos.10 |
Hi folks,
I'm a newcomer to this mail-list but I've been using cobol since 1981. The
version of cobol I use at work has what I guess must be a slightly unusual
addition in that I can specify binary bit pictures as follows:
03 WS-BIT-1 PIC 1 COMP-5.
The largest PICTURE for a single COMP-5 item is PIC S1(63) or PIC 1(64),
so up to two words in size. These items can span byte and word boundaries
when they are part of a group item, and can generally be treated as any
other numeric item, with the obvious limitation of the size. It's
perfectly possible, and valid, to have a picture of S1 COMP-5 which would
allow values of -1,0 and +1 in a two bit field. More normal usage though
is to use bit filed unsigned, so that (IDMSX) database keys, for instance,
are almost always defined as PIC 1(32) COMP-5.
It's only occasionally useful, but when it is it's very useful. Is this
possible in Open COBOL?
Many thanks,
Dave
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [open-cobol-list] Binary pictures,
Dave Stratford <=