Previous Topic: How to Allocate Data Sets for Large ElementsNext Topic: The Retrieve Statement


Restore Syntax

►►─ REStore ELEment ─ element-name ─┬──────────────────────────────┬─ FROm ───►
                                    └─┬─ THRough ─┬─ element-name ─┘
                                      └─ THRu ────┘
 ►─┬─ FILe ───┬─ dd-name ─┬──────────────────┬─ ENVironment ─ env-name ───────►
   └─ DDName ─┘           └─ SITe ─ site-id ─┘
 ►─ SYStem ─ sys-name ─ SUBsystem ─ subsys-name ─ TYPe ─ type-name ───────────►
 ►─ STAge NUMber ─ stage-no ─ TO ─ ENVironment ─ env-name ────────────────────►
 ►─ SYStem ─ sys-name ─ SUBsystem ─ subsys-name ─ TYPe ─ type-name ───────────►
 ►─┬─ STAge ─ stage-id ────────┬─ ELEment ─ element-name ─────────────────────►
   └─ STAge NUMber ─ stage-no ─┘
 ►─┬────────────────────────────────────────────────────────┬─────────────────►
   └─ WHERE ─ ¤ ─┬────────────────────────────────────┬─ ¤ ─┘
                 │                     ┌─ , ────┐     │ 
                 ├─ CCId ─┬─ EQ ─┬─ ( ─▼─ ccid ─┴─ ) ─┤
                 │        └─ = ──┘                    │
                 └─ ARChive ─┬─┤ DATE ├───────────┬───┘
                             ├─┤ FROM ├───────────┤
                             ├─┤ THROUGH ├────────┤
                             └─┤ FROM - THROUGH ├─┘
 ►─┬───────────────────────────────────────────────────────────────────┬─ . ──►◄
   └─ OPTions ─ ¤ ─┬─────────────────────────────────────────────┬─ ¤ ─┘
                   ├─ CCId ─ ccid ───────────────────────────────┤
                   ├─ COMment ─ comment ─────────────────────────┤
                   ├─ NEW VERsion ─ version ─────────────────────┤
                   ├─┬─ BYPass GENerate PROcessor ─────────────┬─┤
                   │ └─ PROcessor GROup ─┬─ EQ ─┬─ group-name ─┘ │ 
                   │                     └─ = ──┘                │
                   └─ RETain GENerate HIStory ───────────────────┘

Expansion of DATE

├── DATe ─┬─ EQ ─┬─ date ─┬────────────────────────┬───────────────────────────┤
          └─ = ──┘        └─ TIMe ─┬─ EQ ─┬─ time ─┘
                                   └─ = ──┘

Expansion of FROM

├── FROm ─ DATe ─┬─ EQ ─┬─ date ─┬────────────────────────┬────────────────────┤
                 └─ = ──┘        └─ TIMe ─┬─ EQ ─┬─ time ─┘
                                          └─ = ──┘

Expansion of THROUGH

├──┬─ THRough ─┬─ DATe ─┬─ EQ ─┬─ date ─┬────────────────────────┬─────────────┤
   └─ THRu ────┘        └─ = ──┘        └─ TIMe ─┬─ EQ ─┬─ time ─┘
                                                 └─ = ──

RESTORE ELEMENT element-name

Indicates the element(s) to be restored. Code the required syntax and enter the appropriate element name. In addition, you can use a name mask with the element name.

THROUGH (THRU) element-name

Indicates that a range of elements should be restored, beginning with the element coded in the RESTORE ELEMENT 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 new element name (in the TO clause).

FROM FILE (DDNAME) dd-name SITE site-id
ENVIRONMENT env-name
SYSTEM system-name
SUBSYSTEM subsys-name
TYPE type-name
STAGE NUMBER stage-no

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

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

The first clause of the FROM statement must be a FILE or DDNAME, indicating from which file the element is being restored. It must be followed by environment, system, subsystem, type, and stage number (either 1 or 2). The environment name must be explicit. You can use a name mask with the system, subsystem, type, and stage number.

The FROM file can be either an archive or unload file, or a concatenation of archive files or unload files. You cannot concatenate archive and unload files in a single RESTORE action.

Note: If you code more than one RESTORE statement in your SCL, each RESTORE statement can point to a different DDNAME and a different file type (archive or unload).

