The @@MRG_LSTS command is used to update a list by merging other lists with it, and can also optionally merge attributes for fields in the list. Attributes will only be merged if the field does not already exist in the INTO_LST.
Required
@@MRG_LSTS ---- FROM_LSTS ----- nn --- attributes ------------>
| | | |
| --- 7 max ---- |
| |
---------- 2 max ---------
>--- INTO_LST ------ nn ---------------------------|
Parameters
FROM_LSTS
Specifies the list numbers from which the list is to be built. The optional attributes on each list specify the 10 character attributes to be merged with the fields in the FROM_LST if this field does not already exist in the INTO_LST. If the field is already in the INTO_LST then the attribute will not be merged. These list numbers should have been previously built by the @@RTV_FLDS or @@MAK_LSTS commands. This number may be a 1 or 2 character numeric or a 2 character index name. If it is an index name, then the current index value will be substituted in this command. Refer to the @@SET_IDX, @@INC_IDX, @@DEC_IDX, @@CMP_IDX commands for setting and using indexes.
INTO_LST
Specifies the list to be built from the list merging. This number may be a 1 or 2 character numeric or a 2 character index name. If it is an index name, then the current index value will be substituted in this command. Refer to the @@SET_IDX, @@INC_IDX, @@DEC_IDX, @@CMP_IDX commands for setting and using indexes.
Examples
The following examples apply to the @@MRG_LSTS command.
Example 1: Merge user selected fields which can't be updated in the primary file with the *OUTPUT attribute, with the display panel fields list.
@@CLR_LST NUMBER(6)
@@MRG_LSTS FROM_LSTS((5 *OUTPUT)) INTO_LST(6)
Example 2: Merge key fields of the file with the *HIDDEN attribute into the display panel fields list.
@@RTV_KEYS OF_FILE(1) INTO_LST(3)
@@CLR_LST NUMBER(4)
@@MRG_LSTS FROM_LSTS((3 *HIDDEN)) INTO_LST(4)