Previous Topic: SEGMENT Keyword—Field SegmentsNext Topic: SELECT Keyword—Record Control


SELDATA Keyword—SDT SELDATA Field

Valid on z/OS and z/VSE.

Use the SELDATA keyword to add, remove, or replace a SELDATA field in the SELECT record of the SDT Record. SELDATA allows the administrator to specify a (compound) logical condition to decide whether RLP or Screen Level Protection is applicable for an associated SELECT.

This keyword has the following format:

TSS ADDTO(SDT) SELECT(selname)
               DESCRIPT(desc‑name)
               SELDATA('IF [NOT] selexpression AND|OR] selexpression')
IF

Signals the beginning of a select expression. Specify IF, and the entire SELDATA must be enclosed in a single quote.

NOT

Specifies a negative relationship for the following sel‑expression.

sel‑expression

Specifies the logic behind which records the user is restricted to. The sel‑expression is coded in a Boolean logic format, which must contain a left‑hand side (LHS) field name, a relational operator, and a right‑hand side (RHS) comparison data value.

A sel‑expression consists of Boolean expressions modified by NOT, surrounded by parentheses, and joined by the conjunctions AND and OR. Parentheses are used to determine the order of evaluation. There is no priority applied to AND, OR, and NOT when parentheses are not supplied. The expression consists of:

AND/OR

Used to link multiple sel‑expressions together. Use the AND when both sel‑expressions are true; use OR when either statement is true.

This keyword is used with:

Example: SELDATA keyword

This example adds a SELDATA field to the SELECT record called PROBE1 for all the first names of employees that begin with Mike in departments 100 and above:

TSS ADDTO(SDT) SELECT(PROBE1)
               SELDATA('IF DEPARTMENT GE "100" AND "MIKE" ')

In this example, dept is defined in the SDT RECORD with the data‑type of CHAR. Values 0 to 9, A to Z, and special characters are accepted.:

SELDATA('IF dept EQ "HR1000"')

This example uses * as a wildcard match. If the LHS field dept contains a value that begins with H, and ends with 100, this would result in a match or a true expression:

SELDATA('IF dept EQ "H**100"')

For data‑types of PACKED, ZONED, or BIN, enter only decimal digits (0 to 9) without quotes and a maximum of 16 decimal digits. In this example salary is defined in the SDT RECORD with the data‑type of PACKED, ZONED, or BIN:

SELDATA('IF salary LT 50000')

In this example the decimal value is a negative number:

SELDATA('IF Total LE ‑1000')

In this example the data‑type is HEX:

SELDATA('IF Table EQ X"FFFFFFFF"')

Parentheses with SELDATA

Use the parentheses in complex expressions to indicate how you want CA Top Secret to evaluate the clause. Parentheses group the left and right‑hand sides of an expression and they express which part of a complex expression is the left‑hand side and which side is the right‑hand side.

Consider the following:

IF CODE = "3A"

This example finds a true condition when CODE equals 3A, or CODE equals 3B and SALARY is less than $25,000:

SELDATA=('IF ((CODE = "3A") OR  ((CODE = "3B") AND (SALARY LT 25000)))')

This example evaluates as true when CODE equals 3A and SALARY is less than $25,000 or when CODE equals 3B and SALARY is less than $25,000:

SELDATA=('IF (((CODE = "3A") OR  (CODE = "3B") AND (SALARY LT 25000)))')

You must specify parentheses when you use NOT in an expression.