• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • 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:

    • ptprtsel.cmd
    • ptprtsel.clp
    • ptprtselr1.rpgle

    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

    Quick Query Over a Database File

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    Maxava

    Migrate IBM i with Confidence

    Tired of costly and risky migrations? Maxava Migrate Live minimizes disruption with seamless transitions. Upgrading to Power10 or cloud hosted system, Maxava has you covered!

    Learn More

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    BCD:  Try WebSmart - the easiest and most complete iSeries Web development tool
    Profound Logic Software:  Experience RPGsp - the #1 iSeries Web development tool
    COMMON:  Join us at the Spring 2007 conference, April 29 – May 3, in Anaheim, California

    BOS CEO Steps Down, Company Brings in Outsider Replacement Details Emerge on Possible “Work Stream” Entry i5 Server

    Leave a Reply Cancel reply

Volume 6, Number 36 -- October 4, 2006
THIS ISSUE SPONSORED BY:

WorksRight Software
iTera
Patrick Townsend & Associates

Table of Contents

  • Kevin Juenemann’s Quick Query Utility
  • Remove Blank Lines from a Stream File
  • Admin Alert: Changing Physical File Characteristics on the Fly

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24
  • Big Blue Raises IBM i License Transfer Fees, Other Prices
  • Keep The IBM i Youth Movement Going With More Training, Better Tools
  • Remain Begins Migrating DevOps Tools To VS Code
  • IBM Readies LTO-10 Tape Drives And Libraries
  • IBM i PTF Guide, Volume 27, Number 23

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle