yes we can..
For accessing DB2 from IMS programs we need to have a plan created with the name of the PSB and the program should be bound to a collection which this plan can access
You can code DB2 and IMS DB in one program.
But you need to code PCB under LINKAGE SECTION which are exit in PSB.You can access the IMS data through the PCB .You can do operation like READ,INSERT,REWRITE AND DELETE etc.....by using FUNCTION CODES.