In DB2 there is no way to deal with standard input when using scripts in db2clp. This console is only to send commands to DB2, but the commands should already be prepared.
In order to deal with user input, you use shell scripts, like .bat in Windows or bash/korn shell scripts. With these scripts you take the user input, and then construct the commands to send to DB2.
read id
db2 "select * from emp where id = ${id}"
For the previous approach, you need to create scripts for each platform (windows and *NIX-bash or korn)
However, there is another way to deal with user input in DB2 but you need to use CLPPlus. This is like SQL*Plus, and you can get the input from the user into a variable, and then query the database with that value.