Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

7.108 SELECTLIST

Note
titleNote:
Note: Usage options

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

...


Panel
bgColor#ffffcc

                                                                                        Optional

  SELECTLIST --

No Format
                                                        Optional   SELECTLIST

---

NAMED

----------

*FIRST

--

----------------------->

                                list name              >-- GET_ENTRYS --- *ALL


                                                         list name

                     >-- GET_ENTRYS ----- *ALL -------------------------

-->                                 

>
                                                        *SELECT    <----

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


                                                       *ALTERED           |   Valid for
                                                      *NOTNULL          |  browse lists
                                                      *DISPLAY            |     only
                                                      *ADD                  |
                                                     *CHANGE            |
                                                     *DELETE    <-----

                    >--- WHERE --------

'condition'

----------------------|