• 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
    VISUAL LANSA 16 WEBINAR

    Trying to balance stability and agility in your IBM i environment?

    Join this webinar and explore Visual LANSA 16 – our enhanced professional low-code platform designed to help organizations running on IBM i evolve seamlessly for what’s next.

    🎙️VISUAL LANSA 16 WEBINAR

    Break Monolithic IBM i Applications and Unlock New Value

    Explore modernization without rewriting. Decouple monolithic applications and extend their value through integration with modern services, web frameworks, and cloud technologies.

    🗓️ July 10, 2025

    ⏰ 9 AM – 10 AM CDT (4 PM to 5 PM CEST)

    See the webinar schedule in your time zone

    Register to join the webinar now

    What to Expect

    • Get to know Visual LANSA 16, its core features, latest enhancements, and use cases
    • Understand how you can transition to a MACH-aligned architecture to enable faster innovation
    • Discover native REST APIs, WebView2 support, cloud-ready Azure licensing, and more to help transform and scale your IBM i applications

    Read more about V16 here.

    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

  • With Power11, Power Systems “Go To Eleven”
  • With Subscription Price, IBM i P20 And P30 Tiers Get Bigger Bundles
  • Izzi Buys CNX, Eyes Valence Port To System Z
  • IBM i Shops “Attacking” Security Concerns, Study Shows
  • IBM i PTF Guide, Volume 27, Number 26
  • Liam Allan Shares What’s Coming Next With Code For IBM i
  • From Stable To Scalable: Visual LANSA 16 Powers IBM i Growth – Launching July 8
  • VS Code Will Be The Heart Of The Modern IBM i Platform
  • The AS/400: A 37-Year-Old Dog That Loves To Learn New Tricks
  • IBM i PTF Guide, Volume 27, Number 25

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