Appendix F. Rexx/SQL Functions

This appendix provides a reference to all Rexx/SQL functions, as defined by the product documentation for Rexx/SQL version 2.4. This appendix is intended as a quick reference guide for developers, so see the product documentation if more detailed information is required. Chapter 15 tells where to obtain this documentation.

Each of the following entries is identified by the name of the function. Entries contain a template of the function, showing its arguments, if any. Optional arguments are enclosed in brackets ([ ]). The template is followed by a description of the function and its use and the function's arguments. Coding examples show how to code each function. All Rexx/SQL functions return 0 upon success unless otherwise noted.

SQLCLOSE

SQLCLOSE( statement_name )

Closes a cursor. Frees associated locks and resources.

statement_name — The statement identifier

Example

if SQLClose(s1) <> 0 then call sqlerr 'During close'

SQLCOMMAND

SQLCOMMAND( statement_name, sql_statement [,bind1[,bind2[,...[,bindN]]]] )

Immediately executes an SQL statement.

Bind values may optionally be passed for DML statements, if the database permits them. Bind values may not be passed for DDL statements. The format for bind variables is database-dependent.

statement_name — Names the SQL statement. For SELECTs, names a stem for an array that will receive statement results

sql_statementA SQL DDL or DML statement

bind1...bindN — The bind variables

Variable sqlca.rowcount is set by this function ...

Get Rexx Programmer's Reference now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.