16.20 - Return-result-to - Teradata Tools and Utilities

Teradata® Call-Level Interface Version 2 Reference for Mainframe-Attached Systems

prodname
Teradata Tools and Utilities
vrm_release
16.20
created_date
September 2019
category
Programming Reference
featnum
B035-2417-108K

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...
COBOL RETURN-RESULT-TO
PL/I RETURN_RESULT_TO
C, C++ returnResultTo
IBM Assembler DBRIRR
This routine. . . Does this for Return-result-to. . .
DBCHINI writes
DBCHCL reads (RSUP; IRQ; IWPF)
Return-result-to are used by. . . To...
applications write

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'
  • RQSTR for COBOL
  • DBC_RETN_RSLT_RQSTR for PL/I
  • DBC_RetnRsltRqstr for C and C++
  • DBRIRRR for Assembler
indicates that the results are returned only to the application invoking a procedure. '2'
  • APPL for COBOL
  • DBC_RETN_RSLT_APPL for PL/I
  • DBC_RetnRsltAppl for C and C++
  • DBRIRRA for Assembler
indicates that the results are return only to the procedure caller. '3'
  • CALLER for COBOL
  • DBC_RETN_RSLT_CALLER for PL/I
  • DBC_RetnRsltCaller for C and C++
  • DBRIRRC for Assembler
indicates that the results are returned to both the requester and the application. '4'
  • RQSTR-APPL for COBOL
  • DBC_RETN_RSLT_RQSTR_APPL for PL/I
  • DBC_RetnRsltRqstrAppl for C and C++
  • DBRIRRRA for Assembler
indicates that the results are returned to both the requester and the caller. '5'
  • RQSTR-CALLER for COBOL
  • DBC_RETN_RSLT_RQSTR_CALLER for PL/I
  • DBC_RetnRsltRqstrCaller for C and C++
  • DBRIRRRC for Assembler

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.