1.Perform your mainframe database query as Normally.
2.Generate your spool file . When saving the file, use the CPYTOIMPF command to get the output as a comma separated value file (Extension of *.csv).
3.Open MS Word or MS Excel.
4.Open the .csv file in Excel or Word.
5. Click “Yes” on the “Convert To Table” dialog box. This will separate all the values in the spool file separated by commas into their own cells in Excel, or into their own table cells in MS Word.