The LIST ELEMENT action supports wildcards, OPTION SEARCH to search elements up the mam and also BUILD WITH COMPONENTS to expand component lists. This may potentially result in the same element being found more than once.
The results of the query are printed to C1MSGS when the elements are found. This is useful, for example, as it gives a rough idea about why the element shows up in the list.
However, writing duplicate actions for the same element in the output file might be problematic. For this reason, once all the elements have been found, the list is sorted by environment, system, subsystem, type and stage name in order to remove duplicates. Once sorted, the list is written to the output file.