Ü  SFLMSGID

 

·         This keyword is used at record level to show the message at the time subfile is displayed.

·         The message is displayed at the bottom if the status bar is not active. If the status bar is active then the message will be displayed at the status bar.

·         We can use the option indicator to condition the message.

 

 

Example

 

Below program is an editable subfile with options value as 1,2,4,5.

If we are entering any value other than the value mentioned above then it will show error message. The messages will be shown with the help of SFLMSGID keyword.

 

 

Columns . . . :    1  80              Edit                          AMITCCCCC/QRPGLESRC

SEU==>                                                                         EDTDSPC5

FMT DP .....AAN01N02N03T.Name++++++RLen++TDpBLinPosFunctions+++++++++++++++++++++++++++

0020.00      A          R EXPD_SFL                  SFL

0021.00      A  56                                  SFLNXTCHG

0022.00      A            S_OPT          1A  B  9  5

0023.00      A  50                                  COLOR(YLW)

0024.00      A            S_PNAME       12A  O  9 11

0025.00      A  50                                  COLOR(YLW)

0026.00      A            S_PNUM        12A  O  9 26

0027.00      A  50                                  COLOR(YLW)

0028.00      A            S_PADDR       10A  B  9 45

0029.00      A  50                                  COLOR(YLW)

0030.00      A  50                                  DSPATR(PC)

0031.00      A  51                                  DSPATR(PR)

0032.00      A N51                                  DSPATR(UL)

0033.00      A*

0034.00      A          R EXPD_CTL                  SFLCTL(EXPD_SFL)

0035.00      A                                      TEXT('y')

0036.00      A  43                                  SFLDSP

0037.00      A  42                                  SFLDSPCTL

0038.00      A  41                                  SFLCLR

0039.00      A  45                                  SFLEND(*MORE)

0040.00      A                                      SFLSIZ(9999)

0041.00      A                                      SFLPAG(0005)

0042.00      A  10                                  SFLMSGID(MSG0001 AMIT/AM_MSGF)

0044.00      A                                  8  5'OPT   PARTY NAME     PARTY NUMBER'

0045.00      A                                      COLOR(BLU)

0046.00      A                                  8 45'PARTY ADDRESS'

0047.00      A                                      COLOR(BLU)

 

 

 

 

 

Here in the below program we are setting the indicator 10 on, in case there is option value entry other than 1,2,4 or 5.

The message attached with this indicator is 'THE OPTION CAN NOT BE OTHER THAN 2,4,5')

 

 

 

 

Columns . . . :    6  80                 Browse                      AMITCCCCC/QRPGLESRC

SEU==>                                                                         EDTRPGC5

FMT *   *. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8

*************** Beginning of data **********************************************

0001.00  *

0002.00 HOPTION(*NODEBUGIO)

0003.00 FPARTYD    UF A E           K DISK

0004.00 FACCSUBPF  UF A E           K DISK

0005.00 FEDTDSPC5  CF   E             WORKSTN

0006.00 F                                     SFILE(EXPD_SFL:RRN)

0008.00  *

0009.00 DRRN              S              4P 0 INZ(*ZEROS)

 

0024.00 C                   DOW       *IN03=*OFF

0025.00 C                   EXSR      MAIN

0026.00 C                   EXSR      DSPLY

0027.00 C                   ENDDO

0028.00 C                   SETON                                        LR

0029.00  *______________________________________________

0030.00  *___MAIN SUBROUTINE BEGINGS HERE_______________

0031.00 C     MAIN          BEGSR

0032.00 C                   READC     EXPD_SFL

0033.00 C                   DOW       NOT %EOF()

0034.00 C                   SELECT

0035.00 C     S_OPT         WHENEQ    '1'

0036.00 C                   EXSR      OPTION1

0037.00 C     S_OPT         WHENEQ    '2'

0038.00 C                   EXSR      OPTION2

0039.00 C     S_OPT         WHENEQ    '4'

0041.00 C     S_OPT         WHENEQ    '5'

0042.00 C                   EXSR      OPTION5

0043.00 C                   OTHER

0043.01 C                   SETON                                        10

0045.00 C                   ENDSL

0046.00 C                   READC     EXPD_SFL

0047.00 C                   ENDDO

0048.00 C                   ENDSR

 

 

 

 

OUTPUT

 

 

 

AMIT                   DISPLAY THE EDITABEL SUBFILE                 10/04/13  

                                                                     13/59/28  

                                                                               

                                                                               

    OPTION: 1 = NEW A/C ENTRY FOR PARTY, 2=EDIT, 4 = DELETE, 5 =DISPLAY        

                                                                               

                                                                               

    OPT   PARTY NAME     PARTY NUMBER       PARTY ADDRESS                      

    3     IROBO          P00000000001       CHENNAI                            

    __    IROBO          P00000000002       EMPHAL                             

    __    SHMANT         P00000000003       CHENNAI                            

    __    AFTAB          P00000000007       HOMEIIEA                           

    __    AMI            P00000000008       HELLY CORN                         

                                                                        More...

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

  F3 = EXIT                                                                    

                                                                               

 

 

We enter option value as ‘3’ to check the message that appears.

 

 

 

                                                                                

                                                                               

  AMIT                   DISPLAY THE EDITABEL SUBFILE                 10/04/13  

                                                                     13/59/28  

                                                                               

                                                                               

    OPTION: 1 = NEW A/C ENTRY FOR PARTY, 2=EDIT, 4 = DELETE, 5 =DISPLAY        

                                                                               

                                                                               

                                                                              

                                                                               

    OPT   PARTY NAME     PARTY NUMBER       PARTY ADDRESS                      

    __    IROBO          P00000000001       CHENNAI                            

    __    IROBO          P00000000002       EMPHAL                             

    __    SHMANT         P00000000003       CHENNAI                            

    __    AFTAB          P00000000007       HOMEIIEA                            

    __    AMI            P00000000008       HELLY CORN                         

                                                                        More...

                                                                               

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

                                                                                

                                                                               

                                                                               

 THE OPTION CAN NOT BE OTHER THAN 2,4,5    >>>>>> Message shown in case we entered 3.

 





User Comments:





Copyright © Go4as400.com, 2013-2016. Copyright notice