Previous Topic: USE ParameterNext Topic: CHANGE Clause


WITH VALUES Clause

Purpose

The WITH VALUES clause assigns values to symbolic parameters in copied or inline code by means of keyword expressions or arguments.

Syntax

►►─┬────────────────────────────────────────────────────────┬─────────────────►◄
   │                   ┌────────────────────────────┐       │
   └─ WITH VALues ( ─┬─▼─ keyword = keyword-value ──┴─┬─ ) ─┘
                     │ ┌────────────────────────────┐ │
                     └─▼─┬─────────────┬─ argument ─┴─┘
                         └─ keyword = ─┘

Syntax Rules

WITH VALUES

Identifies a WITH VALUES clause. One WITH VALUES clause is permitted with each USE parameter; the WITH VALUES clause should be coded before any CHANGE, DROP/KEEP, and RENUMBER clauses associated with the USE parameter.

keyword =

Specifies a keyword expression or argument enclosed in parentheses, or a list of keyword expressions or arguments enclosed in parentheses.

Keyword expressions and arguments assign values to symbolic parameters in copied or inline code. Keyword expressions can be submitted in any order in the WITH VALUES clause; arguments must be submitted in an order that corresponds sequentially to the symbolic parameters.

Keyword expressions and arguments are 1- to 72-character alphanumeric expressions.

keyword-value

Substitutes a value for a symbolic parameter in inline or stored code. Keyword is a keyword associated with the symbolic parameter through information coded on a DEFAULT clause.

If a value is not assigned to a symbolic parameter on the WITH VALUES clause, the value defined on the DEFAULT clause is used.

argument

Substitutes a value for a symbolic parameter in inline or stored code; the first argument in a list is assigned to symbolic parameter &&1, the second to &&2, and so on. If a default value specified on a DEFAULT clause is to be assigned to a symbolic parameter, code a comma in place of the argument in the argument stream.

Usage

The following rules apply to coding keyword expressions and arguments on a WITH VALUES clause:

If the value substituted for the symbolic parameter is shorter or longer than the 3-character symbolic parameter, the length of the record is adjusted to accommodate the length of the substituted value. If the adjusted length is greater than 72 characters, continuation lines, with a maximum of 256 characters can be created to accommodate the data.