ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

PageUP/Down Indicator only being turned on when Subfile reaches end

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PageUP/Down Indicator only being turned on when Subfile reaches end

    I have a simple subfile created where the user is able to enter up to 42 detail records (6 per page). The subfile will be used for entry only and will not display any records from a file. I have the subfile defined as a size of 42 with a page size of 6.

    The functionality is working correctly in regards to allowing the user to enter up to 42 records and have the records written to the file successfully.

    The user has added a request that they would like to have the cursor position to the beginning of first field in the subfile each time they page down.

    I attempted to use the CSRLOC along with the PageUp and PageDown keywords in my DDS and this seems to be the way to do it. The problem is the PageUp and PageDown indicator is only being turned on when I scoll and reach the end of the subfile......the first 6 pages of the subfile I can page through and the indicator doesnt get turned on at all.

    If I could just get that indicator to turn on each time pageup or down is pressed then it would work fine.

    Any thoughts?

  • #2
    Re: PageUP/Down Indicator only being turned on when Subfile reaches end

    Have you got SFLEND in the DDS?
    Regards

    Kit
    http://www.ecofitonline.com
    DeskfIT - ChangefIT - XrefIT
    ___________________________________
    There are only 3 kinds of people -
    Those that can count and those that can't.

    Comment


    • #3
      Re: PageUP/Down Indicator only being turned on when Subfile reaches end

      You probably going to need to change your setup a bit and change this to a "one page at time subfile". When you are using a subfile with multiple pages, the operating system does not return control to the program when PageUp and PageDown are pressed, thus you cannot set indicators and position cursors.

      Comment


      • #4
        Re: PageUP/Down Indicator only being turned on when Subfile reaches end

        pre-read the subfile at load time........ reading to the first blank record

        then do something like this to z-add the currect back this will position the
        subfile to the correct page and a PC will position to the correct record.
        Code:
        f@@AD      cf   e             workstn INFDS(INFDS)         
        d Infds           ds                                        
        d Choice                369    369                          
        d Currec                378    379I 0                       
              *                                                                           
             c                   write     FKEY01                                         
             c                   write(e)  MSGCTL                                         
             c                   exfmt     SUB01CTL                                       
             c                   exsr      $clrmsg                                        
              *                                                                           
             c                   if        Currec <> *Zeros                               
             c                   eval      RRN1    =  Currec                              
             c                   eval      SCRRN   =  Currec                              
             c                   endif
        dds
        Code:
             A                                      SFLSIZ(0014)                       
             A                                      SFLPAG(0010)                       
             A                                      RTNCSRLOC(&#REC &#FLD)             
             A  99                                  ALARM                              
             A                                      OVERLAY                            
             A                                      SFLCSRRRN(&WHERE)                  
             A  31                                  SFLDSP                             
             A  32                                  SFLDSPCTL                          
             A  30                                  SFLCLR                             
             A  33                                  SFLEND(*MORE)                      
             A            SCRRN          4S 0H      SFLRCDNBR                          
              A                                  1  2DATE                                
              A                                      EDTCDE(Y)                           
              A                                  1 12TIME                                
              A            ATR_DACONM     1A  P                                          
              A            HDCOMPANY     30A  O  1 26DSPATR(&ATR_DACONM)                 
              A            C1TITLE       40A  O  2 21DSPATR(&ATR_DACONM)                 
              A                                  4  4'Type options, press Enter'         
              A                                      COLOR(BLU)                          
              A            HDPROGRAM     10A  O  1 71                                    
              A            #REC          10A  H                                          
              A            #FLD          10A  H                                          
              A            WHERE          5S 0H
        All my answers were extracted from the "Big Dummy's Guide to the As400"
        and I take no responsibility for any of them.

        www.code400.com

        Comment

        Working...
        X