What kind of tips? It's just COBOL.Any help or tips on writing a .cpy file?
What kind of tips? It's just COBOL.
I suppose it's even more important to use a unique prefixing system for all field names, to avoid duplication, but you should be doing that anyway.
* copybook INQINTC
* Channel name
01 INQUIRY-CHANNEL PIC X(16) VALUE 'inqcustrec'.
* Container names
01 CUSTOMER-NO PIC X(16) VALUE 'custno'.
01 BRANCH-NO PIC X(16) VALUE 'branchno'.
01 CUSTOMER-RECORD PIC X(16) VALUE 'custrec'.
* Define the data fields used by the program
01 CUSTNO PIC X(8).
01 BRANCHNO PIC X(5).
01 CREC.
02 CUSTNAME PIC X(80).
02 CUSTADDR1 PIC X(80).
02 CUSTADDR2 PIC X(80).
02 CUSTADDR3 PIC X(80).
IDENTIFICATION DIVISION.
PROGRAM-ID. CLIENT1.
WORKING-STORAGE SECTION.
COPY INQINTC
PROCEDURE DIVISION.
MAIN-PROCESSING SECTION.
Those level 01s really should have been level 77s. And should that customer number really have been alphanumeric and not numeric?* copybook INQINTC
* Channel name
01 INQUIRY-CHANNEL PIC X(16) VALUE 'inqcustrec'.
* Container names
01 CUSTOMER-NO PIC X(16) VALUE 'custno'.
01 BRANCH-NO PIC X(16) VALUE 'branchno'.
01 CUSTOMER-RECORD PIC X(16) VALUE 'custrec'.
* Define the data fields used by the program
01 CUSTNO PIC X(8).
01 BRANCHNO PIC X(5).
Those level 01s really should have been level 77s. And should that customer number really have been alphanumeric and not numeric?
(I've got grey sideburns. Can you tell?)