Displaying Entity Occurrences

You can list one or more entity-occurrence definitions by using the DISPLAY/PUNCH statement.
idmscu19
You can list one or more entity-occurrence definitions by using the DISPLAY/PUNCH statement, which functions as follows:
  • DISPLAY
    -- Lists all or selected portions of the requested entity occurrences at the terminal or on the Integrated Data Dictionary Activity List. During an online session, the user can edit DISPLAY verb output and resubmit it as input to the DDDL compiler.
  • PUNCH
    -- When used online, functions in the same way as DISPLAY. When used in batch mode, writes the requested information to the SYSPCH file or to an IDD module defined as the destination for PUNCH verb output.
Optional DISPLAY/PUNCH statement clauses allow the user to specify, for the current DISPLAY/PUNCH statement only, the entity-type options to be listed, whether these options are to appear as syntax or comments, the verb to accompany the DISPLAY/PUNCH output, and, for PUNCH only, the destination for the punched output. If the DISPLAY/PUNCH statement requests multiple occurrences of an entity type, the user can supply a conditional expression that specifies criteria to be used by the DDDL compiler in selecting the requested entities.
Two Output Formats
The format of DISPLAY/PUNCH verb output is governed by the SET OPTIONS statement FORMAT IS FIXED/FREE specification. A FREE format appears as
running text
, for example:
display next map. *+ display map name is linda version is 1 *+ within panel linda-olmpanel version is 1 display prior program. *+ display program name is chs02 version is 1 .
A FIXED format appears in a
columnar
presentation, for example:
display first 2 maps. *+ display *+ map name mkmap2 *+ version 0000000001 *+ within panel mkmap2-olmpanel *+ version 0000000001 *+ . *+ display *+ map name mkmap1 *+ version 0000000001 *+ within panel mkmap1-olmpanel *+ version 0000000001 *+ .
Columnar format facilitates access to DDDL compiler output by online CA IDMS applications.
Requesting Single or Multiple Occurrences
There are two DISPLAY/PUNCH statements:
  • DISPLAY/PUNCH for requesting a single entity occurrence
  • DISPLAY/PUNCH ALL for requesting multiple occurrences
