Home > Ask the AS/400 Experts > iSeries Application Development Questions & Answers > iSeries application display subfiles with other program windows
Ask The iSeries 400 Expert: Questions & Answers
EMAIL THIS

iSeries application display subfiles with other program windows

John Blenkinsop EXPERT RESPONSE FROM: John Blenkinsop

Pose a Question
Other iSeries 400 Categories
Meet all iSeries 400 Experts
Become an Expert for this site


iSeries news and advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 18 March 2008
I have 3 programs, ProgA, ProgB and ProgC. ProgB is a subfile and ProgC is a window with a single record. From ProgA, I want to call ProgB to display the subfile but then also call ProgC so the window displays. I don't want the user to be stopped in ProgB and have to press a key to call ProgC. When I changed the Exfmt in ProgB to a "write", the subfile does not display. Though I do get the window record.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
iSeries Application Development
Monitoring escape messages and using RCVMSG for diagnostic messages
Listing contents of multiple FTP directories on AS/400
Chain operation error after converting RPG3 to ILE RPG (RPGIV)
Space offset X'0015FF00' or X'0000000000000000' is outside current limit for object QIGC2424C
Searching fields for values
Searching part of a name or address in AS/400
Passing parameters in an ILE RPG module
What's happening to my subfile?
What happening to my subfile?
What is a Decimal Data Error?

iSeries programming commands
Taking advantage of CL advancements, starting with V5R3
TAATOOL: Useful tools for programmers on IBM i
Date calculation commands for AS/400
Monitoring escape messages and using RCVMSG for diagnostic messages
Creating a user profile from a file
DSPPGMREF (Display Program Reference)
DSPPGM (Display Program)
DSPFD (Display File Description)
DSPPTF (Display PTF)
Top 10 iSeries commands
iSeries programming commands Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
Quiz: iSeries (AS/400) Commands  (Search400.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


I get the same thing when I test this -- my 'program B' subfile does not appear, but the window in my 'program C' does. This is because the display file for ProgB is created with the option DFRWRT(*YES). Changing the display file to DFRWRT(*NO) makes the programs behave exactly the way you want them to.

DFRWRT(*YES) tells the workstation controller to 'Defer writing the display formats until you receive a READ'. So, your program sends display formats using WRITE, and the workstation controller just stores them all -- it does not send the display formats to the screen device until your program sends either a READ operation or an EXFMT.

When your ProgB calls ProgC, ProgC uses EXFMT to write-then-read its own format. The workstation controller sends this format to the screen, leapfrogging the stored formats from ProgB. When ProgC ends, and control returns to ProgB, ProgB does a READ and the workstation controller then sends the formats and waits for user input to return to ProgB.

So, change the display file for ProgB to DFRWRT(*NO). You should ONLY do this in situations like this - usually, DFRWRT(*NO) is a bad option to use, since it can cause screen flashing and other strange effects.




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



iSeries Networking - Printing, Remote Access, TCP/IP
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts