Hold the Drop or Fold

RPG
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Most of the time, the operating system does a great job of handling drop or fold for subfiles. However, when control returns to the program and the screen is redisplayed, the drop or fold is lost.

The solution is to use the SFLMODE and SFLCSRRRN keywords in conjunction with the SFLFOLD and SFLDROP keywords. When these keywords are used, a value is re- turned in the variable associated with SFLMODE. The variable contains '0' (or *OFF) for folded mode or '1' (*ON) for dropped mode.

Before initially displaying the screen, move *ON or *OFF to the SFLMODE variable (depending on which mode you want to display first). Then move the variable to the controlling indicator for the SFLFOLD/SFLDROP keywords before displaying the screen. When you need to redisplay the screen, the last status of drop or fold will be in the SFLMODE variable which can be used to reset the indicator. To see the keywords in action, refer to the partial display file in 4 and the partial RPG program in 5.

Before initially displaying the screen, move *ON or *OFF to the SFLMODE variable (depending on which mode you want to display first). Then move the variable to the controlling indicator for the SFLFOLD/SFLDROP keywords before displaying the screen. When you need to redisplay the screen, the last status of drop or fold will be in the SFLMODE variable which can be used to reset the indicator. To see the keywords in action, refer to the partial display file in Figure 4 and the partial RPG program in Figure 5.


Hold the Drop or Fold

Figure 4 Using SFLMODE in a Display File

 *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 A R CONTROL SFLCTL(SUBFILE) A SFLSIZ(0011) A SFLPAG(0010) A SFLMODE(&SFLMOD) A SFLCSRRRN(&RELRCD) A SFLDSP A SFLDSPCTL A 60 SFLDROP(CF11) A N60 SFLFOLD(CF11) A SFLMOD 1A H A RELRCD 5S 0H *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 
Hold the Drop or Fold

Figure 5 Retaining Fold or Drop in RPG

 *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 C MOVE *ON SFLMOD Start with drop C MOVE *OFF SFLMOD or fold C* C *IN03 DOUEQ*ON C MOVE SFLMOD *IN60 Reset drop/fold C EXFMTCONTROL C ENDDO *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 
BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: