ibm-midrangedb2-400control-language

What specifies semi colon as statement separators on CRTQMQRY and STRQMQRY commands


When running multiline SQL code with semi colon as sql statement separators the following errors:

CRTQMQRY QMQRY(MYPGMLIB/MYSQL) SRCFILE(MYLIB/QSQLSRC)
STRQMQRY QMQRY(MYPGMLIB/MYSQL)

Whereas the following works:

RUNSQLSTM SRCFILE(MYPGMLIB/QSQLSRC) SRCMBR(MYSQL) COMMIT(*NONE)

I've googled the options on CRTQMQRY and STRQMQRY but cannot find anything that specifies statement separator.


Solution

  • Query Manager (QM) does not support multiple statements per member.

    Use RUNSQLSTM.