Code SQL statements in REXX applications

REXX procedures do not have to be preprocessed. At run time, the REXX interpreter passes statements that it does not understand to the current active command environment for processing.

The command environment can be changed to *EXECSQL to send all unknown statements to the database manager in two ways:

  1. CMDENV parameter on the STRREXPRC CL command
  2. address positional parameter on the ADDRESS REXX command

For more information about the STRREXPRC CL command or the ADDRESS REXX command, see the REXX/400 Programmer's GuideLink to PDF topic and the REXX/400 ReferenceLink to PDF topic.

Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.
Related concepts
Write applications that use SQL
Error and warning messages during a compile of application programs that use SQL
Related reference
Handle exception conditions with the WHENEVER Statement
Example: SQL statements in REXX programs