Newsletters Subscriptions Media Kit About Us Contact Search Home

mgo
OS/400 Edition
Volume 3, Number 56 -- August 22, 2003

Stay on the Same Subfile Page


Hey, Ted:

I'm sure this is a simple question, but maybe you'll answer it anyway. It would help me a lot. When the user presses Enter or a function key while a multi-page subfile is on the display, the first page of the subfile is redisplayed. How can I position the subfile to the page that was displayed when the Enter key or function key was pressed?

--Jay


It's a simple technique, Jay, but is one all green-screeners ought to know. Redisplaying the first page of a subfile is a major annoyance to users.

You'll need to use two keywords in the subfile control format. The SFLCSRRRN keyword loads a five-digit hidden field with the relative record number of the subfile record upon which the cursor is located. If the cursor is not located on a subfile record, this field is zero.

The other keyword is SFLRCDNBR, which causes the system to display the subfile page that contains a specified record.

To put these keywords into action, you need to do two things in your program. First, set the field associated with the SFLCSRRRN keyword to zero before loading a subfile. Second, before displaying the subfile, set the field associated with the SFLRCDNBR to the value of the SFLCSRRRN field, unless that field is zero. In the case of a zero value, set the SFLRCDNBR field to 1.

Here's an example display file that uses these keywords.

A                                      DSPSIZ(24 80 *DS3)  
A                                      INDARA              
                                                           
A          R S1SFL                     SFL                 
A                                  6  2'LOAD:'             
A            S1LOADNBR      3  0O    +1EDTCDE(4)           
A                                    +1'REC:'              
A            S1RECNBR       3  0O    +1EDTCDE(4)           
                                                           
A          R S1CTL                     SFLCTL(S1SFL)       
A                                      SFLSIZ(11)          
A                                      SFLPAG(10)          
A                                      OVERLAY             
A                                      CA03(03 'EXIT')     
A                                      CF05(05 'REFRESH')  
A                                      CF10(10 'NEXT LOAD')
A                                      SFLCSRRRN(&S1CSRRRN)
A  45                                  SFLDSP              
A  44                                  SFLDSPCTL         
A N44N45                               SFLCLR            
A  46                                  SFLEND(*MORE)     
A            S1CSRRRN       5S 0H                        
A            S1RCDNBR       4S 0H      SFLRCDNBR(CURSOR) 
A            S1SFLRRN       5S 0H                        
                                                         
A          R S1LEGEND                                    
A                                 23  5'F3=Exit'         
A                                    +4'F5=Refresh'      
A                                    +4'F10=Next load'   

Here's an RPG program to drive the display file.

Faa01d     cf   e             workstn                      
F                                     sfile(s1Sfl:s1SflRRN)
F                                     indds(wsIndicators)  
                                                           
D true            c                   const(*on)           
D false           c                   const(*off)          
                                                           
D wsIndicators    ds            99                         
D  s1ExitRequested...                                      
D                         3      3n                        
D  s1RefreshRequested...                                   
D                         5      5n                        
D  s1LoadRequested...                                      
D                        10     10n 
D  s1SflDspCtl           44     44n 
D  s1SflDsp              45     45n 
D  s1SflMore             46     46n 
C                   eval      s1LoadRequested = true
C                   eval      s1SflMore = true 
C 
C                   dou       s1ExitRequested
C                   if        s1LoadRequested 
C                   exsr      s1Load 
C                   elseif    s1RefreshRequested
C                   exsr      s1Refresh
C                   endif 
C                   exsr      s1Display 
C                   enddo 
C                                                   
C                   eval      *inlr = *on           
C* =================================================
C     s1Display     begsr                           
C                                                   
C                   eval      s1SflDsp = true       
C                   eval      s1SflDspCtl = true    
C                                                
C                   if        s1CsrRRN > *zero   
C                   eval      s1RcdNbr = s1CsrRRN
C                   else                         
C                   eval      s1RcdNbr = 1       
C                   endif                        
C                                                
C                   write     s1Legend           
C                   exfmt     s1Ctl              
C                                                
C                   endsr                        
C* ==============================================
C     s1Load        begsr                        
C                                                
C                   eval      s1LoadNbr += 1     
C                   exsr      s1Refresh          
C                                                
C                   endsr                        
C* ==============================================
C     s1Refresh     begsr                        
C                                                
C                   exsr      s1Clear            
C                   for       s1SflRRN = 1 to 50 
C                   eval      s1RecNbr = s1SflRRN
C                   write     s1Sfl              
C                   endfor                       
C                   eval      s1CsrRRN = *zero   
C                                                
C                   endsr                        
C* ==============================================
C     s1Clear       begsr                        
C                                                
C                   eval      s1SflDsp = false   
C                   eval      s1SflDspCtl = false
C                   write     s1Ctl              
C                                                
C                   endsr

When you run the program, you can press Enter or the F3, F5, or F10 keys. Pressing Enter redisplays the same page of the subfile. Pressing F5 rebuilds the subfile with the same data and positions to the first subfile page. Pressing F10 rebuilds the subfile with new data and positions to the first page. F3 ends the program.

Notice that the s1CsrRRN field is set to zero when the subfile is cleared and reloaded. This forces a value of 1 into s1RcdNbr when the subfile is first displayed. As long as the user keeps the cursor on a subfile record, the system will redisplay the same page when the Enter key is pressed.

--Ted


Sponsored By
GST

AIT Backup for iSeries

GST, Inc.
Phone: 866-478-4621 or 949-900-1090 (for sales x 300)
Web: http://www.gstinc.com
Email: sales@gstinc.com

