Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)

Data Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual426750-001
5-86
Clauses in Message Description Entry
Bit Map | 1st data | 2nd data | 3rd data
| byte | byte | byte
| | |
0 1 1 1 1 0 1 1 | 10110110 | 01101111 | ...
(1) (2) (3)
As the customer presses the appropriate buttons on the ATM to conduct the transaction,
certain pieces of data will be transferred and others will not. For the pieces of data that
are transferred, there will be a 1 in the corresponding bit map. For the pieces that are
not transferred, there will be a corresponding zero.
When the customer makes the deposit to the savings account, the first three bits in the
above bit map would look like the following:
0 1 0
and the first data item following the bit map will be the savings account number (the
checking account number is not present). When the customer makes the transfer from
the checking to the credit card account, the first three bits of the above bit map would
look like the following:
1 0 1
and the first data item following the bit map will be the checking account number. The
second data item will be the credit card number.
To process the data, all of the data could be read from the ATM into Working-Storage
without regard to message format. The data could then be formatted as it is mapped
through the Message Section with the TRANSFORM statement. You would design the
Message Section to match the message format, which has a bit map preceding the data.
For each of the conditionally present fields within the message, you would include a
PRESENT IF clause and a FIELD STATUS clause in the Message Section to check for
the presence or absence of the field. If the bit in the bit map is on, the corresponding
field is mapped through the message template. If the bit in the bit map is off, there is no
corresponding field and the next field in the template is examined.
The code for the Working-Storage Section and the Message Section might look like the
following.
WORKING-STORAGE SECTION.
01 WS-Input-Output-Record.
05 WS-Record-Length PIC 9(4) COMP.
05 WS-Record PIC X(1)
OCCURS 1 TO 100 TIMES
DEPENDING ON
WS-Record-Length.
(1) Checking Account Number
(2) Savings Account Number
(3) Credit Card Number