Rituraj singh
Rituraj singh

Reputation: 21

Subfile Crud Operation Invalid Option Logic

When we enter any invalid option on the main screen the reverse image and pc is turning on for every subfile field,

//***************************************************************************
//*         -------        Option Selection Subroutine     ---------        *
//***************************************************************************
Begsr Optionsr                  ;
  If RRN > 0                    ;
  readc DSPSFL                  ;
  endif                         ;

  Dow Not %EOF()                ;
  //comment sflnxtchg and then call
   //SflNxtChg  = *On            ;

    Select                      ;

      // When Cancel=*On           ;
      //   Cancel=*Off             ;
      //   Leave                   ;

      // When Exit=*on             ;
      //   Exit=*Off               ;
      //   Exsr Exitsr             ;

      When S1Opt= 5           ;
          //Clear DMSG        ;
          Exsr DspRecordsr    ;

      When S1opt= 4            ;
          Exsr DelRecordsr      ;
          Ind_ReloadSfl =  *On  ;

      When S1Opt= 3            ;
          Exsr Copysr           ;
          Ind_ReloadSfl = *On   ;

      When S1Opt= 2            ;
          //Exsr Editrecordsr     ;
          Ind_ReloadSfl=*On     ;    

      Other        ;

          Ind_s1Opt=*On         ;
          //Ind_ReloadSfl=*On     ;
           //SflNxtChg  = *On     ;
          //Update DSPSFL         ;
          White=*off            ;
          Red=*On               ;
          DMSG = 'Option is Invalid' ;
          //Leavesr               ;

    Endsl                       ;
    Clear S1OPT                 ;
    Update DSPSFL              ;
    Readc DSPSFL                ;
  Enddo                         ;
  //SFLNXTCHG=*OFF                ;
  If Ind_ReloadSfl = *On        ;
    Ind_ReloadSfl = *Off        ;
    Exsr ClrSubFile             ;
    ExSr LoadSubfile            ;
  Endif                         ;
Endsr                           ;

Upvotes: 0

Views: 36

Answers (0)

Related Questions