How QMF and REXX Iiteract

QMF interprets REXX expressions by invoking DSQCXPR EXEC as a REXX function. The following sequence of events occur to interpret the expression:

  1. PASS NULLS literals are substituted where applicable.
  2. All global variables and substitution variables are replaced in the expression and then double quoted.
  3. The expression is concantenated to "DSQ$#VAL=".
  4. REXX is invoked, the exec name DSQCXPR and argument list (expression) are passed.
  5. DSQCXPR invokes the REXX interprets instruction for the expression.
  6. Any syntax errors are captured.
  7. The results from the expression via the DSQ$#VAL symbol or the error results are returned.

The @IF routine will:

For more information, see the @IF function

Executing the same REXX exec in CMS and TSO can produce different results.

Because QMF does not place double quotation marks around numeric values in REXX expressions, any negative values in your expression might not be treated as such. To avoid having negative signs treated as the subtraction arithmetic operator, you can separate the variables that get passed to REXX with commas (instead of spaces) or enclose any negative values (including substitution variables that might result in negative values) with double quotation marks. For example, myexec(A -1) results in an evaluation error, but myexec(A,-1) and myexec("A" "-1") do not. being interpreted as arithmetic operators. However, if you use commas, be aware that:

REXX limits the maximum length of a single string. Therefore, when using columns containing data that exceed this limit, your REXX exec might produce unexpected results. Also, because QMF adds characters to strings (as noted above), a string can exceed the limit after it is processed by QMF.

If REXX passes a string longer than 32,767 bytes to QMF, the string is truncated to 32,767 bytes.

For information about limits on commas and string length in expressions, see the TSO/E Procedures Language MVS/REXX Reference (for TSO) or the Virtual Machine/Enterprise Systems Architecture REXX/VM Reference.

When using REXX within QMF, performance might be adversely affected. To improve performance, start QMF using the REXX callable interface.

[ Previous Page | Next Page | Contents | Index ]