• 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
    Midrange Dynamics North America

    Want to deliver DevOps on IBM i?

    DevOps enables your IBM i development teams to shorten the software development lifecycle while delivering features, fixes, and frequent updates that are closely aligned with business objectives. Flexible configuration options within MDChange make it easy to adapt to new workflow strategies and policies as you adopt DevOps practices across your organization.

    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

  • Positive News From The Kyndryl Mainframe Modernization Report
  • NAViGATE, inPower 2025 On Tap for September 2025
  • Guru: WCA4i And Granite – Because You’ve Got Bigger Things To Build
  • As I See It: Digital Coup
  • IBM i PTF Guide, Volume 27, Number 37
  • AI Is Coming for ERP. How Will IBM i Respond?
  • The Power And Storage Price Wiggling Continues – Again
  • LaserVault Adds Multi-Path Support To ViTL
  • As I See It: Spacing Out
  • IBM i PTF Guide, Volume 27, Numbers 34, 35, And 36

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