Entering a site ID is optional. This field further defines the location of the element being restored.

TO ENVIRONMENT env-name
SYSTEM system-name
SUBSYSTEM subsys-name
TYPE type-name
STAGE stage-id
STAGE NUMBER stage-no
ELEMENT element-name

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

If no SET TO clause has been coded, CA Endevor SCM retrieves the required information from the FROM clause coded for this action. Environment must be coded first in TO.

You must specify an environment, system, subsystem, type, and stage. The stage specification can be either one of the following:

Remember that you cannot use a name mask with a TO field name. Enter a different element name if you want to change the element name specified (that is, the archived element name) in the RESTORE ELEMENT clause. If you do not enter an element name here, CA Endevor SCM uses the archived element name.

WHERE

Use WHERE clauses to further qualify element selection criteria. CA Endevor SCM uses both the WHERE clause in an action and any preceding SET WHERE clause to determine the "where" criteria for that action.

WHERE CCID ccid -Limits the processing to those elements that match one of the supplied CCIDs. You can use a name mask in this field.

If you need to select elements identified under more than one CCID, you can specify multiple CCIDs by enclosing the CCIDs with parentheses and separating them with commas. The CCIDs may extend over multiple lines if necessary.

The following examples illustrate the use of this clause:

Example 1: WHERE CCID EQ PROJ__V
Example 2: WHERE CCID (PROJ__1, PROJ__2, PROJ__4)

WHERE ARCHIVE-This clause allows you to select elements based on the date and, optionally, time that an element was archived. There are four possible forms for this clause:

WHERE ARCHIVE DATE mm/dd/yy [TIME hh:mm ]

This clause tells CA Endevor SCM to archive only those elements with this date, and optionally, time stamp.

WHERE ARCHIVE FROM DATE mm/dd/yy [TIME hh:mm]

This clause tells CA Endevor SCM to archive all elements with a date and, optionally, time stamp on or after the specified date and time stamps.

WHERE ARCHIVE THROUGH DATE mm/dd/yy [TIME hh:mm ]

This clause tells CA Endevor SCM to archive all elements with a date and, optionally, time stamp earlier than and including the specified date and time stamp.

WHERE ARCHIVE FROM DATE mm/dd/yy [TIME hh:mm ]

THROUGH DATE mm/dd/yy [TIME hh:mm ]

This clause tells CA Endevor SCM to archive only those elements with date, and optionally, time stamps within the specified range.

Note: If you enter a time, you must enter a date with it.

OPTIONS

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 RESTORE action fails.

When you specify a CCID and/or comment in a RESTORE action for an existing element, CA Endevor SCM uses this CCID and/or comment to:

CA Endevor SCM sets the source, source delta, and RETRIEVE CCID and/or COMMENT fields based on the archive data set.

NEW VERSION version-Tells CA Endevor SCM to assign the specific version number to the element. Acceptable values are 1-99. If the element exists at the target location or at a location up the mapped route, the RESTORE action fails.

BYPASS GENERATE PROCESSOR-Tells CA Endevor SCM not to execute the generate processor after restoring the element.

PROCESSOR GROUP EQ/= group name-Tells CA Endevor SCM which processor group to associate with the restored element. The keywords PROCESSOR GROUP EQ and BYPASS GENERATE PROCESSOR are mutually exclusive (you can code one or the other). If both are coded, the default BYPASS GENERATE PROCESSOR is used.

RETAIN GENERATE HISTORY – Retain the Master Control File last generate information. This option when used with the Transfer to Archive action can be useful when converting elements to a new delta type.

Example: Restore SCL

This SCL restores all of the COBOL elements from the archive file associated with the ARCHIN DD statement that you specify in the execution JCL.

RESTORE ELEMENT ' '
  FROM FILE ARCHIN
		ENVIRONMENT 'PROD'
		SYSTEM 'PAYROLL'
		SUBSYSTEM 'REPORTS'
		TYPE 'COBOL'
		STAGE NUMBER 1
  TO 		ENVIRONMENT 'PROD'
		SYSTEM 'PAYROLL'
		SUBSYSTEM 'REPORTS'
		TYPE 'COBOL'
		STAGE NUMBER 1
  OPTIONS 	CCID REQ344145
		COMMENT 'ARCHIVE REPORTING SUBSYSTEM PROGRAMS'