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

Compare with Current View Page History

Version 1 Current »

7.117.2 SORT_LIST Examples

Example 1: Sort the entries in a list called #TOTALS by field #COMP into ascending order:

DEF_LIST   NAME(#TOTALS) FIELDS(#COMP #DEPT #DIV #SALES) TYPE(*WORKING) ENTRYS(200)

SORT_LIST  NAMED(#TOTALS) BY_FIELDS(#COMP)

Example 2: Sort the entries in a list called #TOTALS by fields #COMP and #DEPT into ascending order:

DEF_LIST   NAME(#TOTALS) FIELDS(#COMP #DEPT #DIV #SALES) TYPE(*WORKING) ENTRYS(200)

SORT_LIST  NAMED(#TOTALS) BY_FIELDS(#COMP #DEPT)

Example 3: Sort the entries in a list called #TOTALS by field #SALES (descending order), then fields #COMP #DEPT and #DIV in ascending order:

DEF_LIST   NAME(#TOTALS) FIELDS(#COMP #DEPT #DIV #SALES) TYPE(*WORKING) ENTRYS(200)

SORT_LIST  NAMED(#TOTALS) BY_FIELDS((#SALES *DESCEND) #COMP #DEPT #DIV)

  • No labels