• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Multiple Display Files in One Program

    March 7, 2007 G'Day, Ted

    I have a client that has many old apps running in the S/36 Execution Environment. I had converted one of the inquiry programs into an ILE RPG program, keeping the program-described workstation definition, so that I could easily call this program from other programs. After some time, it was decided that we needed to display some information in a subfile-like format from this program. Not wanting to go through all the hassle of defining all the input and output specifications, I tried something, and to my surprise, it worked.

    I created a second workstation file containing just the subfile record and subfile control formats and added the second workstation file to the program without any problems! In fact, what happens is that the top section of the screen is output through the original workstation file and then the subfile overlays this screen. Using this technique has saved my client the expense of paying me to convert all the screens in the original program to external definitions and yet allows me to give them subfiles.

    –Steve

    Steve is one of Four Hundred Guru‘s Australian readers. I’m always glad to hear from him, as his comments and perspective are interesting.

    Until Steve brought this experience to my attention, I had no idea that one module could have more than one workstation file. I created a short test program and was amazed to see it work. Truly, I learn something new every day.

    Here’s the first display file, QAD1282D1.

    A                                      DSPSIZ(24 80 *DS3) 
    A          R SCREEN1                                      
    A                                  5  8'This is screen 1.'
    A                                  7  8'Enter your name:' 
    A            NAME          10   I  7 26
    

    And here’s the second display file, QAD1282D2.

    A                                      DSPSIZ(24 80 *DS3)  
    A          R SCREEN2                                       
    A                                      OVERLAY             
    A                                 10  8'This is screen 2.' 
    A                                 12  8'Enter your age:'   
    A            AGE            3  0I 12 26                    
    A          R DUMMY                                         
    A                                      KEEP ASSUME         
    A                                  1  2' '
    

    And here’s RPG program QAD1282R, which drives them.

    FQAD1282D1 CF   F   80        WORKSTN                    
    FQAD1282D2 CF   E             WORKSTN                    
                                                             
    IQAD1282D1 NS                                            
    I                                  1   10  SNAME         
                                                             
    C                   CLEAR                   SNAME        
    C                   CLEAR                   AGE          
    C                   MOVE      *ON           *INLR        
    C                   EXCEPT    S1                         
    C                   READ      QAD1282D1                  
    C                   EXFMT     SCREEN2                    
    C                   RETURN                               
                                                             
    OQAD1282D1 E            S1                               
    O                                        K8    'SCREEN1 '
    

    When I call the RPG program, I am prompted for my name. After pressing Enter, I am prompted for my age. Both screens are visible at the same time.

    Let me point out a few items of note.

    • Even though the two display files are visible at once, the operator can only key into the second one.
    • I had to add the DUMMY format to the second display file in order to keep it from wiping out SCREEN1.
    • I did not try to duplicate Steve’s situation exactly. That is, I did not put a subfile in the second display file. But I did at least use a program-described first display file.

    Many thanks to Steve for bringing this technique to my attention.

    –Ted



                         Post this story to del.icio.us
                   Post this story to Digg
        Post this story to Slashdot

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    DRV Tech

    Get More Out of Your IBM i

    With soaring costs, operational data is more critical than ever. IBM shops need faster, easier ways to distribute IBM applications-based data to users more efficiently, no matter where they are.

    The Problem:

    For Users, IBM Data Can Be Difficult to Get To

    IBM Applications generate reports as spooled files, originally designed to be printed. Often those reports are packed together with so much data it makes them difficult to read. Add to that hardcopy is a pain to distribute. User-friendly formats like Excel and PDF are better, offering sorting, searching, and easy portability but getting IBM reports into these formats can be tricky without the right tools.

    The Solution:

    IBM i Reports can easily be converted to easy to read and share formats like Excel and PDF and Delivered by Email

    Converting IBM i, iSeries, and AS400 reports into Excel and PDF is now a lot easier with SpoolFlex software by DRV Tech.  If you or your users are still doing this manually, think how much time is wasted dragging and reformatting to make a report readable. How much time would be saved if they were automatically formatted correctly and delivered to one or multiple recipients.

    SpoolFlex converts spooled files to Excel and PDF, automatically emailing them, and saving copies to network shared folders. SpoolFlex converts complex reports to Excel, removing unwanted headers, splitting large reports out for individual recipients, and delivering to users whether they are at the office or working from home.

    Watch our 2-minute video and see DRV’s powerful SpoolFlex software can solve your file conversion challenges.

    Watch Video

    DRV Tech

    www.drvtech.com

    866.378.3366

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    Bytware:  StandGuard Network Security 3.0, the next generation of System i security
    COMMON:  Join us at the 2007 conference, April 29 – May 3, in Anaheim, California
    Profound Logic Software:  Experience RPGsp - the #1 iSeries Web development tool

    IT Jungle Store Top Book Picks

    The System i Pocket RPG & RPG IV Guide: List Price, $69.95
    The iSeries Pocket Database Guide: List Price, $59.00
    The iSeries Pocket Developers' Guide: List Price, $59.00
    The iSeries Pocket SQL Guide: List Price, $59.00
    The iSeries Pocket Query Guide: List Price, $49.00
    The iSeries Pocket WebFacing Primer: List Price, $39.00
    Migrating to WebSphere Express for iSeries: List Price, $49.00
    iSeries Express Web Implementer's Guide: List Price, $59.00
    Getting Started with WebSphere Development Studio for iSeries: List Price, $79.95
    Getting Started With WebSphere Development Studio Client for iSeries: List Price, $89.00
    Getting Started with WebSphere Express for iSeries: List Price, $49.00
    WebFacing Application Design and Development Guide: List Price, $55.00
    Can the AS/400 Survive IBM?: List Price, $49.00
    The All-Everything Machine: List Price, $29.95
    Chip Wars: List Price, $29.95

    Transoft Brings German RPG-to-.NET Conversion Tool to U.S. VAI Says ‘No Thanks’ to the Quick Buck

    Leave a Reply Cancel reply

Volume 7, Number 9 -- March 7, 2007
THIS ISSUE SPONSORED BY:

Help/Systems
IBS
The RPG & DB2 Summit

Table of Contents

  • Multiple Display Files in One Program
  • Three Little Words That Simplify Debugging
  • Admin Alert: Better Subsystem Throughput Via Multiple Job Queues, Part Two

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