Previous Topic: USE Parameter OverviewNext Topic: WITH VALUES Clause


USE Parameter

Purpose

Permits the nesting of USE syntax within stored code.

Syntax

►►──── USE ─┬──────────────┬─┬─ member-name ────────────────┬─────────────────►
            ├─ DEFINITION ─┤ ├─ 'module-name'─┬───────────┬─┤
            ├─ REPORT ─────┤ │                └─ version ─┘ │
            └─ ROUTINE ────┘ └─ * ──────────────────────────┘

 ►─┬───────────────────────────────────┬──────────────────────────────────────►
   └─ use-clause ─┬──────────────────┬─┘
                  └─ AND use-clause ─┘

 ►─┬──────────────────────────────────────────────────────┬──┬───────┬────────►◄
   │            ┌───────────────────────────────────────┐ │  └─ END ─┘
   └─ DEFAULT ──▼─ &&x = ─┬── keyword = key-value  ───┬─┴─┘
                          └┬─────────────┬─ argument ─┘
                           └─ keyword = ─┘

Syntax Rules

USE

Identifies a USE parameter. This keyword must precede all other clauses associated with this parameter. USE cannot appear in code that specifies =COPY or =MACRO parameters.

DEFINITION/REPORT/ROUTINE

These are optional identifiers that are for documentation purposes only. If one of these identifiers is used, it must follow USE and precede member-name or module-name (see below).

member-name

The name by which the stored code is accessed, as follows:

The code must be stored in a library before run time and must be made available to the precompile phase of CA Culprit processing. The code must be stored with a record length of 80 bytes.

If the PARMLIB= option is coded on a PROFILE parameter that appears before the USE parameter, the parameters are copied from the library specified by the PARMLIB= option. Otherwise, the parameters are copied from the library selected as the default for PARMLIB at installation.

Note: For more information on system defaults, see the CA IDMS Installation Guide for your operating system.

module-name

(IDD only) Specifies a 1- to 32-character alphanumeric expression, enclosed in quotation marks, which identifies the module containing stored code.

version

Specifies the module version number; if no value is specified, CA Culprit uses the highest version number known to the data dictionary for module-name.

*

This modifies the input stream parameters that immediately follow the USE parameter. An END clause signals the end of code modified by USE *.

DEFAULT

Identifies a DEFAULT clause. One DEFAULT clause is permitted with each USE parameter. In stored code, the DEFAULT clause should be the first line of code; in inline code, the DEFAULT clause should follow the USE parameter and associated WITH VALUES, CHANGE, DROP/KEEP, and RENUMBER clauses.

&&x =

Represents a symbolic parameter in stored or inline code. Symbolic parameter names are composed of && followed by a single alphanumeric character in the range 1 through 9 or A through Z. The symbolic parameter must be followed by an equal sign; no spaces surround the equal sign. Symbolic parameter names in the form &&x must be entered sequentially, starting with &&1.

This is followed by keyword = key-value or keyword = argument, a 1- to 72-character alphanumeric expression that associates a symbolic parameter with a keyword expression or argument.

The following rules apply to coding keyword and argument expressions on a DEFAULT clause:

keyword =

A keyword associated with a symbolic parameter. If a WITH VALUES clause contains a keyword expression, the keyword definition is expected on the DEFAULT clause. Keyword is optional if the WITH VALUES clause contains arguments. (The WITH VALUES clause is discussed later in this chapter.)

key-value

Specifies a default value for the symbolic parameter. Default values are substituted for all symbolic parameters that are not assigned keyword values in the WITH VALUES clause.

argument

Supplies a default value for the symbolic parameter. Default values are substituted for all symbolic parameters that are not assigned argument values in the WITH VALUES clause. If no value for a symbolic parameter is defined in a DEFAULT clause, a null character string is used as the default.

use-clause

Specifies one of four optional clauses associated with the USE parameter that modify the copied or inline code. The four clauses are WITH VALUES, CHANGE, DROP/KEEP, and RENUMBER

Each clause is discussed separately later in this chapter.

AND

Signals the end of an action or clause and begins a new action or clause. AND links two clauses if it appears between two USE parameter clauses; that is, a clause that specifies WITH VALUES, CHANGE, DROP/KEEP, or RENUMBER. Any number of USE parameter clauses can be joined by the keyword AND, as shown in the example below:

USE * DROP 4 AND RENUMBER 7 AND CHANGE 'DEBIT' TO 'CREDIT'

In this example, AND links USE parameter clauses that drop type 4 edit parameters, renumber type 7 process parameters, and replace a character string.

When a clause action follows the keyword AND, AND signals the end of a clause action and the start of another action associated with the same clause, as shown in the example below:

USE * DROP 4 AND FIELD DEPARTMENT

In this example, AND links an action to drop all type 4 edit parameters and an action to drop the parameter that defines DEPARTMENT. Any number of actions can be linked by using the keyword AND.

END

Signals the end of a portion of inline CA Culprit code processed by a USE * parameter. No additional information, except comments, can appear with an END clause.

Usage

Coding Considerations

Special coding considerations that apply only to the USE parameter are as follows:

More information:

PROFILE Parameter

Storing and Accessing CA Culprit Code