Previous Topic: The Add StatementNext Topic: The Archive Statement


Add Syntax

►►─ ADD ELEment ─ element-name ─┬──────────────────────────────┬──────────────►
                                └─┬─ THRough ─┬─ element-name ─┘
                                  └─ THRu ────┘
 ►─ FROm ─┬─┬─ FILe ───┬─ dd-name ─────────────────────────────┬─ TO ─────────►
          │ └─ DDName ─┘                                       │
          ├─ DSName ─ dataset-name ─┬────────────────────────┬─┤
          │                         └─ MEMber ─ member-name ─┘ │
          └─ PATH ─ usspath ─ HFSFILE ─ filename ──────────────┘
 ►─ ENVironment ─ env-name ─ SYStem ─ sys-name ─ SUBsystem ─ subsys-name ─────►
 ►─ TYPe ─ type-name ─────────────────────────────────────────────────────────►
 ►─┬─────────────────────────────────────────────────────────────────────┬────►
   └─ OPTion ─ ¤ ─┬────────────────────────────────────────────────┬─ ¤ ─┘
                  ├─ CCId ─ ccid ──────────────────────────────────┤
                  ├─ COMment ─ comment ────────────────────────────┤
                  ├─ NEW VERsion ─ version ────────────────────────┤
                  ├─ UPDate if present ────────────────────────────┤
                  ├─ DELete input source ──────────────────────────┤
                  ├─ OVErride SIGNOut ─────────────────────────────┤
                  ├─┬─ BYPass GENerate PROcessor ────────────────┬─┤
                  │ └─ PROcessor GROup ─┬─ EQual ─┬─ group name ─┘ │
                  │                     └─ = ─────┘                │
                  └─ AUTogen ─┬───────────────────┬────────────────┘
                              ├─ SPAN NONe ───────┤
                              ├─ SPAN ALL ────────┤
                              ├─ SPAN SYStems ────┤
                              └─ SPAN SUBsystems ─┘
 ►─ . ────────────────────────────────────────────────────────────────────────►◄
ADD ELEMENT element-name

Indicates the element or elements to be added. You can use a name mask in the element name to specify more than one element. For more information about syntax rules, see Element Name Syntax Rules.

THROUGH (THRU) element-name

Indicates that a range of elements should be added, beginning with the element coded in the ADD ELEMENTS statement, up to and including the element specified in this statement. You can use a name mask with the element name. If you use the THROUGH clause, however, you cannot enter a member name in the FROM clause.

Note: If you are working with a sequential file, the THROUGH clause is ignored.

FROM FILE (DDNAME) dd-name
DSNAME dataset-name
MEMBER member-name
PATH usspath
HFSFILE filename

The FROM clause indicates the location of the element being added. CA Endevor SCM uses both the FROM clause in the action and any preceding SET FROM clause to determine the "from" criteria for that action.

Note: For more information, see the description of the SET FROM statement in the chapter "Using Set, Clear, and EOF Statements."

The SET FROM statement allows you to specify only a file (DDname) or data set name, not a member name.

You must enter a FILE, DDNAME, DSNAME, or PATH in conjunction with HFSFILE (enter one and only one). If you enter either a FILE or DDNAME, be sure the appropriate JCL DD statement is coded.

Enter a member name if it differs from the element name specified in the ADD ELEMENTS clause. If you do not enter a member name, CA Endevor SCM assumes that the element name and member name are the same. If you provide a member name:

PATH

The USS directory where the element source file resides.

HFSFILE

The file in the USS directory that you want to put under the control of CA Endevor SCM.

TO ENVIRONMENT env-name
SYSTEM sys-name
SUBSYSTEM subsys-name
TYPE type-name

The TO clause indicates where the element is being added. CA Endevor SCM uses both the TO clause in the action and any preceding SET TO clause to determine the "to" criteria for that action.

Note: For more information, see the description of the SET TO statement in the chapter "Using Set, Clear, and EOF Statements."

You must specify an environment, system, subsystem, and type for the ADD action. Remember that you cannot use a name mask with any field in the TO location.

OPTIONS

OPTION clauses allow you to further specify action requests.

CCID ccid/COMMENT comment

You can enter a 1- to 12-character CCID and/or a 1- to 40-character comment.

CCIDs and/or comments may be required. If you do not provide a required CCID and/or comment, the ADD action fails.

When you specify a CCID and/or comment in an ADD action, CA Endevor SCM treats the CCID and/or COMMENT fields differently depending on whether you are adding a new element or an existing element.

