• 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
    ProData

    Simple.  Reliable.  Powerful. 

    IBM i software to help you navigate your universe!

    Use these tools to get where you are going:

    DBU to easily, yet securely, access the data on your IBM i or remote system.
    RDB Connect for powerful record level access to remote data using RPG, CL or COBOL.

    SQL/Pro and Audit offer reliable SQL data processing, tracking and reporting.

    RDR retrieves those records which were deleted in error.

    And more!

    Join our DBUniverse of loyal, happy customers and experience your destination…

    Do IT with DBU!

    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

  • ARCAD’s Deal with IBM for DevOps In Merlin Is Exclusive
  • In The IBM i Trenches With: Maxava
  • Is The Cloud On Your IBM i Horizon?
  • Four Hundred Monitor, September 20
  • IBM i PTF Guide, Volume 25, Number 38
  • The Subscription Pricing For The IBM i Stack So Far
  • Facing The Challenges Of Upgrading Old Systems With The Cloud
  • Guru: Generating XML Using SQL – The Easy Way
  • Rocket Buys Data Integration Provider B.O.S.
  • IBM i PTF Guide, Volume 25, Number 37

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 © 2023 IT Jungle