The syntax for each statement is presented separately in the following two subsections. Note that parameter descriptions that apply to both DISPLAY/PUNCH and DISPLAY/PUNCH all appear following the DISPLAY/PUNCH syntax.
DISPLAY/PUNCH Statement
The DISPLAY/PUNCH statement allows you to display or punch options for a
single
entity occurrence.
Syntax: DISPLAY/PUNCH (for a single entity occurrence)
►►─┬─ DISplay ─┬─
entity-type-name
name is
entity-occurrence-name
────────────► └─ PUNch ───┘ ►─┬──────────────────────────────────┬───────────────────────────────────────► └─ Version is ─┬─
version-number
─┬┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ►─┬──────────────────────────────────────────────────┬───────────────────────► └─ PREpared by
user-id
─┬────────────────────────┬─┘ └─ PASsword is
password
─┘ ►─┬──────────────────────────────────┬───────────────────────────────────────► └─┬─ WITh ──────┬─
entity-option
──┘ ├─ ALSo WITh ─┤ └─ WITHOut ───┘ ►─┬──────────────────────────────────────────────────────────────────────────►─ └─ TO ─┬─ SYSpch ────────────────────────────────────────────────────────── └─ MODule
module-name
─┬───────────────────────────────────┬──────── └─ Version is ─┬─
version-number
─┬─┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ─►──────────────────────────────────────────────────────────────────────────┬─► ─────────────────────────────────────────────────────────────────────────┬┘ ─┬──────────────────────┬┬──────────────────────────────────────────────┬┘ └ LANguage is
language
┘└ PREpared by
user-id
┬───────────────────────┬┘ └ PASsword is
password
─┘ ►─┬──────────────────────┬──┬─────────────────────┬──────────────────────────►◄ └─ VERB ─┬─ DISplay ─┬─┘ └─ AS ─┬─ SYNtax ───┬─┘ ├─ PUNch ───┤ └─ COMments ─┘ ├─ ADD ─────┤ ├─ MODify ──┤ ├─ REPlace ─┤ └─ DELete ──┘
Parameters
  • DISplay/PUNch
    entity-type-name
    Specifies that the DDDL compiler is to display or punch the information associated with a single entity-occurrence definition.
    Entity-type-name
    must be a valid IDD entity type.
  • name is
    entity-occurrence-name
    Specifies an existing occurrence of the specified entity type.
  • Version is
    version-number
    /HIGhest/LOWest
    Qualifies nonunique entity names.
  • PREpared by
    user-id
    Identifies the user requesting the DISPLAY operation.
    User-id
    must be a 1- through 32-character value and must be enclosed in quotation marks if it contains embedded blanks or delimiters.
  • PASsword is
    password
    Specifies the password associated with the user named in the PREPARED BY parameter.
  • WITh
    entity-option
    Specifies that the DDDL compiler is to replace the options specified in the SET OPTIONS DISPLAY WITH and DISPLAY ALSO WITH statements with the specified options for this DISPLAY/PUNCH request only.
  • ALSo WITh
    Specifies that the DDDL compiler is to add the specified options to the default options specified in the SET OPTIONS DISPLAY WITH and DISPLAY ALSO WITH statements for this DISPLAY/PUNCH request only.
  • WITHOut
    Specifies that the DDDL compiler is to exclude the specified options from the default options specified in the SET OPTIONS DISPLAY WITH and DISPLAY ALSO statements for this DISPLAY/PUNCH request only.
  • entity-option
    Specifies an entity-specific option that is the object of the WITH/ALSO WITH/WITHOUT specification. All
    entity-option
    s you can specify are described in detail under the DISPLAY clause of the SET OPTIONS statement (see SET OPTIONS Syntax).
  • TO
    Specifies the destination for punched output (used with PUNCH only).
  • SYSpch
    Specifies that the DDDL compiler is to direct PUNCH verb output to the SYSPCH file.
  • MODule
    module-name
    Specifies that the DDDL compiler is to direct PUNCH verb output to the named module.
    Module-name
    must be the 1- through 32-character name of a module defined in the dictionary through the MODULE statement (see MODULE (PROCESS/QFILE/TABLE)). The following rules apply to the named module:
    • Once the module has been named as the destination of the PUNCH command, it cannot be modified, replaced, or deleted.
    • A module cannot be punched to itself.
    • The PUNCH verb cannot name a module that is the object of an INCLUDE statement.
    If module source is already associated with the object module, the DDDL compiler adds the PUNCH verb output to the end of the existing module. If module source does not exist, the DDDL compiler generates a header which contains the date and time that the initial punched output was created.
    The specified destination overrides the default destination established in the SET OPTIONS PUNCH statement.
  • Version is
    version-number
    /HIGhest/LOWest
    Qualifies the named module with a version number.
  • LANguage is
    language
    Qualifies the named module with a language.
  • VERB DISplay/PUNch/ADD/MODify/REPlace/DELete
    Specifies the verb that is to accompany DISPLAY/PUNCH output. This parameter overrides the default verb established in the SET OPTIONS VERB statement.
  • AS SYNtax
    Specifies that the text output by the DISPLAY/PUNCH verb is to appear as syntax. In an online session, text displayed as syntax can be edited and resubmitted to the DDDL compiler. If the PUNCH command is issued in batch mode, the DDDL compiler directs the output to the SYSPCH file or to an IDD module, where it can be edited and subsequently resubmitted.
    This parameter overrides the default format established in the SET OPTIONS statement.
  • AS COMments
    Specifies that the text output by the DISPLAY/PUNCH verb be formatted as compiler comments; comments are preceded by *+ and are ignored by the DDDL compiler. This parameter overrides the default format established in the SET OPTIONS statement.
