Couple notes. To run multiple SQL statements from one source member you have to use RUNSQLSTM command with some limitations (simple SELECT and variables not allowed). Statements must be separated by ; like in your example. To run QMQRY from CL you must first create query via CRTQMQRY command. You will have to create 2 queries from two different source members. Check MCPress archive for QMQRY for some examples and variables usage.