ENFORM User's Guide

Using an ENFORM Server
ENFORM Servers
7–30 058058 Tandem Computers Incorporated
9-FORMAT-REPLY.
*============================================================
* Return the part number, the supplier number, and the
* part cost. Return the occurrence number of suppnum in
* the control block Also, set the number of bytes actually
* read to the number of bytes in the record.
*============================================================
MOVE PARTNUM OF FROM-SUP TO PARTNUM OF REPLY-RCD.
MOVE SUPPNUM OF SUP-DATA(I) TO SUPPNUM OF REPLY-RCD.
MOVE PARTCOST OF SUP-DATA(I) TO PARTCOST OF REPLY-RCD.
MOVE I TO CB-INT OF REPLY-RCD.
MOVE DATA-RECORD-BZ OF REPLY-RCD
TO ACTUAL-DATA-BZ OF REPLY-RCD.
9-INVALID-MSG.
MOVE BAD-REPLY TO REPLY-CODE OF REPLY-RCD.
MOVE ERR-INV TO ERROR-CODE OF REPLY-RCD.
*============================================================
*
* SERVER I/O ROUTINES
*
*============================================================
90-GET-MESSAGE.
READ MESSAGE-IN.
90-FIRST-POSITION.
START PARTSUP-FILE KEY NOT LESS THAN PARTNUM OF FRMSUP.
90-NEXT-POSITION.
START PARTSUP-FILE KEY = PARTNUM OF FROM-SUP.
90-READ-PARTSUP.
READ PARTSUP-FILE NEXT RECORD.
90-SEND-INIT-REPLY.
WRITE REPLY-INIT.
90-SEND-RCD-REPLY.
WRITE REPLY-RCD.
90-SEND-END-REPLY.
WRITE REPLY-END.