On 29 July 2016 at 19:18, CRPence <crpbottle@xxxxxxxxx> wrote:
I still am not entirely clear what is the general purpose of the Record ID
indicator on the type=record-format line of the I-spec
Put your mind in the era of punched cards. Now imagine we have an
'invoice' that we want to print. The first card has the 'sold to'
name and address. The next card has the 'ship to' name and address.
The next card has the 'purchase order' and 'special instructions'.
The next cards are all item cards; one card for each item on the
invoice.
I won't bore with the details of how, but the 'sequence' columns tell
the compiler which cards should come in what order. The record
identifying indicator tells the compiler which card belongs to what
fields. Ignoring the sequence columns, one might have (pseudo code -
I'm not near an editor)
I* column 1 = 1 means 'sold to'
ICARDINP NS 01 1 C1
I 2 31 SONAME
I 32 61 SOAD1
...
I* column 1 = 2 means 'ship to'
ICARDINP NS 02 1 C2
I 2 31 SHNAME
I 32 61 SHAD1
...
I* column 1 = 3 means 'special instr'
ICARDINP NS 03 1 C3
I 2 21 PO
I 22 51 SPLINS
...
I* column 1 = 4 means 'item'
ICARDINP NS 04 1 C4
I 2 60ITEM
I 7 36 DESCR
...
O* Print the top of the invoice when we've read a 'ship to' record
OPRINTER D ..... 02
O OR OF
O SONAME 30
O SHNAME 62
OPRINTER D ..... 02
O OR OF
O SOAD1 30
O SHAD1 62
...
OPRINTER D ..... 03
O OR OF
O PO 20
O SPLINS 60
OPRINTER D ..... 04
O ITEM 5
O DESCR 38
...
When we read a card with a 1 in column 1, indicator 01 gets turned on
and the program knows it just read a 'sold to' card. Etc. I doubt
the list will find much use for this blast into the past; I'd be happy
to help you with this, er, project if you'd like to drop me an email.
I don't have a S/36 compiler on my machine but I suspect I'll be able
to write working code without one.
--buck
As an Amazon Associate we earn from qualifying purchases.