• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Add Outfile Support to Your Applications

    October 12, 2011 Ted Holt

    Note: The code accompanying this article is available for download here.

    When I compare IBM i to other operating systems, I am amazed. This well-designed, well-built operating system has numerous features that are foreign concepts to other operating systems. One of those features is that of “outfiles”, files that are built by display-type and work-type commands. If you haven’t done so, consider that it may be advantageous to write your own commands with outfile support.

    In general, programs that write to database files always write to certain database files, and that’s as it should be. A file maintenance program that allows users to add, delete, and change customer information always sends output to the customer master file.

    But consider a file that is the result of a query process. There are good reasons that such data should be written to a file of the user’s choosing at run time. The user may want to use this file with a query tool, or send it to his PC in CSV format for use with Excel. Allowing a user to specify a file’s name at run time is not unlike his naming a document that he creates with a Word processor.

    Here’s a short example application that illustrates the process of creating outfiles. I call it XTRCUS (Extract Customer) because it extracts customer data from the database. It consists of these objects:

    Object

    Type

    Attribute

    Description

    XTRCUS

    *CMD

     

    Command interface

    XTRCUS001C

    *PGM

    CLLE

    Command-processing program

    XTRCUS001R

    *PGM

    RPGLE

    Data retrieval program

    XTRCUSPF

    *FILE

    PF

    Outfile template

     

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    Midrange Dynamics North America

    Git up to speed with MDChange!

    Git can be lightning-fast when dealing with just a few hundred items in a repository. But when dealing with tens of thousands of items, transaction wait times can take minutes.

    MDChange offers an elegant solution that enables you to work efficiently any size Git repository while making your Git experience seamless and highly responsive.

    Learn more.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    TMW Unveils New Trucking Solutions at User Confab I/O, Memory Boosted On Entry, Enterprise Power Systems

    Leave a Reply Cancel reply

Volume 11, Number 30 -- October 12, 2011
None

Table of Contents

  • Adobe Flash Builder for the iSeries Programmer, Part 3
  • Add Outfile Support to Your Applications
  • Skipping Robot/SCHEDULE Runs on AS/400-Class Machines

Content archive

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

Recent Posts

  • Public Preview For Watson Code Assistant for i Available Soon
  • COMMON Youth Movement Continues at POWERUp 2025
  • IBM Preserves Memory Investments Across Power10 And Power11
  • Eradani Uses AI For New EDI And API Service
  • Picking Apart IBM’s $150 Billion In US Manufacturing And R&D
  • FAX/400 And CICS For i Are Dead. What Will IBM Kill Next?
  • Fresche Overhauls X-Analysis With Web UI, AI Smarts
  • Is It Time To Add The Rust Programming Language To IBM i?
  • Is IBM Going To Raise Prices On Power10 Expert Care?
  • IBM i PTF Guide, Volume 27, Number 20

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