Return-result-to is a one byte unsigned integer that an External Stored Procedure calling CLIv2 may provide the same information that would be provided by the WITH RETURN clause on the SQL PROCEDURE statement for an SQL Stored Procedure. Specifically, whether the results for an SQL request are returned to the requesting procedure, the caller of the procedure, or the application. If propagated to the caller or application, the parcels are preceded by a ResultSet response parcel.
Return-result-to exists only when DBCHINI had been called for a DBCAREA with Total-length set to at least 640 (that is, the returned DBCAREA Level value is at least 1). For a smaller DBCAREA, Return-result-to is ignored.
|In this language...||The variable name for Return-result-to is...|
|This routine. . .||Does this for Return-result-to. . .|
|DBCHCL||reads (RSUP; IRQ; IWPF)|
|Return-result-to are used by. . .||To...|
One of the following values may be set before initiating a request:
|If...||Then set Connect-type to...|
|indicates that the results are returned only the procedure making the request.||'1'
|indicates that the results are returned only to the application invoking a procedure.||'2'
|indicates that the results are return only to the procedure caller.||'3'
|indicates that the results are returned to both the requester and the application.||'4'
|indicates that the results are returned to both the requester and the caller.||'5'
If not specified, the default from the HSHSPB is used, which as distributed is 'R'.
If a value other than 1 (return the results to other than the procedure making the request) is specified, then the DBCAREA Keep-response option must specify either 'Y' or 'P'.
For details on External Stored Procedures, refer to Stored Procedures.