TS/MP Pathsend and Server Programming Manual (H06.05+, J06.03+)

Considerations
See “Usage Considerations for Pathsend Procedures” (page 103).
Retaining Concurrent Sends Limit
The Pathsend procedures use the process file segment (PFS) of the caller to store the requests and
reply messages. The maximum PFS size is 32 MB. If each request and reply message is 32 KB in
size, the current limit of 255 concurrent outstanding SERVERCLASS_SEND_ calls can be achieved
by a requester because 32 KB size limit requires only 16320 KB of PFS memory (calculated as
255 x (32 KB of request + 32 KB of reply)).
However, if the requester uses the SERVERCLASS_SENDL_ calls and each of the request and reply
messages are 2 MB in size, approximately 1020 MB of memory (255 x (2 MB + 2 MB)) is required
to achieve the 255 concurrent outstanding sends. Some part of the PFS memory is used by the file
system to hold important process data; the SERVERCLASS_SENDL_ procedure cannot exhaust all
of the PFS memory. Therefore, you can achieve only up to seven ((32 MB / (2 MB + 2 MB)) – 1)
concurrent sends (or up to 15 concurrent outstanding sends if all the requests and replies are 1
MB in size).
If your application request and reply messages are larger than 32 KB and the requester is performing
up to 255 concurrent sends, use the following guidelines to overcome the PFS memory limitation:
1. Define the read and write buffers with size in multiples of 16 KB.
2. Call the USERIOBUFFER_ALLOW_ Guardian Procedure Call (GPC) before making any
SERVERCLASS_SENDL_ calls.
3. Allocate the extended data segments using the SEGMENT_ALLOCATE_ procedure. More than
one segment might be required depending on the maximum number of concurrent sends and
the total size of the memory required by the application.
4. Define memory pools for the allocated extended data segments.
5. Use the POOL_GETSPACE_PAGE_ procedure to obtain a block of memory, which will be
used as the read or write buffer.
6. When the SERVERCLASS_SENDL_ operation is complete, use the POOL_PUTSPACE_ procedure
to return the memory to the pools.
Applications configured using the above guidelines can have 255 concurrent sends, even when
the read and write messages are 2 MB in size.
NOTE: User buffers are used by default on J-series provided that the send and reply buffers do
not overlap.
SERVERCLASS_SEND_INFO_ Procedure
The SERVERCLASS_SEND_INFO_ procedure retrieves error information about the last
SERVERCLASS_SEND_, SERVERCLASS_DIALOG_BEGIN_, SERVERCLASS_DIALOG_SEND_,
SERVERCLASS_DIALOG_END_, or SERVERCLASS_DIALOG_ABORT_ operation that was initiated
or completed with return error 233 (FEScError) or 0 (FEOK).
If the return error from the previous Pathsend call is 0 (FEOK), both the Pathsend error and the
file-system error will always be 0, so you do not need to call SERVERCLASS_SEND_INFO_.
Syntax
The syntax of the SERVERCLASS_SEND_INFO_ procedure is:
! o
! o
error := SERVERCLASS_SEND_INFO_
( pathsend-error,
file-system-error );
SERVERCLASS_SEND_INFO_ Procedure 101