Kevin Juenemann’s Quick Query Utility
October 4, 2006 Hey, Ted
Note: The source code for this article is available for download Your QF command works great when you want to see the raw data, but sometimes you need only some of the columns, or need to join files to get usable data rather than codes. Many of our customers don’t have interactive SQL installed on their systems, so I created this utility and sent it to all our customers for those times a one-off report is needed quickly. I can enter an SQL Select statement and a printer ID, and the utility will create a Query Management Query and run it. One nice feature is that if the report is too wide for the paper, it will automatically create multiple reports that you can place side-by-side for a wide-view. –Kevin Juenemann, InfiniTec I greatly appreciate Kevin’s willingness to share his utility with readers of Four Hundred Guru. Kevin sent me three source members–a command, a CL program, and an RPG IV program. You can download the source code for each of these elements by clicking here. This file contains:
I have included compilation instructions at the beginning of each member. Here’s an example of how I used PTPRTSEL in testing. The following command created a report and placed it on my output queue. PTPRTSEL SQL('SELECT STATE, CITY, LSTNAM, INIT, CUSNUM FROM qiws/qcustcdt ORDER BY STATE, CITY') PRINTER(THOLT) I hope many of you will find Kevin’s utility handy. –Ted RELATED STORY |