TS/MP Pathsend and Server Programming Manual (H06.05+, J06.03+)
Example 1 Sample Pathsend Requester Program Structure
Declare program variables.
Begins TMF transaction.
Allocate buffer for request
and reply messages.
TMFError := BEGINTRANSACTION(
TransactionTag ):
Set SERVERCLASS_SEND_ parameters.PathmonName ‘:=‘ [“$PM”]
nl
PathmonNameBytes :=3;
nl
nl
Specifies no timeout.
ServerClass ‘:=‘ [“ASERVER”]
Specifies nowait send.
ServerClassBytes =7;
Timeout := -1D;
Flags := 1;
Performs send operation.SendError := SERVERCLASS_SEND_(
PathmonName,
PathmonNameBytes,
ServerClass,
ServerClassBytes,
RequestBuffer,
RequestBufferBytes,
MaxReadCount,
CountRead, Timeout, Flags,
SCSendOpNum, Tag);
Nowait send request failed.
IF( SendError ) THEN
BEGIN
InfoError :=
SERVERCLASS_SEND_INFO_
Gets Pathsend and File errors.
( PSError, FSError );
Perform application-dependent error logic.
.
.
.
END;
Wait for completion of send and get the
resulting send error.
Filenum:=SCSendOpNum
CALL AWAITIOX ( FileNum, Countread, Tag,
-1D );
operation
CALL FILEINFO ( FileNum, SendError );
IF( SendError ) THEN
BEGIN
INFOERROR := SERVERCLASS_SEND_INFO_ ( PSError, FSError );
.
.
.
END;
Resumes TMF transaction.TMFError :=RESUMETRANSACTION(
TransactionTag );
Designing Requester Programs 39










