Previous Topic: DISPLAY and PUNCH OperationsNext Topic: DISPLAY/PUNCH ACCESS MODULE


DISPLAY/PUNCH ALL Statement

The DISPLAY/PUNCH ALL statement displays all occurrences of an entity type. The basic syntax for each entity type is the same. The entity-option keywords vary by entity type and are presented in a table in "Usage" later in this section.

Syntax
►►─┬─ DISplay ─┬──┬─ ALL ────────────────────────────┬── entity-type ─────────►
   └─ PUNch ───┘  └┬─ FIRST ──┬─┬──────────────────┬─┘
                   └─ LAST ───┘ ├─ 1 ◄───────────┬─┘
                                └─ entity-count ─┘

 ►─┬──────────────────────────────────┬───────────────────────────────────────►
   └─ WHEre conditional-expression ───┘

 ►─┬───────────────────────┬──────────────────────────────────────────────────►
   └─ AS ─┬─ COMments ◄──┬─┘
          └─ SYNtax ─────┘

 ►─┬────────────────────────┬─────────────────────────────────────────────────►◄
   └─ VERB ─┬─ DISplay ◄──┬─┘
            ├─ ALTer ─────┤
            ├─ CREate ────┤
            ├─ DROp ──────┤
            └─ PUNch ─────┘

Expansion of conditional-expression

►►─┬─ mask-comparison ────────────────────────┬───────────────────────────────►
   ├─ value-comparison ───────────────────────┤
   └─┬───────┬─ ( ─┬─ mask-comparison ──┬─ ) ─┘
     └─ NOT ─┘     └─ value-comparison ─┘

 ►─┬────────────────────────────────────────────────────────────┬─────────────►◄
   │ ┌────────────────────────────────────────────────────────┐ │
   └─▼─┬─ AND ─┬─┬─ mask-comparison ────────────────────────┬─┴─┘
       └─ OR ──┘ ├─ value-comparison ───────────────────────┤
                 └─┬───────┬─ ( ─┬─ mask-comparison ──┬─ ) ─┘
                   └─ NOT ─┘     └─ value-comparison ─┘

Expansion of mask-comparison

►►─── entity-option-keyword ──────────────────────────────────────────────────►

 ►─┬─ CONTAINs ─┬─ 'mask-value' ──────────────────────────────────────────────►◄
   └─ MATCHES ──┘

Expansion of value-comparison

►►─┬─ 'character-string-literal' ─┬───────────────────────────────────────────►
   ├─ numeric-literal ────────────┤
   └─ entity-option-keyword ──────┘

 ►─┬─ IS ─┬───────┬─────────┬─┬─ 'character-string-literal' ─┬────────────────►◄
   │      └─ NOT ─┘         │ ├─ numeric-literal ────────────┤
   ├─ NE ───────────────────┤ └─ entity-option-keyword ──────┘
   └─┬───────┬─┬─┬─ EQ ─┬─┬─┘
     └─ NOT ─┘ │ └─ = ──┘ │
               ├─┬─ GT ─┬─┤
               │ └─ > ──┘ │
               ├─┬─ LT ─┬─┤
               │ └─ < ──┘ │
               ├─ GE ─────┤
               └─ LE ─────┘
Parameters
ALL

Lists all occurrences of the requested entity type that the current user is authorized to display.

Note: For online users: with many entity occurrences, ALL may slow response time.

FIRst

Lists the first occurrence of the named entity type.

LASt

Lists the last occurrence of the named entity type.

entity-count

Specifies the number of occurrences of the named entity type to list. 1 is the default.

entity-type

Identifies the entity type that is the object of the DISPLAY/PUNCH ALL request. Valid values appear in the table under "Usage" in this section.

WHEre conditional-expression

Specifies criteria to be used in selecting occurrences of the requested entity type.

The outcome of a test for the condition determines which occurrences of the named entity type are selected for display.

mask-comparison

Compares an entity type operand with a mask value.

entity-option-keyword

Identifies the left operand as a syntax option associated with the named entity type. The table under "Usage" in this section, lists valid options for each entity type.

CONTAINs

Searches the left operand for an occurrence of the right operand. The length of the right operand must be less than or equal to the length of the left operand. If the right operand is not contained entirely in the left operand, the outcome of the condition is false.

MATCHES

Compares the left operand with the right operand one character at a time, beginning with the leftmost character in each operand. When a character in the left operand does not match a character in the right operand, the outcome of the condition is false.

'mask-value'

