I would do this in exactly the same way as any other SQL script, except that you have quotes wrapped around and a continuation character at the end of each line (except the last):
Code:
db2 "SELECT ..." \
"FROM ..."
Or you use something like this:
Code:
db2 <<EOT
CONNECT TO ...
SELECT ...
FROM ...;
CONNECT RESET;
EOT