DISPLAY/PUNCH ALL Statement
The DISPLAY/PUNCH ALL statement allows you to display or punch options for
multiple
entity occurrences.
The parameter descriptions that apply to both the DISPLAY/PUNCH and the DISPLAY/PUNCH ALL statements appear after the DISPLAY/PUNCH syntax.
Syntax: DISPLAY/PUNCH ALL (for multiple entity occurrences)
►►─┬─ DISplay ─┬─┬─ ALL───────────────────────────┬──
entity-type-name
───────► └─ PUNch ───┘ └─┬─ FIRst ─┬─┬─ 1 ◄ ──────────┬─┘ ├─ NEXt ──┤ └─
entity-count
─┘ ├─ LASt ──┤ └─ PRIor ─┘ ►─┬───────────────────────────────────────────────────┬──────────────────────► └─ PREpared by
user-id
─┬─────────────────────────┬─┘ └─ PASsword is
password
──┘ ►─┬────────────────────────────────┬─────────────────────────────────────────► └─ WHEre
conditional-expression
─┘ ►─┬─────────────────┬────────────────────────────────────────────────────────► └─ BY ─┬─ SET ──┬─┘ └─ AREa ─┘ ►─┬──────────────────────────────────────────────────────────────────────────►─ └─ TO ─┬─ SYSpch ────────────────────────────────────────────────────────── └─ MODule
module-name
─┬───────────────────────────────────┬──────── └─ Version is ─┬─
version-number
─┬─┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ─►──────────────────────────────────────────────────────────────────────────┬─► ─────────────────────────────────────────────────────────────────────────┬┘ ─┬──────────────────────┬┬──────────────────────────────────────────────┬┘ └ LANguage is
language
┘└ PREpared by
user-id
┬───────────────────────┬┘ └ PASsword is
password
─┘ ►─┬──────────────────────┬──┬──────────────────────────────────────┬─────────►◄ └─ VERB ─┬─ DISplay ─┬─┘ └─ AS ─┬─ SYNtax ───┬──┬─────────────┬─┘ ├─ PUNch ───┤ └─ COMments ─┘ └─ RECursive ─┘ ├─ ADD ─────┤ ├─ MODify ──┤ ├─ REPlace ─┤ └─ DELete ──┘
Parameters
Parameters specific to DISPLAY/PUNCH ALL
  • DISplay/PUNch ALL/FIRst/NEXt/LASt/PRIOr
    Specifies that the DDDL compiler is to display or punch multiple entity occurrences. The output consists only of the information necessary to execute a DISPLAY/PUNCH
    entity
    request for each entity occurrence. For example, RECORD occurrences are displayed with their name and version, MODULE occurrences with their name and language, and ATTRIBUTE occurrences with their name and class. In an online session, the user can execute the displayed statements by pressing ENTER. This two-step process allows the user to scan the contents of the dictionary for the desired entity-occurrence definitions without generating unneeded output.
  • ALL
    Lists all occurrences of the requested entity type that the current user is authorized to display. With a large number of entity occurrences, ALL may slow online response time. You can use the DISPLAY ALL LIMIT and INTERRUPT COUNT clauses of the SET OPTIONS statement (see SET OPTIONS Statement) to limit DISPLAY.
  • FIRst/NEXt/LASt/PRIOr
    Lists the first, next, last, or prior occurrences of the named entity type.
  • entity-count
    Specifies the number of occurrences displayed or punched. 1 is the default.
  • e
    ntity-type-name
    Identifies the entity type or entity synonym that is the object of the DISPLAY/PUNCH ALL request.
  • WHEre
    conditional-expression
    Specifies criteria to be used by the DDDL compiler in selecting occurrences of the requested entity type.
    Conditional-expression
    is described in detail under WHERE Clause (Conditional Expressions), later in this section.
  • BY SET
    Retrieves all entity occurrences by the set relationship between the OOAK-012 record and the entity record. BY SET is most efficient when the dictionary contains relatively fewer occurrences than there are pages in the dictionary. BY SET can be applied to any entity type except MESSAGE or LOAD MODULE. SET is the default for all entity types except ELEMENT and ELEMENT SYNONYM.
  • BY AREa
    Retrieves all entity occurrences by sweeping the DDLDML area of the dictionary. BY AREA is most efficient when the dictionary contains relatively numerous occurrences of the requested entity-type, generally more occurrences than there are pages in the dictionary. BY AREA can be applied to any entity type except MESSAGE or LOAD MODULE. AREA is the default for the ELEMENT and ELEMENT SYNONYM entity types.
  • RECursive
    Appends “AS SYNTAX.” or “AS COMMENT.” to each generated line of output.
