A little crude but also caters for the user selecting multiple rows. Presuming 
you're using a TABLE (temporary or permanent), TBDISPL and a panel with a 
)MODEL.

You'll need to set TBLNAME to you table name and PANELID to the name of your 
panel:-

TDTOP = 1                                                   
DO FOREVER                                                  
   IF ZTDSELS > 1 THEN "TBDISPL "TBLNAME                    
   ELSE DO                                                  
      "TBTOP   "TBLNAME                                     
      "TBSKIP  "TBLNAME" NUMBER("TDTOP")"                   
      "TBDISPL "TBLNAME" PANEL("PANELID")"                  
   END                                                      
   IF RC > 4 THEN LEAVE                                     
   TDTOP = ZTDTOP                                           
                                                            
   "CONTROL DISPLAY SAVE"                                   
   SELECT                                                   
      WHEN NEW ¬= " "  THEN CALL ADD                     
      WHEN OPT     = "B"  THEN CALL BROWSE         
      WHEN OPT     = "D"  THEN CALL DELETE                  
      OTHERWISE NOP                                         
   END                                                      
   "CONTROL DISPLAY RESTORE"                                
END                                                         


Mark Gozzard
Infrastructure Specialist
Sydney Tools Mainframe
ITO Service Delivery
HP Enterprise Services, South Pacific
Telephone +61 2 9012 5207
Email [email protected]   
level 4
36-46 George Street
Burwood  NSW Australia 2134
 
>From:   Dan <[email protected]>
>To:     [email protected], 
>Date:   02/21/2013 10:38 AM
>Subject:        ISPF Scrollable area
>Sent by:        IBM Mainframe Discussion List <[email protected]>
>
>
>
>I have a simple panel that contains over 100 rows within a scrollable 
>area.
>
>When I scroll down to the line I want to update, insert the data into the 
>input field and hit ENTER the panel is re-displayed as if it was scrolled 
>back to the top.  To verify that the data was correct I have to scroll 
>down again.
>
>Does anyone know how to NOT cause a scrollable area to be repositioned to 
>the top when the user hits ENTER?  (other than re-writing the dialog and 
>using a dynamic data area).
>
>Thanks
>Dan

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to