IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

adding header and trailer to stored proc result set

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> DB2
View previous topic :: View next topic  
Author Message
srinivasr



Joined: 22 Feb 2007
Posts: 1
Location: Chennai

Posted: Mon Aug 18, 2008 12:51 am    Post subject: adding header and trailer to stored proc result set  

Hi,

Is it possible to add header and trailer to stored proc output (result set) without using any temporary table?

I have a cursor which returns more than one row for a set of input parms.
I would like to add a header (can be formed from input parms) and trailer (constant string) to the result set. Problem here is, input parm can have more than one value for a particular variable. Hence, stored proc result will be in sets. I need to add header and trailer to each set.

please advise if this is possible with multiple SQL statements combined with UNION operator (within cursor declaration). Any other suggestion would also be helpful.


PS: the stored proc is called by Java.

Thank you,
Srinivas R
Back to top  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> DB2
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM