The stored procedure is sent to the database in one or more segments using either the Initiate Request, or the Initiate With Protocol Function CLIv2 function.
The Server Maximum Segment Size CLIv2 query obtains the maximum size of each segment. Use of segments is indicated by the CLIv2 Segment Data option (with the Change Options option set to 'Y').
The application divides the text of the stored procedure into pieces no larger than the maximum segment size, and sends each piece as a separate request (the text may be divided at any point). The first piece is identified using the Segment Data option as the first segment. The last (or only) piece is identified as the last segment; all other pieces are identified as intermediate segments.