If you are just selecting records from a file, you cannot use SELECT if you are using RUNSQLSTM.
If you are doing a different function such as INSERT or DELETE and basing this off of a selection from a different file, then you can use SELECT.
I put a simple statement in a soiurce member and did a RUNSQLSTM from a CMD line. The statement is SELECT * FROM DEV/FSRSHAREDB
The report is as follows:
1 SELECT * FROM DEV/FSRSHAREDB;
* * * * * E N D O F S O U R C E * * * * *
5770SS1 V7R1M0 100423 Run SQL Statements A
Record *…+… 1 …+… 2 …+… 3 …+… 4 …+… 5 …+… 6 …+… 7 …
MSG ID SEV RECORD TEXT
SQL0084 30 1 Position 1 SQL statement not allowed.
Total Info Warning Error Severe Terminal
1 0 0 0 1 0
30 level severity errors found in source
* * * * * E N D O F L I S T I N G * * * * *</pre>