Previous Topic: The Retrieve StatementNext Topic: The Signin Statement


Retrieve Syntax

├── RETrieve ELEment ─ element-name ─┬──────────────────────────────┬─────────►
                                     └─┬─ THRough ─┬─ element-name ─┘
                                       └─ THRu ────┘
 ►─┬─────────────────────┬─┬─────────────────┬─ FROm ─────────────────────────►
   └─ VERsion ─ version ─┘ └─ LEVel ─ level ─┘
 ►─ ENVironment ─ env-name ─ SYStem ─ sys-name ─ SUBsystem ─ subsys-name ─────►

 ►─ TYPe ─ type-name ─┬─ STAge ─ stage-id ────────┬─ TO ──────────────────────►
                      └─ STAge NUMber ─ stage-no ─┘
 ►─┬─┬─ FILe ───┬─ dd-name ─────────────────────────────┬─────────────────────►
   │ └─ DDName ─┘                                       │
   ├─ DSName ─ dataset-name ─┬────────────────────────┬─┤
   │                         └─ MEMber ─ member-name ─┘ │
   └─ PATH ─ usspath ─ HFSFILE ─ filename ──────────────┘
 ►─┬──────────────────────────────┬───────────────────────────────────────────►
   └─ WHEre ─ ¤ ─┬──────────┬─ ¤ ─┘
                 ├─┤ CCID ├─┤
                 └─┤ PRO ├──┘
 ►─┬──────────────────────────────────────────┬─ . ────────────────────────────┤
   └─ OPTion ─ ¤ ─┬─────────────────────┬─ ¤ ─┘
                  ├─ CCId ─ ccid ───────┤
                  ├─ COMment ─ comment ─┤
                  ├─ REPlace member ────┤
                  ├─ NO SIGNOut ────────┤
                  ├─ EXPand include ────┤
                  ├─ OVErride SIGNOut ──┤
                  └─┬─ SEArch ◄ ─┬──────┘
                    └─ NOSearch ─┘

Expansion of CCID

                                                     ┌─ , ────┐
├── CCId ─┬──────────────────────┬─┬───────────┬─ ( ─▼─ ccid ─┴─ ) ────────────┤
          └─ OF ─┬─ CURrent ◄ ─┬─┘ ├─ EQual ◄ ─┤
                 ├─ ALL ───────┤   └─ = ───────┘
                 └─ RETrieve ──┘

Expansion of PRO

                                     ┌─ , ──────────┐
├── PROcessor GROup ─┬─ EQual ─┬─ ( ─▼─ group name ─┴─ ) ──────────────────────┤
                     └─ = ─────┘

RETRIEVE ELEMENT element-name

Indicates the name of the element(s) to be retrieved. You can specify the element name using a name mask, unless you want to retrieve a specific level of the element.

THROUGH (THRU) element-name

Indicates that a range of elements should be retrieved, beginning with the element coded in the RETRIEVE 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, you cannot enter a member name in the TO clause or a different level in the LEVEL clause.

VERSION version LEVEL level

Indicates the version and level number you want to retrieve. You must code a full element name if you want to indicate a version level. You cannot enter this clause if you use the THROUGH clause. Acceptable version numbers are 1-99. Acceptable level numbers are 00-99. By default, information for the current version level is retrieved. VERSION and LEVEL must be specified together. If you enter this clause, you cannot use the THROUGH clause.

FROM ENVIRONMENT env-name
SYSTEM system-name
SUBSYSTEM subsys-name
TYPE type-name
STAGE stage-id
STAGE NUMBER stage-no

The FROM clause indicates the location of the element being retrieved. 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.

You must specify an environment, system, subsystem, type, and stage. The environment name must be explicit. You can use a name mask with the system, subsystem, type and stage. The stage specification can be either one of the following:

If you use a name mask with the stage, CA Endevor SCM begins searching for the specified element in Stage 1 of the current environment, and retrieves the first element that matches the specified element name, regardless of its location, version or level.

If the element is sourceless, the source is retrieved from the next sourced element found up the map. You will get a warning message if the last level timestamp on the retrieved element is not the same as the sourceless element.

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

The TO clause indicates where the element is being retrieved. 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.

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 is coded.

Enter a member name if it differs from the element name specified in the RETRIEVE ELEMENT clause. Remember that you cannot use a name mask with a TO field name.

If you do not enter a member name, CA Endevor SCM assumes that the element name and member name are the same. If you code a member name:

The SET TO MEMBER clause does not apply to the RETRIEVE action.

PATH

The USS directory to which you want to retrieve the element. This has a maximum of 768 characters.

HFSFILE

The name of the file for the retrieved element. The file name has a maximum of 255 characters.

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 OF 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 OF CURRENT (PROJ__1, PROJ__2, PROJ__4)
Example 2: WHERE CCID OF ALL (PROJ__V)

WHERE PROCESSOR GROUP group name- This clause allows you to select elements according to a specified processor group. You can use a name mask when specifying the processor group name.

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

The following examples illustrate the use of this clause.

Example 1: WHERE PROCESSOR GROUP (COBVS, COBII)
Example 2: WHERE PROCESSOR GROUP (COBV)

OPTIONS

OPTIONS 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 RETRIEVE action fails.

When you specify a CCID and/or comment in a RETRIEVE action for an existing element, CA Endevor SCM uses this CCID and /or comment to set the RETRIEVE CCID and/or COMMENT fields.

REPLACE MEMBER-If you retrieve an element to a library, CA Endevor SCM checks to see whether that element is currently in the library. By default, if this condition exists, the request will be rejected. The REPLACE MEMBER option, however, enables you to replace the member currently in the library with the retrieved element. Specify this option when you want to replace the existing member in the library.

NO SIGNOUT-This option is applicable only if SIGNIN/SIGNOUT is in effect for the system. NO SIGNOUT enables the element to be retrieved without signing it out; that is, if you select this option, the element is not signed out to your user ID. This enables another user to retrieve the element at the same time you are working with it.

Similarly, if you want to use an element currently signed out to another user, you can retrieve a copy of it if that user has selected the NO SIGNOUT option.

If you use NO SIGNOUT, any CCIDS and comments are ignored. Consequently, the Master Control File is not updated

EXPAND INCLUDES-This option indicates that INCLUDE statements should be expanded when the element is copied to the external data set.

In addition, the type definition for this element must specify an INCLUDE library.

OVERRIDE SIGNOUT-If the element has been signed out to a person other than yourself, you must code this option in order to perform this action. Use OVERRIDE SIGNOUT with caution to avoid regressing changes made by another user.

SEARCH/NOSEARCH-The SEARCH option tells CA Endevor SCM to look for the element to be retrieved along the map, if it is not in the current environment. The default is SEARCH.

Code NOSEARCH to restrict CA Endevor SCM's search to the current environment.

Example: Retrieve SCL

This SCL retrieves Payroll program "PAYRPT23." The map will be searched if the program is not found at Stage 1.

RETRIEVE ELEMENT 'PAYRPT23'
  FROM ENVIRONMENT 'PROD'
	SYSTEM 'PAYROLL'
	SUBSYSTEM 'REPORTS'
	TYPE 'COBOL'
	STAGE 1
  TO 	DSNAME 'PAYROLL.SRCLIB' MEMBER 'PAYRPT31'
  OPTIONS CCID REQ#43_24
	COMMENT 'RETRIEVE THE FICA TAX REPORTING PROGRAM'
	SEARCH
	REPLACE MEMBER .