Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

ADD: incorporate a file as a member

ADD adds a file as a member to a library. FD specifies the file, ED1 the member and LD the library.

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 the fields USER-DATE and USER-TIME of ED1 respectively. These fields must contain blanks if LMS is to enter the current date and time of day.
The catalog attribute CCS is entered as a member attribute for the target member.

The parameters OVERWRITE, RKEY, DESTROY and PROT-IND are interpreted.

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

  • No ISAM keys may be present in the member.

  • If the member contains file attributes (record type 164), these must match the attributes of the file.

  • If the member contains no file attributes, the entry RECORD-FORMAT=FIXED is illegal for the file.

  • The CCS name of the file must match that of the member.

OVERWRITE=NAME is not permitted.

The ED1.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 ED1.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 ED2 descriptor defining the base member must also be specified. If version automation is used, ED2 is ignored and the base version must then be specified in ED1.

Handling of delta members without version automation

  • If the member is to be stored as a delta member, the following must be true:

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

  • If the member is to be added 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:

    ED1.VERSION=ED2.VERSION

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

    ED1.VERSION != ED2.VERSION

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

RKEY

OVERWRITE

PROT-IND

LD-RETURN

Function control block

Interface version

Function code X’08’

Version automation

(UNUSE or INCP or INCB or HIGP)

Subroutine access identification

Physical overwriting

ISAM key and file attributes

Logical overwriting

Member protection

Full DMS file name in LD

FD


PASSWORD

LINK

NAME

File descriptor

Password as per PASSWORD command

Link name

File name

LD


PASSWORD

LINK

MAX-NAME-LEN

NAME

Library descriptor

Password as per PASSWORD command

Link name

Maximum length of library name

Library name

ED1


TYP

NAME

VERSION

STORE-FORM

USER-DATE

USER-TIME

Member descriptor (target)

Member type

Member name

Member version

Storage mode

Date specified by user

Time of day specified by user

ED2



TYP

NAME

VERSION

Member descriptor (base)

if ED1.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

FD


NAME

File descriptor

File name (if file identified by link name)

LD


NAME

Library descriptor (target library)

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

field of CB)

ED1


VERSION

Member descriptor (target member)

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