WHERE Clause (Conditional Expressions)
The WHERE clause of a DISPLAY/PUNCH ALL statement defines a condition. The outcome of a test for the condition determines which occurrences of the named entity type the DDDL compiler selects for display.
The WHERE clause 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 DDDL compiler evaluates operators in a WHERE clause one at a time, from left to right, in order of precedence. The default order of precedence is as follows:
  • MATCHES or CONTAINS keywords
  • EQ, NE, GT, LT, GE, LE operators
  • NOT
  • AND
  • OR
If parentheses are used to override the default order of precedence, the DDDL compiler evaluates the expression within the innermost parentheses first.
Syntax: WHERE Clause (for conditional expressions)
►►─── WHEre
conditional-expression
───────────────────────────────────────────►◄
Expansion of
conditional-expression
►►─┬─
mask-comparison
─────────────────────────┬──────────────────────────────► ├─
value-comparison
────────────────────────┤ └─┬───────┬─ ( ─┬────────────────────┬─ ) ──┘ └─ NOT ─┘ ├─
mask-comparison
──┤ └─
value-comparison
─┘ ►─┬────────────────────────────────────────────────────────────┬─────────────►◄ │ ┌────────────────────────────────────────────────────────┐ │ └─▼─┬─ AND ─┬─┬─
mask-comparison
────────────────────────┬─┴─┘ └─ OR ──┘ ├─
value-comparison
───────────────────────┤ └─┬───────┬─ ( ─┬─
mask-comparison
──┬─ ) ─┘ └─ NOT ─┘ └─
value-comparison
─┘
Expansion of value-comparison
►►─┬─
entity-option
───────────────┬──────────────────────────────────────────► ├─
numeric-literal
─────────────┤ └─ '
character-string-literal
' ──┘ ►─┬─ IS ─┬───────┬─────┬─┬─
entity-option
──────────────┬────────────────────►◄ │ └─ NOT ─┘ │ ├─
numeric-literal
────────────┤ ├─ NE ───────────────┤ └─ '
character-string-literal
' ─┘ └─┬───────┬─┬─ EQ ─┬─┘ └─ NOT ─┘ ├─ = ─┤ ├─ GT ─┤ ├─ ◄ ─┤ ├─ LT ─┤ ├─ < ─┤ ├─ GE ─┤ └─ LE ─┘
Expansion of mask-comparison
►►───
entity-option
──┬─ CONTAINS ─┬─ '
mask-value
' ───────────────────────────►◄ └─ MATCHES ──┘
Parameters
  • NOT
    Specifies that the opposite of the condition fulfills the test requirements; if NOT is specified, the condition must be enclosed in parentheses.
  • AND
    Specifies a logical operator to accompany multiple conditions. The expression is true only if the outcome of both test conditions is true.
  • OR
    Specifies a logical operator to accompany multiple conditions. The expression is true if the outcome of either one or both test conditions is true.
  • value-comparison
    Compares values represented in the left and right-side operands based on the specified comparison operator.
  • entity-option
    Identifies a syntax option associated with the named entity type; valid options for each entity type are listed in the table following these parameter descriptions.
  • numeric literal
    Identifies a numeric value.
  • '
    character-string-literal
    '
    Identifies a character string enclosed in quotes.
  • IS/NOT
    Specifies whether the left operand is equal (IS) or is not equal (IS NOT) to the right operand.
  • NE
    Specifies whether the left operand is not equal to the right operand.
  • EQ/GT/LT/GE/LE
    Specifies whether the left operand is equal to, greater than, less than, greater than or equal to, or less than or equal to the right operand. Each operator can be preceded by NOT to specify the opposite of the condition.
  • mask-comparison
    Compares an entity type operand with a mask value.
  • 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. The following characters can be specified in
    mask-value
    :
    • @
      matches any
      alphabetic character
      in
      entity-option
    • #
      matches any
      numeric character
      in
      entity-option
    • *
      matches
      any character
      in
      entity-option