---------------------------------------------------------------------

SUMMARY

Compact, modular and reliable backup solution at unbeatable prices

· Powerful 3lb drive in small form factor
· LCD module for backup effiency
· Capacity up to 200GB
· Speed up to 865GB/hour
· LVD, HVD, and fibre connectivity
· Starts at $2,000 USD

---------------------------------------------------------------------

THE BIG PICTURE

· A single AIT tape drive in external, modular, stackable enclosure.
· Capacity: AIT-3 100GB native (200 GB compressed).
· Speed: AIT-3 43GB/hour native (86GB/hour compressed).
· Single subsystem is field-upgradeable to dual drive subsystem.
· LCD display panel improves backup efficiency.
· Supports AIT-1, AIT-2 and AIT-3.
· Roadmap to AIT-4, AIT-5, AIT-6.
· AIT range: single drive to enterprise-wide libraries.
· Supports LVD and HVD SCSI connections directly.
· Supports Fibre Channel via our bridges and routers.

The Single AIT Tape Subsystem is part of GST's EntryDR™ family. Single AIT Tape Subsystems are housed in upgradeable modular enclosures. This subsystem delivers high-performance and high reliability at cost-effective pricing to meet basic backup needs for the small to medium range of servers.

Building-block modularity enables the Single AIT Tape Subsystem to be upgraded to GST's Dual AIT Tape Subsystem to strengthen disaster recovery protection. An LCD panel provides an advanced operator interface for visibility over the backup operation.

The Single AIT Tape Subsystem can backup IBM eServer family members: iSeries, pSeries and xSeries servers. They connect natively with LVD (low voltage differential) and HVD (high voltage differential) SCSI connections, and with Fibre Channel (FC) through our BridgeLink™ family of bridges and SanMatrix™ family of routers.Model overview.

GST's Single AIT Tape Subsystem is available in a variety of models. Each AIT technology (AIT-1, AIT-2, AIT-3) is available in two server-to-SCSI Adapter interfaces:

LOW VOLTAGE DIFFERENTIAL (LVD). Connectivity with eServer family. iSeries uses IBM SCSI Adapter feature code: FC 5702, 5705. pSeries and xSeries servers use a variety of LVD SCSI adapters.

HIGH VOLTAGE DIFFERENTIAL (HVD). Connectivity with eServer family. iSeries uses IBM SCSI Adapter feature code: FC 2729, 2749, 6501, 6534. pSeries and xSeries servers use a variety of HVD SCSI adapters.

AIT TECHNOLOGY

AIT tape technology has evolved through three generations: AIT-1, AIT-2 and AIT-3 and provides outstanding capacity and performance with a highly stable technology roadmap. AIT cartridges utilize Memory-in-Cassette (MIC) architecture providing rapid time-to-data and multiple load points for partitioning data.

Native cartridge capacities for AIT-1, AIT-2 and AIT-3 are 35GB, 50GB and 100GB (70GB, 100GB, 200GB compressed) with speeds of 14GB/hour, 22GB/hour and 43GB/hour (28GB/hour, 44GB/hour and 86GB/hour compressed). Scalability is planned to a 6th generation product with native capacity of 800GB (1.6TB compressed) and a speed of 345GB/hour (690GB/hour compressed). A 2-to-1 compression ratio is achieved with Adaptive Lossless Data Compression (ALDC) technology.

KEY BENEFITS

DUAL DRIVE UPGRADE - A second modular drive and controller can be added later to upgrade to a Dual AIT Tape Subsystem as backup needs evolve that require DR protection, fault tolerant backup or greater unattended backup capacity.

HARDWARE INVESTMENT PROTECTION - The modular design of the Single AIT Tape Subsystem protects user investment by permitting the original single drive unit to be retained unmodified as part of the upgraded Dual AIT Tape Subsystem.

SPACE SAVER - The small dimensions and weight of the modular configurations facilitate the optimum use of datacenter space.

MEDIA INVESTMENT PROTECTION - For IT sites with an investment in AIT-1 media and drives, the newer AIT-2 and AIT-3 technologies are backward-read compatible, and forward-read compatible to future generations.

SERVICEABILITY - Modularity of design permits individual drives to be easily replaced in building-block fashion by the user.

KEY FEATURES

STACKABLE ENCLOSURES - Individual modular enclosures enable each drive and the mirrored backup controller to be handled as separate building blocks; facilitates field upgrade from single to dual drives.

LCD DISPLAY PANEL - Multi-function LCD continuously displays drive and backup status.

CONVENIENT DRIVE INTERFACE - RS232 interface for updating firmware and optimizing drive performance.

SERVICE AND SUPPORT - A variety of support programs provide installation and onsite service; includes GST's Accelerated Ship Program (GASP) to get replacement units on the scene rapidly.

WARRANTY - Purchase price includes a built-in manufacturer's warranty of three years.

GST, Inc.
Phone: 866-478-4621 or 949-900-1090 (for sales x 300)
Web: http://www.gstinc.com
Email: sales@gstinc.com


THIS ISSUE
SPONSORED BY:

Linoma Software
GST


BACK ISSUES

TABLE OF
CONTENTS

More Library List Management Techniques

Stay on the Same Subfile Page

Reader Feedback and Insights: Ted's Too Easy on Unix


Editors
Howard Arner
Joe Hertvik
Ted Holt
David Morris

Managing Editor
Shannon Pastore

Publisher and
Advertising Director:

Jenny Thomas

Advertising Sales Representative
Kim Reed

Contact the Editors
Do you have a gripe, inside dope or an opinion?
Email the editors:
editors@itjungle.com

Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.