7 84 2 SELECTLIST Examples

LANSA Technical

7.84.2 SELECTLIST Examples

Example 1: Process all "altered" entries from a list named #ORDERLINE. Refer to the DEF_LIST command for more details of lists and list processing.

SELECTLIST NAMED(#ORDERLINE) GET_ENTRYS(*ALTERED)
      << Commands to process the list >>
      << Commands to process the list >>
      << Commands to process the list >>
ENDSELECT
 

Example 2: Process all "selected" entries from a list named #ORDERLINE.

SELECTLIST NAMED(#ORDERLINE) GET_ENTRYS(*SELECT)
      << Commands to process the list >>
      << Commands to process the list >>
      << Commands to process the list >>
ENDSELECT
 

Example 3: Process all entries where quantity is greater than 0 in working list #ORDERLINE.

SELECTLIST NAMED(#ORDERLINE) WHERE('#QUANTITY *GT 0')
      << Commands to process the list >>
      << Commands to process the list >>
      << Commands to process the list >>
ENDSELECT