If you want to write an RSP with DB2-formatted output pipes or multiple column rows, review MODELRSP.
This appendix discusses the following topics:
Understanding MODELRSP
The SPAREA in MODELRSP
The SQLDA in MODELRSP
Invoking MODELRSP from the client application
MODELRSP DB2 output pipe sample code