CA Endevor SCM also clears the environment's entry stage RETRIEVE CCID and/or COMMENT fields when you add an existing element. If you use the BYPASS GENERATE PROCESSOR option, the ADD action does not set the generate or component list delta CCID and/or COMMENT fields.

NEW VERSION version

If the element exists up the map, the version number associated with the existing element will be assigned, by default. If the New Version clause is omitted and the element does not exist up the map, the element is assigned version 1. If the New Version clause is used and the element exists at the target location or at a location up the mapped route, the ADD action fails.

UPDATE IF PRESENT

To successfully add an element to CA Endevor SCM, that element cannot currently exist in the entry stage.This also applies to a sourceless element. If the element is present in the entry stage, CA Endevor SCM returns an error message, regardless of whether the element at the entry stage is a sourced or sourceless element. The UPDATE IF PRESENT option, however, allows you to add the element even if it is in the entry stage, by automatically changing the ADD action to UPDATE.

DELETE INPUT SOURCE

After an element has been successfully added to CA Endevor SCM, you can use this option to remove the member from the library in which it originated.

If you input a sequential file, this option deletes that file.

OVERRIDE SIGNOUT

If the element has been signed out to a person other than yourself, you must code this option to perform this action. This option updates the signout ID at the appropriate stage, with the user ID of the person performing the override. Use OVERRIDE SIGNOUT with caution to avoid regressing changes made by another user.

BYPASS GENERATE PROCESSOR

Use this option if you do not want the generate processor executed for the element. Otherwise, as part of normal processing, CA Endevor SCM looks for and executes the generate processor for the element when it is added.

PROCESSOR GROUP EQ/= group name

You can specify that a particular processor group be used for this action. If you do not indicate a processor group and:

AUTOGEN | SPAN NONE| SPAN ALL | SPAN SYSTEMS | SPAN SUBSYSTEMS

Applicable for Add, Update, and Generate actions in batch requests. This option cannot be used in packages and the option does not work if Bypass Generate Processor is set. The Global Type Sequencing batch processing method must be enabled. Autogen only acts on components whose Types are listed in the Global Type Sequencing table. If the component's Type is not listed in the Global Type Sequencing table, the Autogen request is ignored. In addition, your site must have purchased and activated the CA Endevor Automated Configuration. Autogen can be specified alone or with various Span keyword options. "Autogen Span" is not a valid option. Valid options follow:

AUTOGEN

Generates all elements that use the component that is the target of the action. These using elements are generated at the target location that is specified in the SCL statement. If they do not exist at the target location, they are brought back to the target location as sourceless elements. An administrator can change the behavior of the Autogen feature, by activating AUTOGEN_SOURCE in the Optional Features Table (ENCOPTBL). When this option is activated, the Generate actions for the using elements are built with the Copyback, instead of the NoSource, option. For more information about sourceless elements, see the NoSource option description in Generate Syntax.

Note: Using elements are elements that use the element that is the target of an Add , Update, or Generate action. For example, if Autogen is specified for copybook, COPYA, then the programs that use that copybook are known as using elements.

AUTOGEN SPAN NONE

Generates all elements that use the component being acted upon. This option has the exact same effect as the option "AUTOGEN."

AUTOGEN SPAN ALL

Generates using elements that are found in any System and Subsystem combinations within the Environment and Stage of the component's logical map.

AUTOGEN SPAN SYSTEMS

Generates using elements found in any System, provided the element's Subsystem name matches the name of the Subsystem of the target component. Only Systems found within the Environment and Stage of the component's logical map or higher up the map are searched. This option is different from the Autogen option in that it includes additional Systems with the same Subsystem name in the search.

AUTOGEN SPAN SUBSYSTEMS

Generates using elements from all Subsystems with the same-named System of the component specified. Only Subsystem found in the System of the target component within the Environment and Stage of the component's logical map or higher up the map are searched. This option is different from the Autogen option in that it includes additional Subsystems with the same System in the search.

The following restrictions apply to the SPAN options:

Example: Add SCL

This SCL adds a new element to the Payroll reporting subsystem in the environment PROD. After the ADD action completes, the source member will be deleted.

ADD ELEMENT 'PAYRPT31'
 TO  ENVIRONMENT 'PROD'
   	 SYSTEM 'PAYROLL'
     SUBSYSTEM 'REPORTS'
     TYPE ' COBOL'
 FROM DSNAME 'PAYROLL.SRCLIB'
 OPTIONS DELETE INPUT SOURCE
     CCID REQ#43213
     COMMENT 'ADD THE NEW PAYROLL REPORTING PROGRAM' .