SQL/MP Programming Manual for COBOL

Writing Pathway Servers
HP NonStop SQL/MP Programming Manual for COBOL529758-003
E-6
CALL Model: SQL Main Program
DATA DIVISION.
FILE SECTION.
FD msg-in
LABEL RECORDS ARE OMITTED.
* The definition of ENTRY-MSG should be a COPY statement.
01 entry-msg.
02 pw-header.
04 reply-code PIC S9(4) COMP.
04 application-code PIC XX.
04 function-code PIC XX.
04 trans-code PIC 99.
04 term-id PIC X(15).
04 log-request PIC X.
02 entry-type PIC X.
02 parts-info.
04 partnum PIC 9(4).
04 partname PIC X(18).
04 inventory PIC S999 COMP.
04 location PIC XXX.
04 price PIC 9(6)V99 COMP.
FD msg-out
LABEL RECORDS ARE OMITTED.
RECORD CONTAINS 1 TO 26 CHARACTERS.
* The definition of ENTRY-REPLY should be a COPY statement.
01 entry-reply.
02 pw-header.
04 reply-code PIC S9(4) COMP.
04 filler PIC X(22).
02 error-code PIC S9(4) COMP.
WORKING-STORAGE SECTION.
01 receive-file-status.
02 stat-1 PIC 9.
88 close-from-requester VALUE 1.
02 stat-2 PIC 9.*
* The definition of PARTS-PARAMS should be an INVOKE directive.
01 parts-params.
02 partnum PIC 9(4).
02 partname PIC X(18).
02 inventory PIC S999 COMP.
02 location PIC XXX.
02 price PIC 9(6)V99 COMP.
Example E-2. CALL Model Main Program (page 2 of 3)