COBOL Copybook to Protobuf Bridge
CUSTOMER-ACCOUNT-RECORD lays out 40 fields over 307 to 505 bytes (plus 1 other record); the .proto and dataclasses are generated, with 6 layout items to review before trusting the mapping.
Group of 22 items: the last, CAR-RECENT-TXN, ends at offset 289 + 216 = 505, so the group is 505 - 0 = 505 bytes (CAR-TAX-ID-NUM, CAR-OPEN-DATE-R REDEFINES add nothing). It is a level 01 record, so it starts at offset 0 (position 1). With every DEPENDING ON table at its minimum count it is 307 bytes.
Method1Source read as fixed format: columns 1-6 sequence, column 7 indicator (* and / comment, - continuation, D debugging), code in columns 8-72, columns 73-80 ignored.
2Storage: DISPLAY numeric is one byte per digit plus one for SIGN SEPARATE; COMP-3 is floor(digits/2)+1; COMP, COMP-4, BINARY and COMP-5 take 2, 4 or 8 bytes for 1-4, 5-9 and 10-18 digits; COMP-1 is 4 and COMP-2 is 8; PIC N and G take 2 bytes per character; INDEX and POINTER are 4 bytes (31-bit).
| Record | Level | Field |
|---|---|---|
| CUSTOMER-ACCOUNT-RECORD | 1 | CUSTOMER-ACCOUNT-RECORD |
| CUSTOMER-ACCOUNT-RECORD | 5 | CAR-RECORD-TYPE |
| CUSTOMER-ACCOUNT-RECORD | 5 | CAR-ACCOUNT-KEY |
COBOL copybook text
Field layout with offsets, a .proto file and Python dataclasses (proto3 schema, Python dataclasses, Record layout (CSV))
$3,500 / month, 30% to the referring partner
Read in memory for the session, never stored, never used to train a model.
Standard and product names belong to their owners. BaseLoom is not affiliated with or certified by them; validate converted files with your trading partner before production use.