Valid Entity Options for the WHERE Clause
Date Selection Criteria
In the following WHERE clause options, you can select the date as a value-comparison string in the form 'MM/DD/YY' on the right-hand side of the conditional expression:
  • DATE CREATED
  • DATE LAST UPDATED
  • DATE COMPILED
The extraction interprets the date in CCMMDDYY form to accurately determine the relationship of dates. For example, the following DISPLAY ALL statement specifies the search criteria to identify the RECORD occurrences whose DATE CREATED values (which are also evaluated in CCYYMMDD form) are greater than the specified string:
display all records 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 can specify the value-comparison string on either side of the conditional expression in the form 'CCYYMMDD' to achieve the same results.
You can substitute day, month, or year for each of the WHERE clause options. For example, the following DISPLAY ALL statement specifies a search condition which is based on month and year:
display all records where month created = '01' and year created ◄ '95'.
DISPLAY/PUNCH Examples
Displaying a Single Entity Occurrence
The following four statements illustrate DISPLAY/PUNCH statements that request information about a single entity occurrence.
  1. IDD displays as comments the user-defined nests associated with the system PAYROLL.
    display system payroll with user defined nests as comments. *+ add *+ system name is payroll version is 1 *+ 'prerequisite system' is 'employee maintenance' *+ version 1 *+ .
  2. SET OPTIONS establishes HISTORY as the default display option and AS COMMENTS as the output format.
    set options for session display with history as comments.
  3. IDD displays the definition of the CUSTOMER record with ELEMENT and PICTURE OVERRIDES specifications in addition to HISTORY.
    display record customer also with elements picture overrides. *+ add *+ record name is customer version is 1 *+ date created is mm/dd/yy *+ date last updated is mm/dd/yy *+ prepared by wmc *+ revised by wmc *+ . *+ record element is cust-name version 1 line is 000100 *+ level number is 02 *+ usage is display *+ .
  4. IDD displays the same definition without the PICTURE OVERRIDES option.
    display record customer without picture overrides. *+ add *+ record name is customer version is 1 *+ date created is mm/dd/yy *+ date last updated is mm/dd/yy *+ prepared by wmc *+ revised by wmc *+ record length is 119 *+ record name synonym is customer version 1 *+ . *+ record element is cust-name version 1 *+ level number is 02 *+ .
Displaying/Punching Multiple Entity Occurrences
The following example illustrates a DISPLAY/PUNCH statement that requests multiple entity occurrences. IDD displays the first five occurrences of the ELEMENT entity type; to submit the resulting ADD ELEMENT statements to the DDDL compiler, you must press ENTER.
display first 5 elements verb add as syntax. add element name is field-array version is 1 . add element name is emp-fname-09-ws version is 9 . add element name is emp-lname-09-ws version is 9 . add element name is emp-name-09-ws version is 9 . add element name is emp-info-09-ws version is 9 .
The following example illustrates a DISPLAY/PUNCH statement that requests multiple entity occurrences with ‘as syntax’ appended to each generated line. IDD displays the first five occurrences of the ELEMENT entity type.
display first 5 elements as syntax recursive. display element name is field-array version is 1 as syntax. display element name is emp-fname-09-ws version is 9 as syntax. display element name is emp-lname-09-ws version is 9 as syntax. display element name is emp-name-09-ws version is 9 as syntax. display element name is emp-info-09-ws version is 9 as syntax.
In the following example, IDD displays as comments all modules that contain the literal MOD- as part of the module name.
display all modules where name contains 'mod-' as comments.
In the following example, IDD punches all files to the module DEMO-PUNCH.
punch all files to module demo-punch as syntax.