You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

7.108 SELECTLIST

The SELECTLIST command is used in conjunction with the ENDSELECT command to form a loop to process all entries from a list that match certain criteria.

The list may be a browse list (used for displaying information at a workstation) or a working list (used to store information within a program).

For example, the SELECTLIST / ENDSELECT loop:

-----> SELECTLIST NAMED(#ORDERLINE) GET_ENTRYS(*ALTERED)

|      UPDATE     FIELDS(#ORDERLINE) IN_FILE(ORDLIN)

|                 WITH_KEY(#ORDER)

-----  ENDSELECT

forms a loop to process all entries in a list named #ORDERLINE that have been altered since they were added to it. Each changed entry is processed by the UPDATE command which reflects the change into file ORDLIN.

For more details of what lists are and list processing refer to the DEF_LIST (define list) command.

Also See

7.108.1 SELECTLIST Parameters

7.108.2 SELECTLIST Examples



                                                         Optional

  SELECTLIST --- NAMED -------- *FIRST ------------------------->
                                list name

             >-- GET_ENTRYS --- *ALL --------------------------->
                                *SELECT    <----
                                *ALTERED        |   Valid for
                                *NOTNULL        |  browse lists
                                *DISPLAY        |     only
                                *ADD            |
                                *CHANGE         |
                                *DELETE    <----

            >--- WHERE -------- 'condition' -------------------|
  • No labels