Previous Topic: CHANGE ClauseNext Topic: RENUMBER Clause


DROP/KEEP Clause

Purpose

Selectively drops or keeps CA Culprit parameters in inline or copied code depending upon parameter type, report number, field name, identification information, or character strings.

Syntax

►►─┬─────────────────────────────────────────────────────────────────┬────────►◄
   │           ┌───────────────────── AND ─────────────────────────┐ │
   └┬─ DROP ─┬─▼─┬─ parameter ─┬───────────────────┬─────────────┬─┴─┘
    └─ KEEP ─┘   │             └─ start ─┬────────┬┘             │
                 │                       └─ /end ─┘              │
                 ├─ Rptno report-number ─────────────────────────┤
                 ├─ FIELD field-name ────────────────────────────┤
                 ├─ ID start ─┬────────┬─────────────────────────┤
                 │            └─ /end ─┘                         │
                 └─ 'string' ─┬─────────────────────────────────┬┘
                              └─ begin-column ─┬───────────────┬┘
                                               └─ /end-column ─┘

Syntax Rules

DROP/KEEP

Identifies a DROP or KEEP clause. DROP eliminates the specified parameter from the parameter stream; KEEP retains the specified parameter and eliminates all other parameters. One or more DROP and KEEP clauses can be associated with a USE parameter.

When a parameter meets the criteria of both a DROP clause and a KEEP clause, precedence is given to DROP. Continuation lines associated with a parameter are also dropped or kept except for DROP/KEEP instructions that specify either the ID option or a column range on a string expression.

parameter start/end

Specifies that CA Culprit parameters are dropped or kept.

parameter

Specifies a valid CA Culprit parameter type:

Parameter

Synonym

INPUT

IN

REC

 

SELECT

SEL

BYPASS

BYP

OUTPUT

OUT

SORT

 

0

W

1

 

3

T

4

H

5

D

6

S

7

I

8

B

start

Specifies the start of a range of edit or process parameters, as follows:

If start is not specified, all parameters that specify parameter are dropped or kept.

end

Specifies the end of the range of edit line numbers or process sequence numbers. This value must follow a slash and be equal to or greater than start; the default is start.

RPTNO report

Specifies that all parameters with report coded in columns 2 and 3 are to be dropped or kept. Report must be a number in the range 0 through 99.

FIELD field-name

Specifies that any parameters that define field-name are to be dropped or kept; field-name specifies a 1- to 32-character alphanumeric value that is defined on a REC or work field parameter.

When more than one work field is defined for a single type 0 or type 1 work field parameter, the parameter is dropped or kept only if field-name is the first field defined on the parameter. In the following example, CA Culprit will ignore the request to keep or drop the record if DATA-FIELD is specified. If AGE-FIELD is specified, the requested action will occur.

010 AGE-FIELD NAME-FIELD DATA-FIELD
ID start/end

Specifies that parameters within a range of ID values are to be dropped or kept.

When ID is specified, DROP/KEEP criteria apply only to the first line of the parameter, and not to continuation lines.

start

A 1- to 8-character alphanumeric expression specifying a partial or complete identifier coded in columns 73 to 80.

end

A 1- to 8-character alphanumeric expression specifying a partial or complete identifier coded in columns 73 to 80. End must follow a slash and be equal to or greater than start; the default is start.

string begin-column/end-column

Specifies that parameters containing an identified character string within a column range are to be kept or dropped.

If a DROP/KEEP clause that specifies a character string also specifies a column range, DROP/KEEP criteria apply only to the first line of the parameter, not to any continuation lines. If the clause does not specify a column range, all lines associated with the parameter are dropped or kept.

string

A 1- to 70-character alphanumeric value, enclosed in quotation marks.

begin-column

Identifies the starting column of a range. This value must be a number in the range 1 through 72; the default is 1.

end-column

Specifies the last column of the specified range. This value must be a number in the range 1 through 72 preceded by a slash and equal to or greater than begin-column; the default is 72.

AND

Signals the end of one action on a DROP or KEEP clause and the start of another as shown in the example below:

DROP FIELD EMPLOYEE AND 'SALARY' 6/15.