Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

COPY: copy a member

COPY copies a member.

ED1 specifies the source member, LD1 the source library, ED2 the target member and LD2 the target library.

LD1 and LD2 may designate the same library. The complete type, name and version of the target member must be specified.

There are four possible subcode specifications: UNUSE, INCP, HIGP and INCB
Subcode specifications other than UNUSE result in special treatment of the version specification (see "ED (Element Description)").

Moreover, the user can enter a date or time of day in fields USER-DATE and USER-TIME of ED2 respectively. If the date and time of the input member are to be taken over, these fields must contain blanks.

Parameters OVERWRITE, DESTROY and PROT-IND are interpreted.

If OVERWRITE=EXTEND is specified, the following must be true:

  • No ISAM keys may be present in the members.

  • If the input and output members contain file attributes (record type 164), these must match.

  • If only one of the members contains file attributes, RECORD-FORMAT=FIXED is illegal.

  • The CCS name of the source member must match that of the target member.

Overwriting the target name space (OVERWRITE=NAME)

OVERWRITE=NAME can be used to make the copied member the only member of the target library with the same type and name. Before making the copy, LMS deletes from the target library any members which have the same type and name as the target member. Hence all user specifications for the target member (such as INCP) are applied to a now empty target name space. INCP, for example, always causes the default version to be generated.

Restrictions

  • The input and output libraries must be different.

  • If an error occurs while the target name space is being cleared (typically if there is a write-protected member), the COPY function is aborted.

The ED2.STORE-FORM field defines the storage mode for the member being added. The storage mode must not conflict with the type or library attribute settings, and all the members of one type and name must have the same storage mode. Delta members may be overwritten only if they are part of a delta tree.

STORE-FORM=FULL

The member is created in full storage mode (error if not allowed).

STORE-FORM=STD

The member is created in the storage mode appropriate to its scope. Conflicting requirements result in an error. If there are no special requirements, full storage mode is selected.
If the required storage mode is DELTA and the subcode is UNUSE, the base is defined as the standard base. With all other subcodes the base is defined by the ED2.VERSION specification.

STORE-FORM=DELTA

The member is created in delta storage mode (error if not allowed). This is a valid specification for members of types S, P, D, J, M and X and types derived from them. If the subcode is UNUSE, the ED3 descriptor defining the base member must also be specified. If version automation is used, ED3 is ignored and the base version must then be specified in ED2.

Handling of delta members without version automation

  • If the member is to be included as a delta member, the following must apply:

    ED2.STORE-FORM=DELTA, ED2.TYP=ED3.TYP, ED2.NAME=ED3.NAME

  • If the member is to be included as the first member of a delta tree, no member of the same type and name may exist and in addition the following must apply:

    ED2.VERSION=ED3.VERSION

  • If the member is to be included as a subsequent member of a delta tree, ED3 must be used to specify the existing base member and the following must apply:

    ED2.VERSION != ED3.VERSION

Delta members can only be overwritten if they are part of a delta tree.

Call parameters

The parameter structures must be given in the following sequence in the subroutine call.

Parameter
structure

Field

Meaning

CB


SCBVERSION

FUNCTION

SUBCODE


ACC

DESTROY

OVERWRITE

PROT-IND

LD-RETURN

Function control block

Interface version

Function code X'0A'

Version automation
(UNUSE or INCP or INCB or HIGP)

Subroutine access identification

Physical overwriting

Logical overwriting

Member protection (STD or SAME)

Full DMS file name in LD

LD1


PASSWORD

LINK

MAX-NAME-LEN

NAME

Library descriptor (source library)

Password as per PASSWORD command

Link name

Maximum length of the library name

Library name

ED1


TYP

NAME

VERSION

Member descriptor (source member)

Member type

Member name

Member version

LD2


PASSWORD

LINK

MAX-NAME-LEN

NAME

Library descriptor (target library)

Password as per PASSWORD command

Link name

Maximum length of library name

Library name

ED2


TYP

NAME

VERSION

STORE-FORM

USER-DATE

USER-TIME

Member descriptor (target member)

Member type

Member name

Member version

Storage mode

Date specified by user

Time of day specified by user

ED3




TYP

NAME

VERSION

Member descriptor (base member)

if ED2.STORE-FORM = DELTA

and subcode=blank

Member type

Member name

Member version

Return parameters

Parameter
structure

Field

Meaning

CB


RETURNCODE

LMS-MSG

DMS-MSG

PLAM-MSG

Function control block

Return code

LMS message code

DMS message code

PLAM message code

LD1


NAME

Source library descriptor

Full DMS file name of library (dependent on LD-RETURN

field of CB)

ED1


VERSION

Member descriptor (source member)

Member version (if call used *HIGH)

LD2


NAME

Target library descriptor

Full DMS file name of library (dependent on LD-RETURN

field of CB)

ED2


VERSION

Member descriptor (target member)

Member version (with call using *HIGH or with version
automation)