COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

IF NO-ERROR
PERFORM 914-GET-REPLY
ELSE
PERFORM 990-BUILD-ERROR-REPLY
PERFORM 910-SERVER-REPLY.
200-GET-PART-LIST-RCD.
PERFORM 210-INIT-REPLY.
PERFORM 220-BUILD-REPLY.
210-INIT-REPLY.
MOVE SPACES TO SERVER-REPLY.
MOVE PRT-HEADER OF PART-DEL-GET-LIST-MSG TO PRT-HEADER OF SERVER-REPLY.
MOVE ZERO TO REPLY-CODE OF PART-LIST-REPLY
LINE-COUNT OF PART-LIST-REPLY
MOVE SPACES TO ALL-PART-LINES OF PART-LIST-REPLY.
220-BUILD-REPLY.
MOVE PART-NO OF PART-DEL-GET-LIST-MSG TO PART-NO OF PART-DATA-RECORD.
MOVE PART-NAME OF PART-DEL-GET-LIST-MSG TO PART-NAME OF PART-DATA-RECORD.
PERFORM 935-START-PART-REPOSITIONED.
IF NO-ERROR
PERFORM 230-GET-PART VARYING I FROM 1 BY 1
UNTIL I > MAXLIST OR FILE-ERROR
IF NO-ERROR OR END-OF-FILE
PERFORM 916-LIST-REPLY
ELSE
PERFORM 990-BUILD-ERROR-REPLY
PERFORM 910-SERVER-REPLY
ELSE
PERFORM 990-BUILD-ERROR-REPLY
PERFORM 910-SERVER-REPLY.
230-GET-PART.
MOVE I TO LINE-COUNT OF PART-LIST-REPLY.
PERFORM 940-READ-PART-NEXT.
IF NO-ERROR
MOVE PART-NO OF PART-DATA-RECORD TO PART-NO OF PART-LIST-REPLY (I)
MOVE PART-NAME OF PART-DATA-RECORD TO PART-NAME OF PART-LIST-REPLY (I)
...
ELSE
IF END-OF-FILE
MOVE PART-FILE-EOF TO REPLY-CODE OF PART-LIST-REPLY
SUBTRACT 1 FROM LINE-COUNT OF PART-LIST-REPLY.
910-SERVER-REPLY.
WRITE SERVER-REPLY.
914-GET-REPLY.
WRITE PART-GET-REPLY.
916-LIST-REPLY.
WRITE PART-LIST-REPLY.
935-START-PART-REPOSITIONED.
START PART-FILE KEY IS = PART-NAME OF PART-DATA-RECORD
POSITION PART-NO OF PART-DATA-RECORD APPROXIMATE.
960-INVALID-T-CODE.
MOVE INVALID-TRANSACTION TO REPLY-CODE OF SERVER-REPLY.
PERFORM 910-SERVER-REPLY.
Optimizing Disk File Processing
The features of Enscribe that protect the database from corruption also slow down the Enscribe
input and output routines. If you can afford less protection, you can improve the performance of
the HP COBOL disk input and output routines. You can afford less protection when a process has
exclusive access to a file, or when it is acceptable that other processes that read the file might not
receive the most recent copy of a changing record.
876 Disk Input and Output