ENFORM User's Guide
Using an ENFORM Server
ENFORM Servers
7–28 058058 Tandem Computers Incorporated
TRANS-CODE-SR.
*=======================================================
* Initialize the header of the reply buffer.
* The max number of records in the file = 100.
* The size (in words) of the control block is 1.
* Write the init reply.
*=======================================================
MOVE ENFORM-SERVER-HEADER-DEF OF MSG-INIT TO
ENFORM-SERVER-HEADER-DEF OF REPLY-INIT.
MOVE 100 TO MAX-RECORDS-IN-FILE OF REPLY-INIT.
MOVE 1 TO CONTROL-BLOCK-WZ.
PERFORM 90-SEND-INIT-REPLY.
TRANS-CODE-RR.
*============================================================
* Initialize the header of the reply buffer.
* Initialize the position code, actual data size and data
* record size and the data record in the reply buffer.
* Process the request for the record and send the reply.
*============================================================
MOVE ENFORM-SERVER-HEADER-DEF OF MSG-RCD TO
ENFORM-SERVER-HEADER-DEF OF REPLY-RCD.
MOVE POSITION-CODE OF MSG-RCD TO POSITION-CODE OF
REPLY-RCD.
MOVE ACTUAL-DATA-BZ OF MSG-RCD TO ACTUAL-DATA-BZ OF
REPLY-RCD.
MOVE DATA-RECORD-BZ OF MSG-RCD TO DATA-RECORD-BZ OF
REPLY-RCD.
MOVE SPACES TO DATA-RECORD OF REPLY-RCD.
PERFORM 1-PROCESS-REQUEST.
PERFORM 90-SEND-RCD-REPLY.
TRANS-CODE-TR.
*========================================================
* Initialize the header of the reply buffer and
* send the terminate reply.
*========================================================
MOVE ENFORM-SERVER-HEADER-DEF OF MSG-END TO
ENFORM-SERVER-HEADER-DEF OF REPLY-END.
PERFORM 90-SEND-END-REPLY.