Identifies the right operand as a character string; the specified value must be enclosed in quotation marks. Mask-value can contain the following special characters:

@

Matches any alphabetic character in entity-option-keyword.

#

Matches any numeric character in entity-option-keyword.

*

Matches any character in entity-option-keyword.

value-comparison

Compares values contained in the left and right operands based on the specified comparison operator.

'character-string-literal'

Identifies a character string enclosed in quotes.

numeric-literal

Identifies a numeric value.

entity-option-keyword

Identifies a syntax option associated with the named entity type; valid options for each entity type are listed in the table presented under "Usage" in this section.

IS

Specifies that the left operand must equal the right operand for the condition to be true.

NE

Specifies that the left operand must not equal the right operand for the condition to be true.

EQ/=

Specifies that the left operand must equal the right operand for the condition to be true.

GT/>

Specifies that the left operand must be greater than the right operand for the condition to be true.

LT/<

Specifies that the left operand must be less than the right operand for the condition to be true.

GE

Specifies that the left operand must be greater than or equal to the right operand for the condition to be true.

LE

Specifies that the left operand must be less than or equal to the right operand for the condition to be true.

NOT

Specifies that the opposite of the condition fulfills the test requirements. If NOT is specified, the condition must be enclosed in parentheses.

AND

Indicates the expression is true only if the outcome of both test conditions is true.

OR

Indicates the expression is true if the outcome of either one or both test conditions is true.

AS COMments

Outputs access module syntax as comments with the characters *+ preceding the text of the statement. AS COMMENTS is the default.

AS SYNtax

Outputs access module syntax which can be edited and resubmitted to the command facility.

VERB DISplay/ALTer/CREate/DROp/PUNch

Specifies the verb with which the entity statement is to be displayed or punched. For example, if VERB CREATE is specified, the output of the DISPLAY/PUNCH statement is a CREATE statement; if VERB ALTER is specified, the output is an ALTER statement; and so on. The default is VERB DISPLAY.

Usage

Output Contains only enough Information to DISPLAY/PUNCH Entity

Output produced by DISPLAY or PUNCH ALL consists only of the information necessary to execute a DISPLAY/PUNCH request for each entity occurrence.

Valid Entity Option Keywords for Conditional Expressions

The following table lists entity type options that you can specify in a conditional expression.

Entity type

Entity-option keyword

Selects based on

 

All entity types

 

entity-type NAMe

entity-type

FULl entity-type NAMe

DATe CREated

 

MONth CREated

DAY CREated

YEAr CREated

DATe last UPDated

 

MONth last UPDated

 

DAY last UPDated

YEAr last UPDated

 

CREated by

PREpared by

REVised by

 

LASt UPDated by

 

Unqualified name &sub1.

Unqualified name &sub1.

Qualified name &sub1.

Date (MM/DD/YY) occurrence

created

Month occurrence created

Day occurrence created

Year occurrence created

Date (MM/DD/YY) occurrence

last updated**

Month occurrence

last updated**

Day occurrence last updated**

Year occurrence

last updated**

User who created occurrence**

User who created occurrence**

User who last updated

occurrence**

User who last updated

occurrence**

 

ACCESS

MODULE

 

AM name

 

SCHema name

 

Version

FULl TABle NAMe

 

 

TABle SCHema name

 

 

TABle name

 

 

DATe COMpiled

 

COMpiled

 

MONth COMpiled

DAY COMpiled

YEAr COMpiled

 

Unqualified access module

name &sub1.

Name of access module's

schema

Version number

Qualified name of a table

referenced by the access

module

Schema name of a table

referenced by the

access module

Unqualified name of a table

referenced by the

access module

Date (MM/DD/YY) access

module compiled

Date (MM/DD/YY) access

module compiled

Month access module compiled

Day access module compiled

Year access module compiled

 

CALC KEY

 

SCHema name

 

TABle name

 

Schema name of the table

containing the CALC key

Unqualified name of table

containing the CALC key

 

CONSTRAINT

 

SCHema name

 

REFERENCEd FULl TABle

NAMe

REFERENCEd table

SCHema name

REFERENCEd TABle name

 

REFERENCIng FULl

TABle NAMe

REFERENCIng table

SCHema name

REFERENCIng TABle name

 

Schema name of the

constraint

Qualified name of the

referenced table

Schema name of the

referenced table

Unqualified name of the

referenced table

Qualified name of the

referencing table

Schema name of the

referencing table

Unqualified name of the

referencing table

 

FUNCTION

 

SCHema name

 

EXTernal NAMe

 

Schema name of the

function

