Suppose you are using db2 and ksh
----------------------------
#!/usr/bin/ksh
connect to <Serve Name>:<Port NO>@<Instance Name> user <USERID> using <Passwd>
-----------------------------------
If u have profile and catalog then
----------------------------------
#!/usr/bin/ksh
db2 connect to <SID>
-----------------------------------
To run a sample proc .. use the below
db2 <Proc Name>
Thanks
an