LMMOVE—move members of a data set

The LMMOVE service moves members of a partitioned data set or an entire sequential data set. Once the data has been moved, the "from" data set or members are deleted. Packing data, replacing members, and automatic truncation are optional. Only fixed-length and variable-length data sets can be packed.

Completion of the LMINIT service is required before you invoke LMMOVE. You must specify ENQ(MOD) with the LMINIT service if you want to use LMMOVE to append records to the "to-data-id". See LMINIT—generate a data ID for a data set for information that can help prevent some common I/O errors that might occur when using the LMMOVE service. LMMOVE requires that the "to-data-id" be closed before invocation. The "from-data-id" must also be closed when moving sequential data sets.
Note:
  1. FROMID and TODATAID can refer to the same data set but they cannot have the same data-id.
  2. LMMOVE does not support the copying of unmovable data sets (data set organization POU or PSU).
  3. If the ALIAS option is in effect, LMMOVE automatically processes alias members as follows:
    • Either the main member or any alias member may be selected to move the main member and all of its aliases. This will occur even if some of the members are not displayed in the current member selection list.
    • Alias members are moved for both load and non-load data sets as well as for PDS and PDSE data sets.

    Moving to the same data set is not supported when aliases are automatically selected, as it would result in the "from" and "to" member names being the same.

  4. If the NOALIAS option is in effect, LMMOVE does not move alias members unless either:
    • All members of the data set are selected.
    • A member pattern is used and both the main member and the alias member are included in that pattern.

    If the NOALIAS option is in effect, moving an alias member by itself will result in a new member being created, even if the main member has already been moved.

  5. If from-data-id represents an empty sequential data set, LMMOVE performs the copy but sets the return code to 4 as a warning.