Types of Statements | Preparing to Execute Commands |
How Commands Are Processed |
CLOSE | CONNECT | DECLARE CURSOR |
DESCRIBE TABLE | FETCH | OPEN |
SET CURRENT PACKAGESET | SET CURRENT SQLID | SET :hostvar = special-register |
/* REXX */ /* Execute a TSO command */ address TSO "alloc fi(indd) da(data) shr reu" . . . /* Execute several SQL commands */ address SQL "select * from dsn8230.emp" /* process the output */ "update dsn8230.emp set salary=salary*1.1" . . . /* Switch back to TSO */ address TSO . . . /* Issue just one SQL command without changing the current host command environment */ address SQL "select * from dsn8230.proj"
"select col1, col2 ", "from mytab ", "where a='This is a string'"will, internally, become:
SELECT COL1, COL2 FROM MYTAB WHERE A='This is a string'
WARNING: Basic predicate (=, >, <, etc.) comparisons are case sensitive. Take care to use the correct case when typing in literal and host variable values!
Note: Explicit use of parameter markers (question marks) is not permitted in SQL commands. Instead, you may use host variable expressions.