Name of the program

or dialog to

process the function

 

INDEX

 

SCHema name

 

TABle name

 

FULl AREa NAMe

 

SEGment name

 

AREa name

 

Schema name of the

indexed table

Unqualified name of the

indexed table

Qualified name of the area

containing the index

Segment name of the area

containing the index

Unqualified name of the area

containing the index

 

KEY

 

SCHema name

 

TABle PROcedure name

 

FULl TABle

PROcedure NAMe

 

Schema name of the

keyed table procedure

Unqualified name of the

keyed table procedure

Qualified name of the

keyed table procedure

 

PROCEDURE

 

SCHema name

 

EXTernal NAMe

 

Schema name of the

procedure

Name of the program or

dialog called to

process the procedure

 

SCHEMA

 

TYPe

 

full DICtname

 

DBName

NODe name

NODename

NONsql SCHema

nonsql schema Version

DEFault FULl AREA NAMe

 

default SEGment name

 

default AREa name

 

Type of Schema

(NONSQL or SQL)

NonSQL Schema

Dictionary name

NonSQL Schema DBName

NonSQL Schema Node Name

NonSQL Schema Node Name

Name of the NonSQL Schema

Version of the NonSQL Schema

Qualified area name of the

Schema's default area

Segment name of

Schema's default area

Unqualified area name of the

Schema's default area

 

TABLE

 

SCHema name

FULl AREA NAMe

 

SEGment name

 

AREa name

 

Schema name of the table

Qualified area name

containing the table

Segment name of the area

containing the table

Unqualified name of the area

containing the table

 

TABLE

PROCEDURE

 

SCHema name

 

EXTernal NAMe

 

Schema name of the

table procedure

Name of the program

called to process

the table procedure

 

VIEW

 

SCHema name

REFerenced FULl

TABle NAMe

REFerenced table

SCHema NAMe

REFerenced TABle name

 

Schema name of the View

Qualified name of a table

referenced by the View

Schema name of a table(s)

referenced by the View

Unqualified name of a table

referenced by the View

:tnote.

Note: Unqualified name selections are based on the primary name of the entity occurrence only. To select based on the fully qualified occurrence name, token FULL NAME must be specified. SQL components with qualified names are specified in the table below.

**You can specify this keyword option only when using SCHEMA, TABLE, FUNCTION, PROCEDURE, TABLE PROCEDURE, and VIEW entities. :etnote.

Fully Qualified Names of SQL Components

The fully qualified names of SQL components are listed in the following table:

Resource

Fully qualified name

ACCESS MODULE

schema-name.access-module-name

FUNCTION

schema-name.function-name

PROCEDURE

schema-name.procedure-name

TABLE

schema-name.table-name

TABLE PROCEDURE

schema-name.table-procedure-name

VIEW

schema-name.view-name

Date and Year 2000 Support in DISPLAY/PUNCH Statements

You can use date selection criteria as well as year 2000 support in DISPLAY ALL statements to display SQL entities.

You implement date selection criteria in these WHERE clause options:

You can specify the date as a value-comparison string in the form 'MM/DD/YY' in the right-hand side of the conditional expression. CA IDMS extracts it in CCMMDDYY form to accurately determine the relationship of dates. The following DISPLAY ALL statement example establishes a search criteria to identify the schemas whose DATE CREATED values are greater than the specified string.

DISPLAY ALL SCHEMAS WHERE DATE CREATED > '01/01/96';

The DISPLAY ALL process determines that the date '01/01/96' is greater than the date '12/31/95'.

Alternatively, you may specify the value-comparison string on either side of the conditional expression in the form 'CCYYMMDD' to achieve the same results.

You can also substitute day, month, or year for each of these WHERE clause options. For example, this DISPLAY ALL statement specifies a search condition that is based on month and year:

DISPLAY ALL VIEWS
   WHERE MONTH CREATED = '01'
   AND YEAR CREATED > '95';

Default Order of Precedence Applied to Logical Operators

Conditional expressions can contain a single condition, or two or more conditions combined with the logical operators AND or OR. The logical operator NOT specifies the opposite of the condition. The command facility evaluates operators in a conditional expression 1 at a time, from left to right, in order of precedence. The default order of precedence is as follows:

If parentheses are used to override the default order of precedence, the command facility evaluates the expression within the innermost parentheses first.

Example

The following example displays all ACCESS MODULES compiled since June 1, 1995:

DISPLAY ALL ACCESS MODULES
  WHERE DATE CREATED GT '06/01/95'
  AS SYNTAX.