HP DDL D40 Reference Manual
HP DDL D40 Reference Manual

HP DDL D40 Reference Manual

Data definition language
Table of Contents

Advertisement

Quick Links

Data Definition
Language (DDL)
Reference Manual
Abstract
This manual describes the DDL language syntax and the DDL dictionary database.
The audience includes application programmers and database administrators.
Product Version
DDL D40
Supported Release Version Updates (RVUs)
This publication supports G02.00 and all subsequent G-series RVUs until otherwise
indicated by its replacement publication.
Part Number
426798-002
Published
November 2004

Advertisement

Table of Contents
loading

Summary of Contents for HP DDL D40

  • Page 1 This manual describes the DDL language syntax and the DDL dictionary database. The audience includes application programmers and database administrators. Product Version DDL D40 Supported Release Version Updates (RVUs) This publication supports G02.00 and all subsequent G-series RVUs until otherwise indicated by its replacement publication.
  • Page 2 Document History Part Number Product Version Published 098209 DDL D20 September 1993 105918 DDL D30 December 1994 122316 DDL D40 November 1995 426798-001 DDL D40 October 2000 426798-002 DDL D40 November 2004...
  • Page 3: Table Of Contents

    Data Definition Language (DDL) Reference Manual Glossary Index Figures Tables What’s New in This Manual Manual Information New and Changed Information About This Manual xiii Audience xiii Organization of This Manual xiii Prerequisite Manuals Related Manuals Notation Conventions 1. Introduction to DDL Compiling and Translating Data Definitions Using DDL Definitions Creating a Dictionary...
  • Page 4 Contents 3. Running the DDL Compiler Compiler Listing Comments 2-11 DDL Statements 2-12 DDL Compiler Commands 2-13 3. Running the DDL Compiler DDL Run Command Running DDL in Noninteractive Mode Running DDL in Interactive Mode Completion Code Processing 4. Named Constants CONSTANT Statement Standard SPI Constants 5.
  • Page 5 Contents 7. SPI Tokens JUSTIFIED Clause 6-12 KEYTAG Clause 6-13 LN Clause 6-14 MUST BE Clause 6-16 NULL Clause 6-20 OCCURS Clause 6-21 OCCURS DEPENDING ON Clause 6-24 PICTURE Clause 6-26 REDEFINES Clause 6-32 SPI-NULL Clause 6-35 SQLNULLABLE Clause 6-38 TACL Clause 6-44 TYPE Clause...
  • Page 6 Contents 9. DDL Compiler Commands CFIELDALIGN_MATCHED2 Command 9-13 CIFDEF, CIFNDEF, and CENDIF Commands 9-17 CIFDEF Command 9-17 CIFNDEF Command 9-17 CENDIF Command 9-17 CIFDEF, CIFNDEF, CENDIF Command Guidelines 9-17 CIFDEF, CIFNDEF, CENDIF Command Example 9-18 CLISTIN Command 9-19 CLISTOUT Command 9-20 COBCHECK Command 9-22...
  • Page 7 Contents 10. Dictionary Maintenance NOFILEFORMAT Command 9-76 OLDFUP_FILEFORMAT Command 9-78 OUT Command 9-80 OUTPUT_SENSITIVE Command 9-81 PAGE Command 9-84 PASCAL Command 9-84 PASCALBOUND Command 9-87 PASCALCHECK Command 9-88 PASCALNAMEDVARIANT Command 9-90 REPORT Command 9-90 RESET Command 9-92 SAVE Command 9-93 SECTION Command 9-94 SETLOCALENAME Command...
  • Page 8 Contents A. DDL Messages Making Major Modifications 10-12 Changing Dictionary Security 10-14 Moving a Dictionary 10-14 Moving a Nonaudited Dictionary 10-15 Moving an Audited Dictionary 10-15 Purging a Dictionary 10-18 Increasing Dictionary File Size 10-19 Rebuilding a Dictionary 10-20 Rebuilding a Nonaudited Dictionary 10-20 Rebuilding an Audited Dictionary 10-21...
  • Page 9 Contents E. Dictionary Reports DICTOUF Fields D-33 DICTRDF Fields D-35 DICTTKN Fields D-41 DICTTYP Fields D-42 DICTVER Fields D-44 Definition and Record Storage in the Dictionary D-45 Dictionary Definition File D-45 Object Definition File D-46 Object Build List D-46 Object Text File D-47 Record Definition File D-47...
  • Page 10 Contents G. Pathmaker and DDL DEFINITION and RECORD Statement Clauses AS Clause DISPLAY Clause EDIT-PIC Clause EXTERNAL Clause FILLER Clause HEADING Clause HELP Clause JUSTIFIED Clause KEYTAG Clause LN Clause MUST BE Clause NULL Clause OCCURS Clause OCCURS DEPENDING ON Clause F-10 PICTURE Clause F-10...
  • Page 11 Contents Glossary Glossary Index Figures Figure 1-1. DDL Overview Figure 1-2. Creating a Dictionary Figure 1-3. Creating Database Files Figure 1-4. Generating Source Code Figure 1-5. Maintaining a Dictionary 1-11 Figure 1-6. Examining a Dictionary 1-13 Figure D-1. Sample Dictionary Schema for a Definition and a Record D-45 Figure D-2.
  • Page 12 Contents Table D-4. SQL DATETIME Element Sizes D-23 Table D-5. SQL INTERVAL Element Sizes D-24 Table E-1. Summary of Dictionary Reports Table G-1. DDL Features in the Pathmaker Environment Data Definition Language (DDL) Reference Manual—426798-002...
  • Page 13: Manual Information

    This publication has been updated to reflect new product names. Because the product names are changing over time, this publication might contain both HP and Compaq product names. Product names in graphic representations are consistent with the current product interface.
  • Page 14 What’s New in This Manual New and Changed Information Data Definition Language (DDL) Reference Manual—426798-002...
  • Page 15: About This Manual

    DDL objects include constants, field and group definitions, records, and three types of Subsystem Programmatic Interface (SPI) objects: token codes, token maps, and token types. DDL can translate an object definition into source code for one or more of these HP products: HP C for NonStop systems...
  • Page 16 About This Manual Prerequisite Manuals Section 2, DDL Language Elements, describes the language elements you can use in DDL statements and commands, and the rules for entering statements, commands, and comments associated with statements. Section 3, Running the DDL Compiler, explains how to run DDL with input from a source file and with input from an interactive terminal.
  • Page 17: Notation Conventions

    If you are an application programmer, these manuals are also prerequisites: Guardian Programmer’s Guide Introduction to Data Management The HP manuals for languages that you want DDL to translate object definitions into. If you plan to use DDL to define SPI tokens, these manuals are also prerequisites:...
  • Page 18 About This Manual General Syntax Notation UPPERCASE LETTERS. Uppercase letters indicate keywords and reserved words. Type these items exactly as shown. Items not enclosed in brackets are required. For example: MAXATTACH lowercase italic letters. Lowercase italic letters indicate variable items that you supply. Items not enclosed in brackets are required.
  • Page 19 About This Manual General Syntax Notation … Ellipsis. An ellipsis immediately following a pair of brackets or braces indicates that you can repeat the enclosed sequence of syntax items any number of times. For example: … M address [ , new-value ] …...
  • Page 20: Notation For Messages

    About This Manual Notation for Messages !i:i. In procedure calls, the !i:i notation follows an input string parameter that has a corresponding parameter specifying the length of the string in bytes. For example: error := FILENAME_COMPARE_ ( filename1:length !i:i , filename2:length ) ; !i:i !o:i.
  • Page 21: Notation For Management Programming Interfaces

    About This Manual Notation for Management Programming Interfaces either vertically, with aligned braces on each side of the list, or horizontally, enclosed in a pair of braces and separated by vertical lines. For example: obj-type obj-name state changed to state, caused by { Object | Operator | Service } process-name State changed from old-objstate to objstate { Operator Request.
  • Page 22: Change Bar Notation

    About This Manual Change Bar Notation Change Bar Notation Change bars are used to indicate substantive differences between this manual and its preceding version. Change bars are vertical rules placed in the right margin of changed portions of text, figures, tables, examples, and so on. Change bars highlight new or revised information.
  • Page 23: Compiling And Translating Data Definitions

    The Data Definition Language (DDL) product enables you to define data objects in Enscribe files and to translate these object definitions into source code for programming languages and other products on HP NonStop systems. The DDL language has statements to define data objects and commands to control how the statements are compiled.
  • Page 24: Using Ddl Definitions

    Introduction to DDL Using DDL Definitions file or directly from a terminal. In either case, the DDL compiler checks the syntax and semantics of all statements and commands. The DDL compiler translates the statements that define DDL objects into internal data definition format.
  • Page 25 You can also use a set of Enform queries provided by HP to produce more complex reports on all the objects in a dictionary, their structure, how they are linked, which objects are referenced by Data Definition Language (DDL) Reference Manual—426798-002...
  • Page 26: Creating A Dictionary

    Introduction to DDL Creating a Dictionary other objects, and so forth. You can, if you choose, modify the supplied queries or write your own. Creating a Dictionary A DDL dictionary is a database consisting of 14 prenamed and predefined files. Because the files have fixed names, you can have only one dictionary on any subvolume.
  • Page 27: Creating A Database

    Introduction to DDL Creating a Database 2. Run the DDL compiler using the source schema as the input file, or run DDL interactively, submitting the source schema with a SOURCE command. In either case, use the DICT or DICTN command to open the dictionary on a specified volume and subvolume or on the default volume and subvolume.
  • Page 28 Introduction to DDL Creating a Database code. For information on file attributes that you cannot specify in DDL, see the File Utility Program (FUP) Reference Manual. When you finish editing the file creation commands, you can run the FUP program using the FUP command file as the source file.
  • Page 29: Generating Source Code

    Introduction to DDL Generating Source Code Figure 1-3. Creating Database Files Dictionary Generate FUP command file from dictionary 12> DDL DICT !?FUP fupfile !OUTPUT RECORD *. !EXIT Command Edit FUP command File file. (optional step) 13> TEDIT fupfile PS TEXT EDIT Edited Command...
  • Page 30 Introduction to DDL Generating Source Code the schema, it opens a file for each specified language, translates the subsequent object definition statements into source code for those languages, and writes the code to the language files. You can also generate source code from an existing dictionary. To do this, you could add a language command to your schema and recompile the entire schema.
  • Page 31: Figure 1-4. Generating Source Code

    Introduction to DDL Generating Source Code Figure 1-4. Generating Source Code ? DICT ? COBOL Source cobfile Schema DEF . . . Generate source code (entire schema) RECORD . . . COBOL 15> DDL / IN schema Source Code Dictionary Dictionary Generate source code (selected records and definitions)
  • Page 32: Maintaining A Dictionary

    Host-language source files used by native programs and shared with TNS programs must be generated using a version D40 or later DDL compiler. Host-language source files supplied by HP have already been generated by the correct version of the DDL compiler.
  • Page 33: Examining A Dictionary

    Introduction to DDL Examining a Dictionary 2. Change a referenced object. Open the dictionary and a new DDL source schema file. Use an OUTPUT UPDATE statement to identify all objects that refer to the object you want to change and write the necessary statements to the open DDL source schema file. Close the source schema file and edit the DDL file, if necessary.
  • Page 34 You can also generate reports on the dictionary itself. HP supplies a set of Enform queries that provide information about any dictionary. These reports are particularly useful for anyone acting as the administrator of a database.
  • Page 35: Figure 1-6. Examining A Dictionary

    Introduction to DDL Examining a Dictionary Figure 1-6. Examining a Dictionary Produce schema report Source Schema 19> DDL !? REPORT $S.#printer !? SOURCE schema Schema ! EXIT Report Produce dictionary reports Dictionary 20> ENFORM / IN $ system.system Dictionary ddquerys / DICT $system.ddl ENFORM Reports VST006.vsd...
  • Page 36 Introduction to DDL Examining a Dictionary Data Definition Language (DDL) Reference Manual—426798-002 1- 14...
  • Page 37: Ddl Names

    DDL Language Elements A DDL source schema consists of DDL statements, DDL compiler commands, and comments. You must enter statements, commands, and comments according to strict syntax, or rules of form. This section introduces the DDL syntax by describing the language elements common to statements and commands, the comments associated with statements, and the rules for entering DDL statements and commands.
  • Page 38: Ddl File Names

    SPI name (see note) VST200.vsd Note. SPI variable names and other names defined by HP begin with the letter Z. To avoid the possibility of conflict with a current or future HP name, you should not begin a name with the letter Z unless you are referring to an existing SPI name, such as ZSPI-TKN-RETCODE.
  • Page 39 Network File Names Network file names identify files that are accessed across a network of HP NonStop systems. Always identify a network file by a fully qualified file name that includes the system, volume, and subvolume on which the file resides.
  • Page 40: Ddl Locale Names

    DDL Language Elements DDL Locale Names file-identifier consists of 1 to 8 alphabetic or numeric ASCII characters; the first character must be alphabetic. These are examples of valid file names: Network file name \DALLAS.$DATA.SALES.CUSTOMER Fully qualified local file name $DATA.SALES.CUSTOMER Local file name;...
  • Page 41: Ddl Numbers

    DDL Language Elements DDL Numbers charset is a string forming a HP internal character set name. For example, the locale name da_DK.ISO8859-1 would be specified as LN"da_DK.ISO8859-1" and would consist of the language-code da, the territory-code DK, and the charset value ISO8859-1.
  • Page 42: Ddl Keywords And Reserved Words

    DDL Language Elements DDL Keywords and Reserved Words If the string contains quotation marks, you must enter each quotation mark twice to distinguish the quotation mark character from the string delimiter. You can use either single or double quotation marks as string delimiters. Examples of DDL strings follow: "C00"...
  • Page 43: Ddl Reserved Words

    DDL Language Elements DDL Reserved Words HEADING HELP HIGH-NUMBER HIGH-VALUE HOUR ICOMPRESS INDEX INDEXED INTERVAL JUST JUSTIFIED KEY-SEQUENCED KEYTAG LOGICAL LOW-NUMBER LOW-VALUE LOW-VALUES MAXEXTENTS MINUTE MONTH MUST NOVALUE NOVERSION NULL OCCURS ODDUNSTR OUTPUT PACKED-DECIMAL PHANDLE PICTURE QUOTE QUOTES RECORD REDEFINES REFRESH RELATIVE RENAMES...
  • Page 44: Table 2-1. Ddl Special Characters

    DDL Language Elements DDL Special Characters CHARACTER FILLER TIME COMPLEX FLOAT TIMESTAMP In addition to checking for reserved words, the DDL compiler checks DDL names to see if they are reserved words in a host language for which DDL is generating source code.
  • Page 45: Ddl Comments

    DDL Language Elements DDL Comments DDL Comments The DDL compiler supports two kinds of comments: Dictionary comments, which DDL stores in the dictionary and in all open language source-code files Listing comments, which appear only in the compiler listing A dictionary comment is indicated by an asterisk in the first column of the source line. A listing comment is preceded by an exclamation point and ended by another exclamation point or by the end of the source line.
  • Page 46 DDL Language Elements Dictionary Comments A comment can precede a field or group description within a DEFINITION or RECORD statement; for example: DEFINITION custinfo. * This field contains a unique customer identifier: 02 custnum PIC 9(4). * This group contains the customer name in sequence: 02 custname.
  • Page 47: Compiler Listing Comments

    DDL Language Elements Compiler Listing Comments Compiler Listing Comments DDL puts listing comments only in its compiler listing, not in the dictionary or in host- language source-code files. Like dictionary comments, DDL has two kinds of listing comments: User-defined comments Production comments User-Defined Listing Comments DDL always puts user-defined listing comments in its compiler listing.
  • Page 48: Ddl Statements

    DDL Language Elements DDL Statements DDL Statements DDL statements define, modify, delete, and display DDL objects. DDL statements must conform to the following rules of form: Every simple statement except EXIT must end with a period. Every compound statement must end with END, optionally followed by a period. These are compound statements: Field DEFINITION statements that include BEGIN Group DEFINITION statements...
  • Page 49: Ddl Compiler Commands

    DDL Language Elements DDL Compiler Commands Table 2-2. DDL Statement Summary Statement Function Section RECORD Defines a record—the record structure and physical characteristics of a disk file. The defined record can be added to an open dictionary, compiled into FUP file creation commands, or compiled into a DDL or host- language source-code file.
  • Page 50 DDL Language Elements DDL Compiler Commands The DDL compiler commands are described in Section 9, DDL Compiler Commands. Table 9-1 on page 9-1 summarizes the commands. Data Definition Language (DDL) Reference Manual—426798-002 2- 14...
  • Page 51: Running The Ddl Compiler

    Running the DDL Compiler You can run the DDL compiler in either of two ways: Entering an entire source schema to the compiler from a source file Entering individual source lines interactively from the keyboard To initiate either method, invoke the DDL compiler with a command interpreter RUN command.
  • Page 52: Running Ddl In Noninteractive Mode

    Running the DDL Compiler Running DDL in Noninteractive Mode OUT [ listing-destination ] is the name of the output device or disk file to which the DDL compiler writes its listing. If you omit the OUT run option, DDL sends the listing to its home terminal.
  • Page 53: Running Ddl In Interactive Mode

    Running the DDL Compiler Running DDL in Interactive Mode Compiles the statements in ddl-source-file and produces a compiler listing at listing-destination, which you can specify in the OUT run option of the DDL run command. Performs the actions specified by any compiler control commands in the DDL run command or in ddl-source-file.
  • Page 54 Running the DDL Compiler Running DDL in Interactive Mode Guidelines Because errors are difficult to correct while you enter statements interactively, you should not try to enter an entire schema in interactive mode. Rather, you should specify a large source schema in an EDIT file, in which you can correct mistakes as you type.
  • Page 55: Completion Code Processing

    Running the DDL Compiler Completion Code Processing If a dictionary exists on the default subvolume, open the dictionary for update access and delete all the dictionary objects it contains; otherwise, create a dictionary on the current default volume and subvolume. Issue a prompt (!) for input from the terminal.
  • Page 56 Running the DDL Compiler Completion Code Processing Data Definition Language (DDL) Reference Manual—426798-002 3 -6...
  • Page 57: Named Constants

    Named Constants A constant is a DDL dictionary object that has a name, a data type, and a value. You define a constant in a CONSTANT statement, and you can refer to a constant value by name in other DDL statements. This section describes the CONSTANT statement and its components.
  • Page 58 Named Constants CONSTANT Statement "string" specifies the value of a string constant; string is a string of from 1 to 130 ASCII characters. national-literal is a national literal of the following form: { N } { "2-byte-character..." } { n } { ‘2-byte-character...’ } Each 2-byte-character must be 2 bytes in length internally;...
  • Page 59: Table 4-1. Values For Different Types Of Numeric Constants

    Named Constants CONSTANT Statement TYPE Clause Guidelines Each type of numeric constant has a different range of valid values, as Table 4-1 shows. Table 4-1. Values for Different Types of Numeric Constants Numeric Type Valid Values BINARY 16 -32,768 to 32,767 BINARY 16 UNSIGNED 0 to 65,535 BINARY 32...
  • Page 60 Named Constants CONSTANT Statement If you use the version number for a comparison check with other version numbers, you can use the number as is. If you need to decode the number to determine the specified release, do this: Obtain the letter of the release by dividing the number by 256. The quotient is the ASCII decimal representation of the uppercase letter;...
  • Page 61 Named Constants CONSTANT Statement C Guidelines The following points are guidelines for generating C source code from CONSTANT statements: If you request C source-code output, by giving the C command, DDL generates #defines for named constants. DDL converts any hyphen in the constant name to an underscore (_) in the #define name.
  • Page 62 Named Constants CONSTANT Statement Pascal Guidelines The following points are guidelines for generating Pascal source code from CONSTANT statements: If you request Pascal source-code output, by giving the PASCAL command, DDL generates Pascal constants. DDL converts any hyphen in the constant name to an underscore (_) in the Pascal constant name.
  • Page 63 Named Constants CONSTANT Statement For a version constant, DDL generates a TACL TEXT variable that contains the version number. The internal representation of a DDL constant in TACL differs from the following representations: The internal representation of DDL constants in pTAL, TAL, and COBOL. The internal representation of all other DDL objects in TACL.
  • Page 64 Named Constants CONSTANT Statement CONSTANT Statement Examples The following examples illustrate CONSTANT statements that define string, numeric, and version constants: CONSTANT prog-name VALUE IS "MYPROG". CONSTANT myprog VALUE IS prog-name. CONSTANT zspi-val-tandem-owner VALUE IS "TANDEM ". CONSTANT hundred VALUE IS 100. CONSTANT double-hundred VALUE 100 TYPE BINARY 32.
  • Page 65: Standard Spi Constants

    Named Constants Standard SPI Constants Standard SPI Constants Subsystems that use DSM are provided with a set of CONSTANT statements to define standard values for use in SPI messages. For the names and descriptions of standard SPI constants, see the SPI Programming Manualand the SPI Common Extensions Manual.
  • Page 66 Named Constants Standard SPI Constants Data Definition Language (DDL) Reference Manual—426798-002 4- 10...
  • Page 67: Definitions And Records

    Definitions and Records Definitions and records are DDL dictionary objects that describe data structures and disk-file record structures, respectively. A definition (or DEF) consists of the name, data type, size, and other attributes of a field (elementary item) or of a named group of fields in a data structure. A record consists of the record structure of an Enscribe disk file.
  • Page 68: Exceptions For Specifying Definition Clauses

    Definitions and Records Exceptions for Specifying Definition Clauses This form defines a group of fields or groups. A group DEFINITION statement consists of a name and any of the field definition clauses that are legal for groups, terminated by a period and followed by one or more field or group descriptions. The entire group DEFINITION statement is terminated by END.
  • Page 69: Field Definition Syntax

    Definitions and Records Field Definition Syntax Field Definition Syntax The following is the syntax of the DEFINITION statement when used to define a field: DEF[INITION] def-name { PICTURE clause } { TYPE clause [ AS clause ] [ BEGIN ] [ DISPLAY clause ] [ EDIT-PIC clause ] [ EXTERNAL clause ]...
  • Page 70: Group Definition Syntax

    Definitions and Records Group Definition Syntax Group Definition Syntax The syntax of the DEFINITION statement when used to define groups of fields follows. DEF[INITION] def-name [ DISPLAY clause ] [ EXTERNAL clause ] [ HEADING clause ] [ HELP clause ] [ NULL clause ] [ [NOT] SQLNULLABLE clause ] [ USAGE clause ]...
  • Page 71: Reference Definition Syntax

    Definitions and Records Reference Definition Syntax Reference Definition Syntax The following is the syntax of the DEFINITION statement when used to define a reference to a previous definition: DEF[INITION] def-name-1 TYPE def-name-2 [ AS clause ] [ BEGIN ] [ DISPLAY clause ] [ EDIT-PIC clause ] [ EXTERNAL clause ] [ HEADING clause ]...
  • Page 72 Definitions and Records Syntax Elements def-name-2 is the name of an existing definition in the open DDL dictionary. { PICTURE clause | TYPE clause} declares the data type and size of a field. A PICTURE clause cannot describe a group. A TYPE clause can refer to an existing definition in the open dictionary. AS clause specifies a default display string for a field of type ENUM.
  • Page 73 Definitions and Records Syntax Elements JUSTIFIED clause tells the DDL compiler to output the JUSTIFIED RIGHT clause in COBOL source files. LN clause specifies the language, territory, and character set for a text item. MUST BE clause specifies the set of valid values that can be entered into a field. Requesters generated by the Pathmaker product enforce the MUST BE constraints;...
  • Page 74 Definitions and Records Syntax Elements UPSHIFT clause specifies that ASCII characters entered in this field must be upshifted. Requesters generated by the Pathmaker product upshift character strings entered into this field; user-written programs must be coded to upshift them. USAGE clause declares numeric storage allocation for a field or group.
  • Page 75 Definitions and Records Syntax Elements 66 RENAMES clause renames a previously declared field or group or a set of fields or groups, only for COBOL or DDL source code. END [ . ] ends a group DEFINITION statement, or ends a single-field DEFINITION statement that includes BEGIN.
  • Page 76 Definitions and Records Syntax Elements Level Number Guidelines Level numbers must conform to the following rules: The DEFINITION statement does not have a level number; it is implicitly at the 01 level. Each group and field within a group DEFINITION statement has a level number to indicate its relationship to other groups and fields within the group.
  • Page 77: Definition Error Handling

    Definitions and Records Definition Error Handling 89 write-error . END. Group Definitions: DEF address . 03 street-address . 05 street-no PIC X (8) . 05 street PIC X (12) . 05 apt-ro PIC X (4) . 03 city PIC X (14) . 03 state-cd PIC X (2) .
  • Page 78: Record Statement

    Definitions and Records RECORD Statement RECORD Statement The RECORD statement defines a disk file record; specifies the record’s file name and type; and if the file is structured, identifies the key fields and assigns a key specifier to any alternate keys. If a dictionary is open, DDL stores the record in the dictionary.
  • Page 79 Definitions and Records Parts of the RECORD Statement The syntax of the RECORD statement is as follows: RECORD record-name . [ file-creation ] record-structure [ key-assignment ] END [ . ] record-name is a DDL name that uniquely identifies the record in a dictionary. No record can have the same name as any other object in the dictionary.
  • Page 80: File-Creation Syntax

    Definitions and Records File-Creation Syntax File-Creation Syntax The following describes the syntax of the file-creation portion of a RECORD statement. FILE IS { ["]file-name["] } { TEMPORARY } [ creation-attribute ] ... { ASSIGNED creation-attribute is: { KEY-SEQUENCED { RELATIVE { ENTRY_SEQUENCED { UNSTRUCTURED [ AUDIT ]...
  • Page 81 Definitions and Records File-Creation Syntax { KEY-SEQUENCED | RELATIVE | ENTRY-SEQUENCED | UNSTRUCTURED } specifies an Enscribe file type. The first three specify structured files that can have keys. For a description of file types, see the Enscribe Programmer’s Guide. If the file type is omitted, DDL assigns a default file type, as explained under File Creation Guidelines...
  • Page 82 The default setting for a file code is 0. file-code is an integer between 0 and 65,535. File codes 100 through 999 are reserved for use by HP. constant-name is the name of a constant in the open DDL dictionary. The constant value must be a valid file-code value.
  • Page 83: Reference Record Structure Syntax

    Definitions and Records Reference Record Structure Syntax MAXEXTENTS { maximum-extents | constant-name } sets the maximum number of extents the file can have. The default value for MAXEXTENTS is 100. maximum-extents is an integer from 1 to n, in which n is determined by the available free space in the file label.
  • Page 84: Record Structure Syntax

    Definitions and Records Record Structure Syntax Record Structure Syntax The following describes the syntax used to define a record structure. Detailed syntax and guidelines for each of the individual clauses are given in Section 6, Definition Attributes. line-item specification ... [ 66 RENAMES clause .
  • Page 85 Definitions and Records Record Structure Syntax group-name is a DDL name that identifies a group of fields or groups in a record. The name must be unique within the record or, if part of a group, within the group. FILLER is an unnamed field that reserves storage space within a record.
  • Page 86 Definitions and Records Record Structure Syntax MUST BE clause specifies the set of valid values that can be entered into a field. Requesters generated by Pathmaker enforce the MUST BE constraints; user-written programs must be coded to enforce them. NULL clause assigns a null value to a field or group used as an alternate key in an Enscribe structured file.
  • Page 87: Key Assignment Syntax

    Definitions and Records Key Assignment Syntax 89 enumeration clause associates a name with a specified or default enumeration value and, optionally, specifies a display string for the value. 66 RENAMES clause renames a previously declared field, group, or set of fields or groups, only for COBOL or DDL source code.
  • Page 88 Definitions and Records Key Assignment Syntax FILE IS ["]file-name["] identifies the alternate key file for the specified key; file-name is a DDL local or network file name. You can enclose the file name in quotation marks. The default file name is the primary file name with a number appended. DUPLICATES [ NOT ] ALLOWED specifies whether to allow duplicate alternate key values.
  • Page 89: Table 5-1. File Attributes That Differ In Ddl And Fup

    Definitions and Records Key Assignment Syntax DDL file creation defaults and those of FUP differ in the following ways: If file-creation is omitted, DDL assigns a file type as follows: File Type Condition Key-sequenced If the record has a primary key Unstructured If the record has no keys;...
  • Page 90 Definitions and Records Key Assignment Syntax Every field description must have a PICTURE or TYPE clause. A group description cannot have a PICTURE clause. A TYPE clause for a field within a record structure can refer to a field or group definition previously stored in a data dictionary.
  • Page 91 Definitions and Records Key Assignment Syntax Key Assignment Guidelines The following points are guidelines for making key assignments: Only key-sequenced records can have a key-specifier with a value of 0, indicating a primary key. Key-sequenced records must have one and only one primary key. A key defined with a nonzero key specifier, such as “NM”...
  • Page 92 Definitions and Records Key Assignment Syntax The CUST record derives its record structure from the definition of CUSTINFO: RECORD cust . File name FILE IS "$data.sales.customer" . KEY-SEQUENCED . File type Record structure DEF IS custinfo . Primary Key KEY IS cust.custnum . Alternate Key KEY "nm"...
  • Page 93: Record Statement Error Handling

    Definitions and Records RECORD Statement Error Handling KEY "KY" IS f-2 FILE IS "AltKy" UPDATE NOT ALLOWED. END. FUP Output: RESET SET ALTKEY ("KY", KEYOFF 2, KEYLEN 10, FILE 0, NO UPDATE) SET NO ALTCREATE SET ALTFILE (0, AltKy) SET TYPE R SET REC 20 SET BLOCK 4096 SET EXT(4, 32)
  • Page 94 Definitions and Records RECORD Statement Error Handling Data Definition Language (DDL) Reference Manual—426798-002 5- 28...
  • Page 95: Definition Attributes

    Definition Attributes Definition attributes are part of definitions and records, which are DDL dictionary objects that describe data structures and disk-file record structures. Each definition and record includes attributes such as size, data type, and usage. The definition attributes are defined by clauses in DEFINITION statements or in the record structure portion of RECORD statements.
  • Page 96 Definition Attributes Table 6-1. Definition and Record Clauses (page 2 of 2) Clause Function NULL Assigns a null value to a field or group used as an Enscribe alternate key. DDL ignores this clause when generating host-language source code. OCCURS Specifies a subscripted array of like fields or like groups.
  • Page 97: As Clause

    Definition Attributes AS Clause AS Clause The AS clause specifies a display string for an enumeration value when AS is in a level 89 enumeration clause. At the definition level, the AS clause specifies a default display string for a field of type ENUM. This default becomes the display string when the value of the field does not match any of the values specified by level 89 enumeration clauses in the field’s definition or description.
  • Page 98: Display Clause

    Definition Attributes DISPLAY Clause DISPLAY Clause The DISPLAY clause specifies a default format for field or group values listed on an Enform report. DDL ignores the DISPLAY clause when generating host-language source code. DISPLAY {"display-format" | constant-name} display-format consists of repeatable edit descriptors, nonrepeatable edit descriptors, and modifiers, as described in the Enform Plus Reference Manual, under the AS clause, or in the Guardian Programmer’s Guide, in the description of the formatter.
  • Page 99: Edit-Pic Clause

    Definition Attributes EDIT-PIC Clause Table 6-2. Display Format Examples Display Format Value Displayed Value “M<99/99/99>” 012791 01/27/91 “M<Z,ZZZ.99>” 0.00 “M<Z,ZZZ.99>” 1.499 1.50 “M<$ZZ,ZZ9.99>” 5246.95 $ 5,246.95 “M<(999) 999-9999>” 4084266974 (408) 426-6974 “M<99,999>” 524695 ******* (overflow) The following examples illustrate using constant names to specify display formats: CONSTANT mdy-date-display VALUE "M<mm/dd/yy>".
  • Page 100 Definition Attributes EDIT-PIC Clause If a field’s data type and the edit picture are defined as two different data elements in the working-storage section of a COBOL85 program, moving the data from one picture to the other must be possible. The edit picture for an alphanumeric field must be alphanumeric, and the edit picture for a numeric field must be numeric.
  • Page 101: External Clause

    Definition Attributes EXTERNAL Clause currency symbol at the beginning. Also, it is valid to display fewer characters to the right of the decimal point than the elementary item contains there. The data length of the second edit picture is invalid because it has too many minus signs.
  • Page 102: Filler Clause

    Definition Attributes FILLER Clause FILLER Clause The FILLER clause assigns a data type and size to a unnamed field. This clause reserves space that will never be referred to directly. FILLER FILLER Clause Guidelines The following points are guidelines for using the FILLER clause: A FILLER field must have its data type and size specified with a PICTURE or TYPE clause.
  • Page 103: Heading Clause

    Definition Attributes HEADING Clause C Source Code: #pragma section name_struct #pragma fieldalign shared2_name_struct struct name_struct_def char first_name[10]; char filler_0[6]; char second_name[24]; char filler_1[6]; Pascal Source Code: ?Section NAME_STRUCT TYPE NAME_STRUCT_DEF = RECORD FIRST_NAME : FSTRING[10]; FILLER_1 : FSTRING[6]; SECOND_NAME : FSTRING[24]; FILLER_2 : FSTRING[6];...
  • Page 104 Definition Attributes HEADING Clause LN clause specifies the locale associated with a value. HEADING Clause Guidelines The following points are guidelines for using the HEADING clause: A slash within report-heading indicates a line break in an Enform heading. A slash within report-heading indicates a line break in a Pathmaker field only if the item format is tabular.
  • Page 105: Help Clause

    Definition Attributes HELP Clause HELP Clause The HELP clause enables you to associate help text with a group or elementary item in a DEFINITION or a RECORD statement. DDL ignores the HELP clause when generating host-language source code. HELP { "help-text" | constant-name } [ [ , ] "help-text"...
  • Page 106: Justified Clause

    Definition Attributes JUSTIFIED Clause HELP Clause Examples The following example illustrates two ways of continuing help text for a field. The first text string is continued with a comma; the second text string is continued without a comma. DEF address HELP "This is a four-field", "address consisting of street,"...
  • Page 107: Keytag Clause

    Definition Attributes KEYTAG Clause KEYTAG Clause The KEYTAG clause declares that the field or group is an Enscribe key field. Key fields can overlap each other. DDL ignores this clause when generating TACL source code. Keytag {key-specifier} [DUPLICATES [NOT] ALLOWED] {constant-name} key-specifier is any number from -32,768 to 32,767, or 2 ASCII characters enclosed in quotation...
  • Page 108: Ln Clause

    Definition Attributes LN Clause KEYTAG Clause Example The PARTINFO record structure is described within the RECORD statement. KEYTAG clauses, rather than key-assignment statements, specify the primary key PARTNUM and the alternate key PARTNAME in the following example: CONSTANT partnum-heading VALUE IS "Part/Number". CONSTANT partnum-display VALUE IS "M<ZZZ,ZZ9.99>".
  • Page 109 ISO 3166:1988 Alpha-2 code entity name. charset is a string forming a HP internal character set name. For example, the locale name da_DK.ISO8859-1 would be specified as LN"da_DK.ISO8859-1" and would consist of the language-code da, the territory-code DK, and the charset value ISO8859-1.
  • Page 110: Must Be Clause

    Definition Attributes MUST BE Clause no_NO.ISO8859-1 Norwegian pt_PT.ISO8859-1 Portuguese sv_SE.ISO8859-1 Swedish tr_TR.ISO8859-9 Turkish zh_TW.eucTW Taiwanese, EUC LN Clause Example The following is an example of the LN clause: DEFINITION custnum PIC 9(4). HEADING "Finnish" LN"fi_FI.ISO8859-1" "Norwegian" LN"no_NO.ISO8859-1" "Danish" LN"da_DK.ISO8859-1". MUST BE Clause The MUST BE clause specifies the set of valid values that can be entered into a field.
  • Page 111: Table 6-3. Figurative Constants

    Definition Attributes MUST BE Clause figurative-constant is a constant that the DDL compiler has prenamed and predefined. You need not enclose the constant in quotation marks. Singular and plural forms are equivalent in meaning. The figurative constants are listed in Table 6-3 page 6-17.
  • Page 112: Table 6-4. Symbolic Literals

    Definition Attributes MUST BE Clause use symbolic literals only for numeric items. The symbolic literals are shown in Table 6-4 on page 6-18. Table 6-4. Symbolic Literals Symbolic Literal Value LOW-NUMBER The minimum numeric value of the type specified for this field HIGH-NUMBER The maximum numeric value of the type specified for...
  • Page 113 Definition Attributes MUST BE Clause Requesters generated by the Pathmaker product enforce the MUST BE constraints; programs written by users must be coded to enforce these constraints as well. MUST BE Clause Examples In this example, the MUST BE clause defines the acceptable ranges of values for days in a month and months in a year: DEF date.
  • Page 114: Null Clause

    Definition Attributes NULL Clause NULL Clause The NULL clause specifies a null value for an Enscribe alternate key. If a record being inserted into the database has a null value in the alternate key field, the alternate key is not added to the alternate key file. DDL ignores the NULL clause when generating host-language source code.
  • Page 115: Occurs Clause

    Definition Attributes OCCURS Clause NULL Clause Examples The following example shows the use of the NULL clause. In this example, if the employee does not have a spouse or dependents, the key is not added to the alternate key file: RECORD employee.
  • Page 116 Definition Attributes OCCURS Clause INDEXED BY index-name specifies the index attribute for COBOL output only; index-name is the name of a field to use as an index. The maximum length of the index name is 30 ASCII characters. OCCURS Clause Guidelines The following points are guidelines for using the OCCURS clause: OCCURS cannot be specified for the first element of a RECORD or DEFINITION statement.
  • Page 117 Definition Attributes OCCURS Clause OCCURS Clause Examples The following statements declare storage for 52 paycheck values, one for each week of the year: DEF salary. 02 paycheck PIC 9999V99 OCCURS 52 TIMES. TAL programs with TALBOUND 1 or with no TALBOUND clause access individual paycheck values like this: PAYCHECK [1] Paycheck value for the first week...
  • Page 118: Occurs Depending On Clause

    Definition Attributes OCCURS DEPENDING ON Clause 03 year PIC 99. The following shows COBOL output for the INDEXED BY attribute: DDL Code COBOL Code DEF xyz 01 XYZ. 02 abc TYPE BINARY 02 ABC NATIVE-2 OCCURS 3 TIMES OCCURS 3 TIMES INDEXED BY ix.
  • Page 119 Definition Attributes OCCURS DEPENDING ON Clause OCCURS DEPENDING ON Clause Guidelines The guidelines for using an OCCURS clause also apply to OCCURS DEPENDING ON, with the following exceptions: For C, FORTRAN, Pascal, pTAL, TACL, and TAL, the DDL compiler generates source code identical to the code it generates for OCCURS max TIMES.
  • Page 120: Picture Clause

    Definition Attributes PICTURE Clause The following shows COBOL output for the DEPENDING ON clause: DDL Code COBOL Code DEF xyz. 01 XYZ. 02 i TYPE BINARY 02 I NATIVE-2. 02 abc TYPE BINARY 02 ABC NATIVE-2 OCCURS 1 to 3 OCCURS 1 TO 3 TIMES TIMES...
  • Page 121 Definition Attributes PICTURE Clause length is a one-digit to five-digit integer, enclosed in parentheses, that specifies the number of times the preceding symbol is repeated. You can also specify the length by repeating the symbol (X, A, or 9) a number of times, once for each character position you want in the field.
  • Page 122 Definition Attributes PICTURE Clause The only symbol you can specify in a national picture string is N or n (except for the parentheses and a number to specify the length, or number of repetitions). The maximum length you can specify for a national data item is half of the maximum internal field length.
  • Page 123 Definition Attributes PICTURE Clause The maximum field length depends on data type: If an alphanumeric or national field is used only in working storage (not in a record), the maximum field length is 32,767 bytes. If an alphanumeric or national field is defined in or referenced by a RECORD statement, the maximum field length is the maximum record length, which depends on file type: Entry-sequenced...
  • Page 124 Definition Attributes PICTURE Clause Most alphanumeric and numeric PICTURE clauses are translated into FORTRAN character strings. The only exceptions are numeric fields described with USAGE IS COMP; these fields are translated into FORTRAN integers. Appendix C, DDL Data Translation, contains a table showing the FORTRAN data types generated from DDL PICTURE clauses.
  • Page 125 Definition Attributes PICTURE Clause If a numeric, national, or alphanumeric field is not defined in or referenced by a RECORD statement, the maximum field length is 32,767 bytes. If a numeric, national, or alphanumeric field is defined in or referenced by a RECORD statement, the maximum field length is the maximum record length, which depends on file type: Entry-sequenced files...
  • Page 126: Redefines Clause

    Definition Attributes REDEFINES Clause REDEFINES Clause The REDEFINES clause assigns a new name and data structure to an existing definition or record. REDEFINES { field-name | group-name } field-name identifies the previous field in the definition or record currently being defined; field-name is a DDL name.
  • Page 127 Definition Attributes REDEFINES Clause NOWARN command. The name of the union has the form u_first_member_name. If the union name generated by DDL is the same as any of its siblings defined in the same group, DDL issues an error message and does not generate output.
  • Page 128 Definition Attributes REDEFINES Clause 02 D. 04 D-1 PIC X. 04 D-2 PIC 9 REDEFINES D-1. 02 E PIC 9(5). 02 F REDEFINES E. 04 F-1 PIC 9(3). 04 F-2 PIC 9(2). END. Pascal: TYPE A_DEF = RECORD : RECORD CASE INT16 OF 01:( B : FSTRING[4]...
  • Page 129: Spi-Null Clause

    Definition Attributes SPI-NULL Clause SPI-NULL Clause The SPI-NULL clause specifies an Subsystem Programmatic Interface (SPI) null value for a field or group definition of an SPI extensible structured token, or for a field or group description within a group definition. The SPI-NULL clause is specified in a DEFINITION statement referenced in the DEF IS clause of a TOKEN-MAP statement.
  • Page 130 Definition Attributes SPI-NULL Clause If SPI-NULL is not specified, the default SPI null value is 255; that is, SSNULL sets all bits to 1. An explicit SPI-NULL clause for a field or for a group containing the field overrides the default SPI null value. You should not specify a VALUE clause for a field or group used to define an extensible structured token.
  • Page 131 Definition Attributes SPI-NULL Clause When a definition refers to another definition and the referring definition contains one or more SPI-NULL clauses, these clauses override any SPI-NULL clauses in the referenced definition. If the referring definition does not have any SPI-NULL clauses, it inherits the SPI null value or values from the referenced definition.
  • Page 132: Sqlnullable Clause

    Definition Attributes SQLNULLABLE Clause SQLNULLABLE Clause The SQLNULLABLE clause specifies whether a line item is to be treated in the same way as an SQL nullable column. { SQLNULLABLE | NOT SQLNULLABLE } In SQL, if a column is not explicitly specified as NOT NULL, it is a nullable column. Internally, a nullable SQL column is composed of the column itself and a numeric flag that indicates whether the column is null.
  • Page 133 Definition Attributes SQLNULLABLE Clause If the DDL clause NULL is specified for a line item, NOT SQLNULLABLE cannot be specified or implied for that item. SQLNULLABLE and NOT SQLNULLABLE cannot be specified on a line item whose data type has been set by a previous definition, nor on a group or subgroup that contains such a line item.
  • Page 134 Definition Attributes SQLNULLABLE Clause SQLNULLABLE cannot be specified for FILLER or BIT line items; these types of items can never be SQL-nullable. SQLNULLABLE cannot be specified on a group that contains a FILLER or BIT line item unless that line item is explicitly declared to be NOT SQLNULLABLE.
  • Page 135 Definition Attributes SQLNULLABLE Clause SQL-Nullable Output for C. The following example shows how DDL translates definitions and descriptions of SQL-nullable items into C source code: DDL Type C Type DEF B SQLNULLABLE. #pragma fieldalign shared2 __b typedef struct __b 02 name PIC X(25) char name[25];...
  • Page 136 Definition Attributes SQLNULLABLE Clause SQL-Nullable Output for FORTRAN. The following example shows how DDL translates definitions and descriptions of SQL-nullable items into FORTRAN source code: DDL Type FORTRAN Type DEF B SQLNULLABLE. RECORD B. 02 name PIC X(25) CHARACTER*25 NAME NOT SQLNULLABLE.
  • Page 137 Definition Attributes SQLNULLABLE Clause SQL-Nullable Output for TACL. The following example shows how DDL translates definitions and descriptions of SQL-nullable items into TACL source code: DDL Type TACL Type DEF B SQLNULLABLE. ?Section B Struct 02 name PIC X(25) Begin NOT SQLNULLABLE.
  • Page 138: Tacl Clause

    Definition Attributes TACL Clause TACL Clause The TACL clause specifies a high-level TACL data type to which an associated DDL data item is converted when DDL generates TACL source-code output from a DDL definition or record. TACL type type is: { CRTPID { DEVICE { ENUM { FNAME...
  • Page 139: Table 6-5. Lengths Of Tacl Data Types

    Definition Attributes TACL Clause If a DDL data item is defined by referring to an existing definition, the following applies: When the referring definition does not include a TACL clause, it inherits any TACL data type specified in the referenced definition. When the referring definition includes a TACL clause, the specified TACL data type overrides any TACL data type specified in the referenced definition.
  • Page 140 Definition Attributes TACL Clause DDL generates the following TACL data structure for the preceding definition: ?Section TERM^ID Struct Begin CHAR BYTE (0:7) A TACL clause at the group level overrides any TACL clauses specified for fields within the group; for example: DEF fname-def TACL FNAME.
  • Page 141: Type Clause

    Definition Attributes TYPE Clause TYPE Clause The TYPE clause performs either of two functions: It declares the type and size of a variety of data types. It declares a data structure by referring to a previously defined structure. { data-type } TYPE { def-name data type is: { CHARACTER length...
  • Page 142 Definition Attributes TYPE Clause 5,000 bytes for an entire TACL structure, which allows 5,000 ASCII characters or 2,500 national characters Available address space for COBOL and TAL or, for part of a record, the record length BINARY represents a two’s complement binary number, whose size can be specified as 8, 16, 32, or 64 bits.
  • Page 143 Definition Attributes TYPE Clause SQL VARCHAR length represents an SQL VARCHAR variable-length character string; length is the maximum number of characters allowed in the string. length must be an unsigned integer greater than zero. SQL DATETIME represents an SQL DATETIME data type. An SQL DATETIME data type specifies a point in time according to the Gregorian calendar.
  • Page 144 Definition Attributes TYPE Clause start-date-time and end-date-time must each be one of the following: YEAR MONTH HOUR MINUTE SECOND FRACTION [ end-field-precision ] The start-date-time item must appear earlier in this list than the end- date-time item. For example, SQL INTERVAL DAY TO MINUTE is a valid SQL INTERVAL specification, but SQL INTERVAL MINUTE TO DAY is not valid.
  • Page 145 Definition Attributes TYPE Clause TYPE Clause Guidelines In the TYPE clause, you can declare the type and size of an object, group, or field in one of three ways: Specify a data type. Refer to an existing definition that has a different name from the object, group, or field.
  • Page 146 Definition Attributes TYPE Clause For COBOL, type ENUM is translated into a NATIVE-2 item followed by level 88 items for the level 89 clauses. For FORTRAN, type ENUM is unsupported, and DDL generates an INTEGER*2 followed by comments containing the level 89 items. For Pascal, type ENUM is translated into constants followed by a type declaration of an INT16 item.
  • Page 147 Definition Attributes TYPE Clause If an SQL VARCHAR field is defined in or referenced by a RECORD statement, the maximum field length is the maximum record length, which depends on the file type: Entry-Sequenced files 4,072 bytes Key-Sequenced files 4,062 bytes Relative files 4,072 bytes Unstructured files...
  • Page 148 Definition Attributes TYPE Clause SQL INTERVAL data type: The syntax for the SQL INTERVAL data type differs from the corresponding SQL syntax. For DDL, you do not use parentheses around the start- field-precision and end-field-precision items; for SQL you do enclose start-field-precision and end-field-precision in parentheses.
  • Page 149 Definition Attributes TYPE Clause TAL and Pascal support bit maps outside group structures; however, these bit maps are packed in pTAL or TAL and unpacked in Pascal. To ensure that bit maps outside group structures are compatible between languages, DDL generates 16-bit integer items for bit fields declared as field definitions, with warning messages in all language outputs except Pascal.
  • Page 150 Definition Attributes TYPE Clause Level 88 clauses following a bit map item are rejected by DDL, because level 88 clauses are meaningful only in COBOL, which does not support bit maps. DDL does not generate language output for an ENUM clause specified with type BIT, because DDL emits the output for the enumeration when the clause is defined as type ENUM.
  • Page 151 Definition Attributes TYPE Clause The output for a bit map declared in a group structure is FILLER. Both named bit fields and filler bit fields have the same number of words as the bit map. For Pascal, DDL generates bit maps as follows: The output for a bit map declared as a field definition is INT (bit-length) or UNSIGNED (bit-length).
  • Page 152 Definition Attributes TYPE Clause DDL reads def-name from the dictionary and then places the entire definition at the level of the referring data element. The level number of a data element immediately following the TYPE def-name data element and in the same DEFINITION statement must be equal to or less than the level number of the TYPE def-name data element.
  • Page 153 Definition Attributes TYPE Clause TYPE Clause Examples The following example illustrates some TYPE data-type clauses: DEF type-clause-example.• 02 chr TYPE CHARACTER 8. 8 alphanumeric characters 02 bin-16 TYPE BINARY 16. Signed integer 02 bin-16-u TYPE BINARY 16 Unsigned integer UNSIGNED. 02 bin-16-s TYPE BINARY Signed integer, 2 decimal positions 16,2...
  • Page 154 Definition Attributes TYPE Clause If the TYPE clauses in the ORDERINFO definition were replaced by the structures they represent, the definition would look like this: orderinfo. 02 employee. 03 last-name PIC X(10). 03 first-name PIC X(20). 02 ordernum 9(3) HEADING "Order Number".
  • Page 155 Definition Attributes TYPE Clause SQL VARCHAR Field Output for COBOL. The following examples show how DDL translates definitions and descriptions of SQL VARCHAR fields into COBOL85 source code: DDL Type COBOL85 Type DEF name TYPE SQL VARCHAR 25 01 NAME. VALUE "Mary".
  • Page 156 Definition Attributes TYPE Clause SQL VARCHAR Field Output for Pascal. The following examples show how DDL translates definitions and descriptions of SQL VARCHAR fields into Pascal source code: DDL Type Pascal Type DEF name TYPE SQL VARCHAR 25 TYPE NAME_DEF = STRING(25); VALUE "Mary".
  • Page 157 Definition Attributes TYPE Clause SQL VARCHAR Field Output for pTAL and TAL. The following examples show how DDL translates definitions and descriptions of SQL VARCHAR fields into pTAL or TAL source code: DDL Type pTAL or TAL Type DEF name TYPE SQL VARCHAR 25 STRUCT NAME FIELDALIGN (SHARED2);...
  • Page 158 Definition Attributes TYPE Clause In the preceding examples, note that a simple variable of type bit_1_def has a different size from the field bits_0 in a variable having the type bit_struct_def. DDL Type C Type DEF Bit-Fillers #pragma fieldalign shared2 __bit_fillers typedef struct 2 Field-1 TYPE CHARACTER 3.
  • Page 159 Definition Attributes TYPE Clause Bit Field Output for COBOL. The following examples show how DDL translates definitions and descriptions of bit fields into COBOL85 source code: DDL Type COBOL85 Type DEF Bit-1 TYPE BIT 1. 01 BIT-1 NATIVE-2. DEF New-Bit-1 TYPE Bit-1. 01 NEW-BIT-1 NATIVE-2.
  • Page 160 Definition Attributes TYPE Clause Bit Field Output for FORTRAN. The following examples show how DDL translates definitions and descriptions of bit fields into FORTRAN source code: DDL Type FORTRAN Type DEF Bit-1 TYPE BIT 1 INTEGER*2 BIT1 DEF New-Bit-1 TYPE Bit-1. INTEGER*2 NEWBIT1 DEF Bit-10 TYPE BIT 10 UNSIGNED.
  • Page 161 Definition Attributes TYPE Clause DDL Type FORTRAN Type DEF Enum-Spec Begin INTEGER*2 ENUMSPEC TYPE ENUM. VAL-1 = 1 89 Val-1 Value 1. VAL-2 = 3 89 Val-2 Value 3. VAL-3 = 0 89 Val-3 Value 0. End. DEF Bits-With-Enums. RECORD BITSWITHENUMS 02 Bit-Field-1 TYPE BIT 8 FILLER*2 ENUM Enum-Spec.
  • Page 162 Definition Attributes TYPE Clause DDL Type Pascal Type DEF Bit-Map. TYPE BIT_MAP_DEF = PACKED RECORD 2 Bits-8 TYPE BIT 8. BITS_8 : INT(8); 2 Bits-3 TYPE BIT 3 UNSIGNED. BITS_3 : UNSIGNED(3); 2 Bits-10 TYPE BIT 10. FILLER_1 : INT(5); End.
  • Page 163 Definition Attributes TYPE Clause In the preceding examples, note that a simple variable of type BIT_1_DEF has a different size from the field BITS_0 in a variable of the record type BIT_STRUCT_DEF. DDL Type Pascal Type DEF Enum-Spec Begin CONST VAL_1 = 1; TYPE ENUM.
  • Page 164 Definition Attributes TYPE Clause DDL Type TACL Type DEF Bit-Map. ?Section BIT^MAP Struct 2 Bits-8 TYPE BIT 8. Begin 2 Bits-3 TYPE BIT 3 UNSIGNED. FILLER 2 Bits-10 TYPE BIT 10. FILLER End. End; DEF Bit-Struct. ?Section BIT^STRUCT Struct 2 Bits-0 TYPE Bit-1. Begin 2 Bits-1-To-10 TYPE Bit-10.
  • Page 165 Definition Attributes TYPE Clause Bit Field Output for pTAL and TAL. The following examples show how DDL translates definitions and descriptions of bit fields into TAL source code: DDL Type pTAL or TAL Type DEF Bit-1 TYPE BIT 1. BIT^1; DEF New-Bit-1 TYPE Bit-1.
  • Page 166 Definition Attributes TYPE Clause In the preceding examples, note that the simple variable BIT^1 has a different size from the field BITS^0 in a variable having the structure BIT^STRUCT^DEF. DDL Type pTAL or TAL Type DEF Enum-Spec Begin LITERAL VAL^1 = 1, TYPE ENUM.
  • Page 167: Upshift Clause

    Definition Attributes UPSHIFT Clause UPSHIFT Clause The UPSHIFT clause specifies that ASCII characters entered into a field must be upshifted UPSHIFT UPSHIFT Clause Guidelines The following points are guidelines for using the UPSHIFT clause: Requesters generated by the Pathmaker product translate lowercase characters entered into this field to uppercase characters;...
  • Page 168: Usage Clause

    Definition Attributes USAGE Clause USAGE Clause The USAGE clause declares a numeric storage allocation for a field or group or, for COBOL, specifies using a field as an index. [ USAGE [ IS ] ] { COMP[UTATIONAL] { INDEX { COMP[UTATIONAL]-3 } ( PACKED-DECIMAL COMP[UTATIONAL] specifies that the field or group is a numeric item that is to be stored as a...
  • Page 169 Definition Attributes USAGE Clause 02 F1 PIC 9999 COMP-3 VALUE 1234. COBOL output produced for EMP. For the PACKED-DECIMAL data type and a PICTURE 9999 declaration, the number +1234 would be stored as follows: F (sign) ------------------ -------------------- ----------------- | 0000 | 00001 | 0010 0011...
  • Page 170 Definition Attributes USAGE Clause For TAL and FORTRAN source code, the DDL compiler translates the COMPUTATIONAL clause into the type and scale appropriate to the language. The data type for translation is based on the number of 9’s in the PICTURE: Number of 9’s Type 1 to 4...
  • Page 171 Definition Attributes USAGE Clause A field can be declared as COMP-3 if the associated PICTURE declaration is of the form: [S] 9..[(length)] [ v 9..[(length)] ] The symbol “9” can occur a maximum of 18 times in a PICTURE clause for an item declared as COMP-3.
  • Page 172 Definition Attributes USAGE Clause definition or description does not match the storage allocation for index names in the target language. COBOL DEF abc TYPE BINARY 32 01 ABC USAGE IS INDEX. USAGE IS INDEX. DEF xyz TYPE BINARY Invalid - ERROR USAGE IS INDEX.
  • Page 173: Value Clause

    Definition Attributes VALUE Clause VALUE Clause The VALUE clause defines an initial value for a field or group or suppresses any VALUE clause in an item referenced by a TYPE clause. For C, FORTRAN, and TAL, initial values are translated into comments. For COBOL, initial values are translated into comments if a value is declared for a data type not supported by COBOL.
  • Page 174 Definition Attributes VALUE Clause The DDL figurative constants are shown in the following table: Name Definition LOW-VALUE One or more of the lowest character in the ASCII or national collating sequence LOW-VALUES HIGH-VALUE One or more of the highest character in the ASCII or national collating sequence HIGH-VALUES QUOTE...
  • Page 175 Definition Attributes VALUE Clause interval-literal is a character string that conforms to the rules for a NonStop™ SQL/MP interval-literal. For details about the NonStop™ SQL/MP rules, see the discussion about language elements in the NonStop™ SQL/MP Reference Manual or the NonStop™ SQL/MP Programming Reference Manual for the host language you are using.
  • Page 176 Definition Attributes VALUE Clause An initial value must be compatible with the data type of the field or group for which it is declared. An initial value declared at the group level must be alphanumeric. A numeric value must be in the range of values specified by the receiving PICTURE string.
  • Page 177 Definition Attributes VALUE Clause If you specify a datetime-literal or an interval-literal for a character field, DDL treats the literal as a regular character string. In such a case, DDL does not check the syntax and semantics of the string. If you specify a datetime-literal or an interval-literal for a numeric field, DDL returns an error.
  • Page 178 Definition Attributes VALUE Clause The following statements override or suppress these initial values: DEF base-price TYPE price Override initial value VALUE IS 20.00. DEF cust-name TYPE name Suppress initial value NOVALUE. VST615.vsd The next example uses the names of enumeration values in VALUE clauses: DEF prts-ddl-object-type TYPE ENUM BEGIN AS "Miscellaneous".
  • Page 179: 66 Renames Clause

    Definition Attributes 66 RENAMES Clause 66 RENAMES Clause The level 66 RENAMES clause renames a previously defined field or group or combination of fields and groups. For C, DDL translates a field with a RENAMES clause into a comment. DDL ignores the RENAMES clause when generating FORTRAN, TACL, or Pascal source code.
  • Page 180: 88 Condition-Name Clause

    Definition Attributes 88 Condition-Name Clause Do not use: street of address of employee COBOL qualification VST617.vsd If the THROUGH option is used, the definition of the first named field or group must precede that of the second named field or group. RENAMES Clause Example In the following example, ORDER-DETAIL renames the definition ODETAIL: DEF odetail.
  • Page 181 Definition Attributes 88 Condition-Name Clause symbolic-literal value-name "character-string" is a string of ASCII characters enclosed in quotation marks. constant-name is the name of a constant in the open DDL dictionary. The constant value must be a valid condition-name value but cannot be a figurative constant or symbolic literal.
  • Page 182 Definition Attributes 88 Condition-Name Clause The syntax for a DDL level 88 clause differs from a COBOL level 88 clause only in its punctuation; DDL requires commas between values or sets of values, whereas COBOL does not. The rules for the VALUE clause apply to the VALUE portion of a level 88 clause. One or more condition-name clauses can follow the definition attribute clauses in a field definition or description.
  • Page 183: 89 Enumeration Clause

    Definition Attributes 89 Enumeration Clause The next example associates the names of enumeration values with condition names: DEF prts-ddl-object-type TYPE ENUM BEGIN AS "Miscellaneous". 88 bolt VALUE prts-enm-bolt. 88 nut VALUE prts-enm-nut. 88 pin VALUE prts-enm-pin. 88 screw VALUE prts-enm-screw. 88 washer VALUE prts-enm-washer.
  • Page 184 Definition Attributes 89 Enumeration Clause constant-name is the name of a constant in the open DDL dictionary. The constant value must be a valid display-string value. LN clause specifies the locale associated with a value. DDL ignores the AS clause when generating host-language source code. Enumeration Clause Guidelines The following points are guidelines for using the enumeration clause: A single-field definition that has one or more level 89 clauses must also have...
  • Page 185 Definition Attributes 89 Enumeration Clause For COBOL85, the level 89 enumeration clauses for a field of type ENUM are translated into level 88 items. These items follow the source code for the ENUM field, a NATIVE-2 clause. For FORTRAN, the level 89 enumeration clauses for a field of type ENUM are translated into comments.
  • Page 186 Definition Attributes 89 Enumeration Clause C Output. The following shows how DDL translates definitions and descriptions of enumeration clauses into C source code: DDL Type C Type DEF status TYPE ENUM BEGIN. #pragma section status enum 89 no-error. 89 read-error. no_error = 0, 89 write-error VALUE 6.
  • Page 187 Definition Attributes 89 Enumeration Clause FORTRAN Output. The following shows how DDL translates definitions and descriptions of enumeration clauses into FORTRAN source code: DDL Type FORTRAN Type DEF status TYPE ENUM BEGIN. INTEGER*2 STATUS 89 no-error. NO-ERROR = 0 89 read-error. READ-ERROR = 1 89 write-error VALUE 3.
  • Page 188 Definition Attributes 89 Enumeration Clause Pascal Output. The following shows how DDL translates definitions and descriptions of enumeration clauses into Pascal source code: DDL Type Pascal Type DEF status TYPE ENUM BEGIN. CONST NO_ERROR = 0; 89 no-error. CONST READ_ERROR = 3; 89 read-error VALUE 3.
  • Page 189 Definition Attributes 89 Enumeration Clause TACL Output. The following shows how DDL translates definitions and descriptions of enumeration clauses into TACL source code: DDL Type TACL Type DEF status TYPE ENUM BEGIN. ?Section NO^ERROR Text 89 no-error. 89 read-error. ?Section READ^ERROR Text 89 write-error VALUE 6.
  • Page 190 Definition Attributes 89 Enumeration Clause pTAL and TAL Output. The following shows how DDL translates definitions and descriptions of enumeration clauses into TAL source code: DDL Type pTAL or TAL Type DEF status TYPE ENUM BEGIN. LITERAL NO^ERROR = 0, 89 no-error.
  • Page 191: Spi Tokens

    If you are writing a management application that communicates with HP subsystems using SPI messages, you use the token definitions supplied by HP. In such a case, this section can help you understand the DDL excerpts in the manuals that describe SPI programmatic interfaces.
  • Page 192: Ddl Token-Definition Statements

    SPI messages, whether you specify the definitions or they are specified by SPI or other HP software.
  • Page 193 0 and 254 that has been defined by SPI as a token- data-type identifier. HP supplies a set of predefined constants, defined in the file ZSPIDEF.ZSPIDDL, that you should use to specify token-data-type. constant-name is the name of a constant in the open DDL dictionary.
  • Page 194 SPI Tokens TOKEN-TYPE Statement OCCURS VARYING [ DEF [ ] def-name indicates that the length of the token varies. This clause sets the token length to its maximum of 255 bytes; only OCCURS VARYING allows structures greater than 254 bytes. To document the token structure, you can specify a DEF IS clause in the same statement with an OCCURS VARYING clause.
  • Page 195 SPI defines a set of standard token types. The names of standard SPI token types have the following format: Zsss-TYP-name In this format, the letter Z indicates that the token type is defined by HP, sss is a subsystem name or is SPI for a standard SPI name, and name identifies the token type.
  • Page 196 SPI Tokens TOKEN-TYPE Statement The definition ZSPI-DDL-INT specifies the structure of all simple tokens of the token type ZSPI-TYP-INT: DEF zspi-ddl-int TYPE BINARY 16 SPI-NULL 0. These definitions are in the file ZSPIDEF.ZSPIDDL. The following examples illustrate the definition of two token types you might define for your own subsystem.
  • Page 197 SPI Tokens TOKEN-TYPE Statement DDL generates the token-type value by left-shifting the token length in the second (low-order) byte and combining it with the token data type in the first (high- order) byte. TAL source code: Literal ZSPI^TYP^INT = 2 '<<' 8 + 2; Literal ASSN^TYP^STATUS = 2 '<<' 8 + 2;...
  • Page 198: Token-Code Statement

    -32768 to 32767. Token numbers for subsystems you write must be in the range 1 to 9998. Numbers outside this range are reserved by HP or are previously defined by SPI. Data Definition Language (DDL) Reference Manual—426798-002...
  • Page 199 SPI Tokens TOKEN-CODE Statement constant-name is the name of a constant in the open DDL dictionary. The constant value must be a valid token-number value. TOKEN-TYPE [ IS ] type-name . identifies the token type of the specified token; type-name is the name of a token type in the open DDL dictionary.
  • Page 200 SPI Tokens TOKEN-CODE Statement [ DISPLAY { “display-format” } ] constant-name specifies the display format for a token. If the DISPLAY clause is omitted, the display format for the token is based on the data type specified in the definition. display-format is a format code described in the DSM Template Services Manual.
  • Page 201 Zsss-TKN-name In this format, the letter Z indicates that the token code is defined by HP, sss is a subsystem name or a standard SPI name, and name is the token name. The file ZSPIDEF.ZSPIDDL on the disk volume chosen for your system contains the DDL definitions of the standard token codes.
  • Page 202 SPI Tokens TOKEN-CODE Statement COBOL source code: 01 ASSN-TKN-MY-STATUS NATIVE-4 VALUE IS 184680549. 01 ASSN-TKN-STAT-REPLY NATIVE-4 VALUE IS 184680550. The value of the token code is generated from the values specified for the token data type in the referenced TOKEN-TYPE statement and for the token number in the VALUE clause of the TOKEN-CODE statement the two token codes differ only in their token numbers.
  • Page 203: Token-Map Statement

    SPI Tokens TOKEN-MAP Statement ?Section ASSN_TKN_STAT_REPLY CONST ASSN_TKN_STAT_REPLY = 184680550; The value of the TOKEN-CODE statement generated for Pascal is the same as that generated for the other host languages. TOKEN-MAP Statement .The TOKEN-MAP statement defines a token map and stores the definition in an open dictionary.
  • Page 204 -32,768 to 32,767. Token numbers for subsystems you write must be in the range 1 to 9,998. Token numbers outside this range are reserved by HP or are previously defined by SPI. constant-name is the name of a constant in the open DDL dictionary.
  • Page 205 SPI Tokens TOKEN-MAP Statement [ HEADING { “label“ { constant-name} ] specifies a label that identifies a token or field in DSM Template Services. If the HEADING clause is omitted, the label is the token name. label is an ASCII character string. Template Services uses only the first 40 characters of the heading.
  • Page 206 SPI Tokens TOKEN-MAP Statement group-name identifies a group within the definition. TOKEN-MAP Statement Guidelines The following points are guidelines for using the TOKEN-MAP statement: A token map is a special kind of token code used to identify an extensible structured token to which new fields can be added in subsequent versions. You identify a token map by its token-name.
  • Page 207 SPI Tokens TOKEN-MAP Statement Derived from the SPI null value of a group definition that contains the elementary item. Implicitly specified by default; the default value for SPI-NULL is 255. The null value specification for a group of bit fields that share the same byte or word is generated as one contiguous block having an SPI-NULL value of 255 following the version number.
  • Page 208 SPI Tokens TOKEN-MAP Statement If a bit filler or group of contiguous bit fillers is less than a byte long and is contained within one of the two bytes of a word, the filler or group of fillers assumes the same version number as all other bit fields in the containing byte. If a bit filler or group of contiguous bit fillers is a byte long or longer and fills either the upper or lower byte of a word, the filler or group of fillers is a NOVERSION field.
  • Page 209 When you define a token map, do not prefix the map-name with the letter Z; this ensures that your token-map name will not be the same as a current or future name supplied by HP. Data Definition Language (DDL) Reference Manual—426798-002...
  • Page 210 SPI Tokens TOKEN-MAP Statement SPI does provide a standard token type for all token maps. The standard token type for token maps is ZSPI-TYP-MAP, which consists of the standard token data type ZSPI-TDT-MAP and a token length of 255. Note that you never refer to these definitions when you define a token map.
  • Page 211: Cobol Source Code

    SPI Tokens TOKEN-MAP Statement COBOL source code: 01 JOBINFO-MAP. Token type XSPI-TYPE-MAP 02 FILLER NATIVE-2 VALUE 2303. Token number 02 FILLER NATIVE-2 VALUE 3. Token byte length 02 FILLER NATIVE-2 VALUE 12. 02 FILLER NATIVE-2 VALUE 12. Version “C00” 02 FILLER NATIVE-2 VALUE 02 FILLER NATIVE-2 VALUE 17152. 02 FILLER NATIVE-2 VALUE 1024.
  • Page 212 SPI Tokens TOKEN-MAP Statement NOVERSION FOR jobclass. VERSION "C10" FOR jobusername. The preceding example assumes that every possible value of the integer field JOBCLASS is legitimate so that an SPI null value cannot be used to indicate its presence or absence. In this case, the Boolean JOBCLASS-IS-PRESENT field indicates whether there is a JOBCLASS value.
  • Page 213 SPI Tokens TOKEN-MAP Statement 02 bits-3 Type BIT 3. 02 FILLER Type BIT 10. 02 bits-2 Type BIT 2. 02 bits-5 Type BIT 5. 02 FILLER Type BIT 4. 02 bits-4 Type BIT 4. 02 bits-7 Type BIT 7. END. TOKEN-MAP bit-map-ex-c VALUE 111 DEF bit-ddl-ex-c.
  • Page 214: Table 7-2. Structure Of A Bit Map

    SPI Tokens TOKEN-MAP Statement BIT_FILLER END; ?SECTION BIT^MAP^EX^A DEFINE BIT^MAP^EX^A = [2303,1,4,17152,511,1,17162,511,1, 17172,767 ]#; LITERAL BIT^MAP^EX^A^WLN = 11; ?SECTION BIT^DDL^EX^C STRUCT BIT^DDL^EX^C^DEF (*); BEGIN STRUCT CHAR^3; BEGIN STRING BYTE [0:2]; END; FILLER UNSIGNED(8) BITS^8; UNSIGNED(3) BITS^3; BIT_FILLER BIT_FILLER UNSIGNED(2) BITS^2; BIT_FILLER UNSIGNED(5) BITS^5;...
  • Page 215 SPI Tokens TOKEN-MAP Statement Table 7-2. Structure of a Bit Map Value in Word Byte 1 Byte 2 Meaning of Value New version specification follows NOVERSION Null value for bit FILLER New version specification follows 17162 Version C10 Null value for bits-2 New version specification follows 17172 Version C20...
  • Page 216 SPI Tokens TOKEN-MAP Statement VERSION "C10" FOR z-3 THRU z-4. END. *** ERROR *** Inconsistent VERSION within byte - Z-2 In the next example, the field bits-2 cannot have a version number because DDL would put bits-2 in the same byte as bits-3, for which NOVERSION is specified: DEF bit-ddl-ex-b.
  • Page 217: Dictionary Manipulation Statements

    Dictionary Manipulation Statements The statements described in this section are used to manipulate objects in a DDL dictionary. You use the DDL statements listed in Table 8-1 to perform operations on an open DDL dictionary. Table 8-1. Dictionary Manipulation Statements Statement Function DELETE...
  • Page 218 Dictionary Manipulation Statements DELETE Statement record-name is a DDL name that uniquely identifies an existing record in an open DDL dictionary. You can specify up to 50 records. token-name is a DDL name that uniquely identifies an existing token code in an open DDL dictionary.
  • Page 219 Dictionary Manipulation Statements DELETE Statement references, in which, for example, object B refers to object A and object C refers to object A by referring to object B. DELETE Statement Examples The following example shows how to delete a record interactively: 03>...
  • Page 220: Exit Statement

    Dictionary Manipulation Statements EXIT Statement EXIT Statement The EXIT statement terminates a DDL session. EXIT [ . ] EXIT Statement Guidelines The following points are guidelines for using the EXIT statement: When you run DDL in interactive mode, an EXIT statement terminates DDL and returns you to the command interpreter.
  • Page 221: Output Statement

    Dictionary Manipulation Statements OUTPUT Statement OUTPUT Statement The OUTPUT statement reads existing objects from an open DDL dictionary and writes them to any open DDL, FUP, REPORT, or host-language source-code files. { CONSTANT { constant-name ... } } { DEF[INITION] { def-name ... } {RECORD { record-name ...
  • Page 222 Dictionary Manipulation Statements OUTPUT Statement is a wild-card symbol. Depending on the OUTPUT statement format, the asterisk directs DDL to write all the objects of a specified type in the currently open dictionary or to write all the objects of all types. OUTPUT Statement Guidelines The following points are guidelines for using the OUTPUT statement: OUTPUT is used to write DDL objects from an open DDL dictionary to any open...
  • Page 223 Dictionary Manipulation Statements OUTPUT Statement If you have changed your dictionary and want to make sure your source files correspond exactly to the changed dictionary, you can use an OUTPUT * statement: 15> DDL Run DDL compiler !?DICT Open dictionary !?DDL ddlsrc ! Open and clear DDL source file !OUTPUT * .
  • Page 224: Output Update Statement

    Dictionary Manipulation Statements OUTPUT UPDATE Statement OUTPUT UPDATE Statement The OUTPUT UPDATE statement produces DDL source code that you can use to modify or delete a referenced object in an open dictionary. { CONSTANT constant-name ... OUTPUT UPDATE { [ DEF[INITION] ] def-name ... } { TOKEN-TYPE type-name ...
  • Page 225 Dictionary Manipulation Statements OUTPUT UPDATE Statement The DDL compiler generates the following sections of source code for each object specified in the OUTPUT UPDATE statement: First section DELETE statements to delete any objects that directly or indirectly refer to the specified object.
  • Page 226 Dictionary Manipulation Statements OUTPUT UPDATE Statement The resulting source code from MYFILE follows: ?Section ZIP-CD-DELETES First section deletes all Delete Record SUPPLIER. objects that refer to ZIP- Delete Record CUSTOMER. Delete Definition SUPPINFO. Delete Definition CUSTINFO. Delete Definition ADDR. Second section defines ?Section ZIP-CD new ZIP-CD with new Definition ZIP-CD PIC "9(9)".
  • Page 227: Show Use Of Statement

    Dictionary Manipulation Statements SHOW USE OF Statement The following example shows DDL commands and statements that delete the constant MDY-DATE-DISPLAY and all the objects that refer to that constant: 25> DDL DICT !?DDL ddlout ! !OUTPUT UPDATE CONSTANT mdy-date-display. !?NODDL !?SOURCE ddlout (mdy-date-display-deletes) This command executes DELETE statements generated by OUTPUT UPDATE...
  • Page 228 Dictionary Manipulation Statements SHOW USE OF Statement If you want to modify or delete a referenced object, you can use the SHOW USE OF statement to list all references to the object you plan to modify or delete. Generally, however, you should use OUTPUT UPDATE to make such changes. SHOW USE OF generates a listing that shows which objects use the specified objects.
  • Page 229 Dictionary Manipulation Statements SHOW USE OF Statement The following diagram illustrates the nesting levels for ZIP-CD: ZIP-CD ADDR CUSTINFO SUPPINFO CUSTOMER SUPPLIER VST811.vsd To illustrate sequence in a SHOW USE OF listing, the following statement displays the objects that refer to the definitions CUSTNUM and NAME. For the definitions of CUSTNUM, NAME, and the objects that refer to them, see the sample schema in Appendix B, Sample Schemas.
  • Page 230 Dictionary Manipulation Statements SHOW USE OF Statement Data Definition Language (DDL) Reference Manual—426798-002 8- 14...
  • Page 231: Ddl Compiler Commands

    DDL Compiler Commands Compiler commands provide information to the DDL compiler and select compilation features. You can use compiler commands to: Control the production of the data dictionary from a schema Control what source to compile and how many compilation errors to allow Control output of source code to DDL, REPORT, FUP, and host language source files Control the appearance and destination of the source listing and the schema report...
  • Page 232: Table 9-1. Ddl Compiler Commands

    DDL Compiler Commands Table 9-1. DDL Compiler Commands (page 2 of 6) General Function Command Function Compilation COLUMNS Specifies how many character positions Control on input lines are significant for DDL input (S). COMMENTS Includes (or suppresses) comments in NOCOMMENTS the open dictionary (S).
  • Page 233 DDL Compiler Commands Table 9-1. DDL Compiler Commands (page 3 of 6) General Function Command Function Source COBOL Opens (or closes) a COBOL source- Output NOCOBOL code file (A); causes subsequent DDL (continued) object definitions to be written to an open COBOL source-code file (S).
  • Page 234 DDL Compiler Commands Table 9-1. DDL Compiler Commands (page 4 of 6) General Function Command Function Source FORTRANUNDERSCORE Replaces hyphens in DDL names with Output NOFORTRANUNDERSCORE underscores in FORTRAN names (or (continued) deletes the hyphens). Opens (or closes) a FUP file-creation NOFUP source file (A);...
  • Page 235 DDL Compiler Commands Table 9-1. DDL Compiler Commands (page 5 of 6) General Function Command Function Source TALALLOCATE Causes (or suppresses) memory Output NOTALALLOCATE allocation in pTAL or TAL for single-field (continued) definitions (S). TALBOUND Sets array bounds for pTAL or TAL source-code output (S).
  • Page 236: Ansicobol Command

    DDL Compiler Commands ANSICOBOL Command Table 9-1. DDL Compiler Commands (page 6 of 6) General Function Command Function Other HELP Lists a brief description of any or all commands compiler commands (A). (continued) RESET Stops compiling the current statement (A). TEDIT Suspends compiler execution and starts a PS Text Edit process (A).
  • Page 237: C Command

    DDL Compiler Commands C Command This definition is written to COBSRC as follows: * SCHEMA PRODUCED DATE - TIME : 9/14/2004 - 18:22:07 ?SECTION NAME,ANSI * Definition NAME created on 09/14/2004 at 18:22 01 NAME. 02 LAST-NAME PIC X(12). 02 FIRST-NAME PIC X(8).
  • Page 238 DDL Compiler Commands C Command Write the C source statements to the C source file. { C [ c-source-file [ ! ] ] | NOC } opens the specified C source file, translates all subsequent DDL objects defined by statements or specified in OUTPUT statements into C source statements, and writes the source statements to the open C source file.
  • Page 239 DDL Compiler Commands C Command With the exception of the TOKEN-MAP statement, DDL does not generate C data definitions that allocate space. Instead, DDL generates C typedefs for scalar types and structure templates for multiple-element DDL records. DDL replaces any hyphen in a DDL name with an underscore (_) before writing the name to the C source file.
  • Page 240 DDL Compiler Commands C Command the source code to the open C file, $DATA.SALES.CSRC. For the definition of the CUSTOMER record and the objects it refers to, see Appendix B, Sample Schemas. 27> DDL !?DICT !?C $data.sales.csrc !OUTPUT CONSTANT custnum-heading. !OUTPUT DEF custnum zip-cd name addr custinfo.
  • Page 241: C00Calign Command

    DDL Compiler Commands C00CALIGN Command C00CALIGN Command The C00CALIGN command specifies the alignment rules to be used when the DDL compiler generates C code. [ NO ] C00CALIGN C00CALIGN directs DDL to employ the C00 alignment rules used by C. C00CALIGN is the default.
  • Page 242 DDL Compiler Commands CCHECK Command NOCCHECK terminates the CCHECK checking. If a C source file is not open, NOCCHECK is the default. CCHECK Command Guidelines The following points are guidelines for using the CCHECK command: If a C source file is open, the compiler performs the C checks whether or not CCHECK is set.
  • Page 243: Cdefineupper Command

    DDL Compiler Commands CDEFINEUPPER Command DDL orderdate ?NOCCHECK When CCHECK is in effect, DDL issues the following message for each DDL object that passes the syntax check: C CHECK completed for name In the message, name is the name of the object checked by CCHECK. CDEFINEUPPER Command The CDEFINEUPPER command instructs the DDL compiler to generate C #define names in uppercase letters.
  • Page 244 DDL Compiler Commands CFIELDALIGN_MATCHED2 Command CFIELDALIGN_MATCHED2 Command Guidelines The following points are guidelines when using the CFIELDALIGN_MATCHED2 command: The CFIELDALIGN_MATCHED2 command allows members of a structure to be assigned a byte or word address consecutively. If the remaining byte in a two-byte word is not large enough for the next member, then DDL assigns the next word aligned address.
  • Page 245 DDL Compiler Commands CFIELDALIGN_MATCHED2 Command To suppress the #pragma fieldalign matched2 statements, set the NOCPRAGMA command. When compiling a definition or record with matched2 alignment, all referenced definitions must have been compiled with matched2 alignment; otherwise, DDL returns an error. For more information about alignment rules, see Appendix H, DDL Alignment Rules.
  • Page 246 DDL Compiler Commands CFIELDALIGN_MATCHED2 Command c[0] c[1] c[2] filler filler With CFIELDALIGN_MATCHED2 set, members of the substructure can start on odd byte boundaries: c[0] c[1] c[2] filler Data Definition Language (DDL) Reference Manual—426798-002 9- 16...
  • Page 247: Cifdef, Cifndef, And Cendif Commands

    DDL Compiler Commands CIFDEF, CIFNDEF, and CENDIF Commands CIFDEF, CIFNDEF, and CENDIF Commands This subsection describes these three commands as a group. CIFDEF Command The CIFDEF command generates a #ifdef compiler directive for a C source file. It instructs the DDL compiler to generate the #ifdef compiler directive in an opened C output file.
  • Page 248: Cifdef, Cifndef, Cendif Command Example

    DDL Compiler Commands CIFDEF, CIFNDEF, CENDIF Command Example CIFDEF, CIFNDEF, CENDIF Command Example The following example shows the use of the CIFNDEF, CIFDEF and CENDIF compiler commands. 10> DDL !?C CSRC !?CIFNDEF EMP !CONSTANT EMP VALUE "JYOTI". !?CIFDEF !CONSTANT EMP VALUE "RAM". !?NOC !?C CSRC Output source for C is opened on $ADE101.BUG.CSRC...
  • Page 249: Clistin Command

    DDL Compiler Commands CLISTIN Command CLISTIN Command The CLISTIN command instructs the DDL compiler to list (or suppress) dictionary comments specified by the user on the compiler listing. [ NO ] CLISTIN CLISTIN lists all subsequent dictionary comments specified by the user on the compiler listing.
  • Page 250: Clistout Command

    DDL Compiler Commands CLISTOUT Command The DDL compiler listing for this source is: *Comment for AA DEF aa PIC X(24). Production comment Definition AA size is 24 bytes. ?NOCLISTIN DEF bb PIC X(10). Definition BB size is 10 bytes. ?CLISTIN *Comment for CC DEF cc PIC 9(6).
  • Page 251 DDL Compiler Commands CLISTOUT Command CLISTOUTDETAIL causes DDL to reproduce any comments previously associated with a referenced definition. If a definition or record refers to a definition that has a comment and CLISTOUTDETAIL is in effect, DDL reproduces the comment in the source code just before the referenced definition.
  • Page 252: Cobcheck Command

    DDL Compiler Commands COBCHECK Command COBCHECK Command The COBCHECK command causes the DDL compiler to: Perform COBOL syntax checks as though the compiler were going to produce COBOL source code, but without actually generating the code. List messages describing any error or warning conditions discovered during syntax checking.
  • Page 253 DDL Compiler Commands COBCHECK Command TYPE COMPLEX TYPE LOGICAL A TYPE BINARY 64 declaration cannot specify a scale factor of -18 (or less); the range is restricted to -17 to 18. A data item must not have the same name as a group or record that could be used to qualify the data item.
  • Page 254: Coblevel Command

    DDL Compiler Commands COBLEVEL Command COBLEVEL Command The COBLEVEL command enables you to specify explicit level numbering for COBOL source output. COBLEVEL [ base [ , increment ] ] COBLEVEL specifies level numbering for COBOL source output. base is the starting level number. The default base value is 1. increment is the number of levels to be skipped.
  • Page 255: Cobol Command

    DDL Compiler Commands COBOL Command COBOL Command The COBOL command instructs the DDL compiler to: Create and open a COBOL source file or open an existing COBOL source file. Translate any subsequent statements that define DDL objects in the source schema into COBOL source statements.
  • Page 256 DDL Compiler Commands COBOL Command Only one COBOL source file can be open at a time. If you use the COBOL command when you already have a COBOL source file open, DDL closes the current source file before opening the new source file. The specified COBOL source file can be an EDIT file, an unstructured file, or a sequential device such as a terminal, a spooler, or a process.
  • Page 257: Columns Command

    DDL Compiler Commands COLUMNS Command In the next example, the DDL compiler retrieves the record, CUSTOMER, from the open dictionary, translates it into COBOL source code, and appends the source code to the open COBOL file: Run DDL compiler 28> DDL !?DICT $data.sales Open dictionary !?COBOL $data.sales.cobsrc...
  • Page 258: Comments Command

    DDL Compiler Commands COMMENTS Command COMMENTS Command The COMMENTS command directs the DDL compiler to store dictionary comments specified by the user in an open dictionary [ NO ] COMMENTS COMMENTS stores any subsequent dictionary comments specified by the user in an open dictionary.
  • Page 259 DDL Compiler Commands COMMENTS Command * Last name, First name, Middle initial DEF name. * Last name 02 last-name PIC X(12). * First name 02 first-name PIC X(8). * Middle initial 02 midinit PIC X(2). DEF custname TYPE name. The comment is in the file COBSRC, preceding NAME and CUSTNAME: * An expanded name in the following sequence: * Last name, First name, Middle initial 01 NAME.
  • Page 260: Cpragma Command

    DDL to another system whose C compiler does not support #pragmas. Caution. The memory layout of another machine to which you port C code might be different from the layout on a HP NonStop system. [ NO ] CPRAGMA CPRAGMA turns on #pragma generation for C output.
  • Page 261: Ctokenmap_Asdefine Command

    DDL Compiler Commands CTOKENMAP_ASDEFINE Command CTOKENMAP_ASDEFINE Command The CTOKENMAP_ASDEFINE compiler command controls whether the DDL compiler generates the C output of a TOKEN-MAP as a #define or as a static int array. [ NO ] CTOKENMAP_ASDEFINE CTOKENMAP_ASDEFINE directs the DDL compiler to generate the C output of a TOKEN-MAP as a #define.
  • Page 262 DDL Compiler Commands CTOKENMAP_ASDEFINE Command F1 PIC XX. !END. Definition EMP size is 2 bytes. Definition EMP added to dictionary. #pragma section emp /* Definition EMP created on 08/02/2000 at 15:03 */ #pragma fieldalign shared2 __emp typedef struct __emp char f1[2];...
  • Page 263 DDL Compiler Commands CTOKENMAP_ASDEFINE Command } emp_def; #define emp_def_Size 0 C output produced for EMP. Loading Token-Map MAP1 #pragma section map1 /* Token Map MAP1 created on 08/02/2000 at 15:03 */ #define MAP1 { 2303, 1, 2, 17152, 767 } C output produced for MAP1.
  • Page 264: Cundef Command

    DDL Compiler Commands CUNDEF Command !?NOCTOKENMAP_ASDEFINE !OUTPUT *. Loading Definition EMP #pragma section emp /* Definition EMP created on 08/02/2000 at 15:03 */ #pragma fieldalign shared2 __emp typedef struct __emp char f1[2]; } emp_def; #define emp_def_Size 0 C output produced for EMP. Loading Token-Map MAP1 #pragma section map1 /* Token Map MAP1 created on 08/02/2000 at 15:03 */...
  • Page 265: C_Decimal Command

    DDL Compiler Commands C_DECIMAL Command It is the user's responsibility to use proper identifiers along with the CUNDEF command. CUNDEF Command Example The following example shows the use of the CUNDEF compiler command: 11> DDL !?C CSRC !CONSTANT EMP VALUE "JYOTI". !?CIFDEF !?CUNDEF !?CENDIF...
  • Page 266 DDL Compiler Commands C_DECIMAL Command NOC_DECIMAL directs the DDL compiler to generate C output as type char for simple numeric items. The NOC_DECIMAL compiler command is used to nullify the effects of the C_DECIMAL compiler command if that command is already in effect. The NOC_DECIMAL command is the default form of the command.
  • Page 267 DDL Compiler Commands C_DECIMAL Command !OUTPUT *. Loading Definition EMP #pragma section emp /* Definition EMP created on 03/06/2000 at 17:13 */ #pragma fieldalign shared2 __emp typedef struct __emp char item1[5]; char item2[6]; } emp_def; C output produced for EMP. !?C_DECIMAL !OUTPUT *.
  • Page 268: C_Match_Historic_Tal Command

    DDL Compiler Commands C_MATCH_HISTORIC_TAL Command /* Definition EMP1 created on 03/06/2000 at 17:24 */ #pragma fieldalign shared2 __emp1 typedef struct __emp1 decimal item1[5]; unsigned long item2; } emp1_def; C output produced for EMP1. C_MATCH_HISTORIC_TAL Command The C_MATCH_HISTORIC_TAL command causes DDL to generate C source code that corresponds to the TAL and COBOL source generated.
  • Page 269 DDL Compiler Commands C_MATCH_HISTORIC_TAL Command DDL word-aligns substructures declared by template with a typedef or structure tag. DDL adds a filler if needed to word-align a referenced definition. DDL word-aligns substructures that refer to other group definitions to make their length even.
  • Page 270: Do_Ptal_On Command

    DDL Compiler Commands DO_PTAL_ON Command char filler_0; } a_def; #pragma section e /* Definition E created on 10/13/1995 at 13:23 */ typedef char e_def; #pragma section f /* Definition F created on 10/13/1995 at 13:23 */ #pragma fieldalign shared8 __f typedef struct __f short struct...
  • Page 271 DDL Compiler Commands DO_PTAL_ON Command DO_PTAL_ON Command Examples The following examples use the same DDL definition to illustrate the difference between DO_PTAL_ON and DO_PTAL_OFF. The common DDL definition is: DEF FIRST 02 FLD1 PIC X. 02 SUB. 03 FLD2 PIC X. END.
  • Page 272: Ddl Command

    DDL Compiler Commands DDL Command DDL Command The DDL command instructs the DDL compiler to: Create and open a DDL source file or open an existing DDL output source file. Translate any subsequent DDL object definitions in the source schema into DDL source statements.
  • Page 273 DDL Compiler Commands DDL Command The specified DDL source file must be an EDIT file, an unstructured file, or a sequential device such as a terminal, a spooler, or a process. If the file exists but is not one of these types, DDL issues an error message and does not open the file. Each DDL object translated into DDL source is written to the source file in a separate section that has the same name as the DDL structure it contains.
  • Page 274: Deflist Command

    DDL Compiler Commands DEFLIST Command 02 ZIP-CODE Pic "9(5)". ?Section CUSTNUM Definition CUSTNUM Pic "X(4)". ?Section CUSTOMER Record CUSTOMER. File is "CUSTOMER" Key-sequenced. 02 CUSTNUM Type *. 02 CUSTNAME Type NAME. 02 CUSTADDR Type ADDR. Key is CUSTNUM Duplicates not allowed. Key "CN"...
  • Page 275 DDL Compiler Commands DEFLIST Command The DEFLIST description appears in either of the following formats: level-number field-name (offset:length) [min:max] level-number field-name (offset:length) depending on whether a minimum and maximum (or total) number of occurrences have been defined. The variables in these formats represent the following values: Variable Value level-number...
  • Page 276 DDL Compiler Commands DEFLIST Command The command DEFLIST causes DDL to show the offsets of each item in VARIABLE- TABLE: DEFLIST OUTPUT DEF variable-table Loading Definition VARIABLE-TABLE Table starts at byte 0 with a maximum Including 01 VARIABLE-TABLE (0:402) length of 402 bytes Including 02 TABLE-SIZE (0:2) Element starts at byte 0 and has a length of 2 bytes...
  • Page 277: Dict Command

    DDL Compiler Commands DICT Command DICT Command The DICT command instructs the DDL compiler to do the following: Create and open an audited dictionary on a specified subvolume or open an existing dictionary on a specified subvolume. Enter all subsequent DDL object definitions into the open dictionary. Note.
  • Page 278 DDL Compiler Commands DICT Command able to use the purge option; otherwise, DDL does not execute the DICT! command.) If there is no dictionary in the specified subvolume, DDL ignores the exclamation point. NODICT directs the DDL compiler to close the currently open dictionary. NODICT is the default setting.
  • Page 279: Dictn Command

    DDL Compiler Commands DICTN Command If an existing dictionary that you open with the DICT command is nonaudited, DDL issues a warning message. DICT Command Examples To open a dictionary on the volume $DATA and subvolume SALES, enter: ?DICT $data.sales If there is no dictionary on $DATA.SALES, DDL creates and then opens the dictionary.
  • Page 280 DDL Compiler Commands DICTN Command dict-subvol-name identifies the dictionary subvolume; dict-subvol-name is a subvolume name in this form: [\node-name.][$volume-name.][subvolume-name] If dict-subvol-name is omitted, DDL uses the current system and the current volume and subvolume. If node-name is omitted, DDL uses the current system; if volume-name is omitted, DDL uses the current volume;...
  • Page 281: Dictr Command

    DDL Compiler Commands DICTR Command If a dictionary already exists on the specified subvolume, DDL opens the dictionary for update access. More than one user can open the dictionary for concurrent update access. If a dictionary already exists, you can do either of the following: Purge the dictionary and re-create it by specifying an exclamation point after the subvolume name.
  • Page 282: Edit Command

    DDL Compiler Commands EDIT Command dict-subvol-name is a dictionary subvolume name in this form: [\node-name.][$volume-name.][subvolume-name] If dict-subvol-name is omitted, DDL uses the current system, volume, and subvolume. If node-name is omitted, DDL uses the current system; if volume- name is omitted, the current volume; and if subvolume-name is omitted, the current subvolume.
  • Page 283 DDL Compiler Commands EDIT Command edit-parameter is any valid EDIT command. You can enter multiple commands, separated by semicolons. After opening the EDIT file, EDIT executes any subsequent commands until it closes the file. EDIT Command Guidelines The following points are guidelines for using the EDIT command: Issuing the EDIT command within DDL is like issuing the EDIT command from the command interpreter.
  • Page 284: Errors Command

    DDL Compiler Commands ERRORS Command EDIT Command Example The following example illustrates using EDIT to change a source file interactively. The example also illustrates how DDL handles a default EDIT-file name and EDIT parameter. 33> DDL DICT !?DDL ddlfil Open DDLFIL !RECORD sum.
  • Page 285 DDL Compiler Commands ERRORS Command If ERRORS is specified but max-errors is omitted, DDL stops compilation after the first error; thus, ERRORS is the same as ERRORS 1. When compilation terminates because the specified number of errors is reached, DDL closes an open dictionary and any open files, issues session statistics, and terminates.
  • Page 286: Expandc Command

    DDL Compiler Commands EXPANDC Command EXPANDC Command The EXPANDC command enables inline expansion of C language output { EXPANDC | NOEXPANDC } EXPANDC directs the DDL compiler to output a referenced type definition inline instead of as a structure name. NOEXPANDC directs the DDL compiler to output a referenced type definition as a structure name.
  • Page 287 DDL Compiler Commands EXPANDC Command def c type a. typedef a_def c_def; typedef char c_def[10]; #pragma fieldalign shared2 def d type b. typedef b_def d_def; typedef struct __d short b1; char b2[10]; struct short b31; char b32[10]; } b3[5]; } d_def; def e.
  • Page 288: Fieldalign_Shared8 Command

    DDL Compiler Commands FIELDALIGN_SHARED8 Command FIELDALIGN_SHARED8 Command The FIELDALIGN_SHARED8 command directs DDL to store data structures in the dictionary with shared8 alignment. DDL inserts explicit fillers to ensure proper alignment. FIELDALIGN_SHARED8 FIELDALIGN_SHARED8 Command Guidelines The following points are guidelines for using the FIELDALIGN_SHARED8 command: Use the FIELDALIGN_SHARED8 command to generate TAL (pTAL) or C source code that will produce optimal performance on a RISC processor.
  • Page 289: Filler Command

    DDL Compiler Commands FILLER Command typedef struct __a char char char char filler_0; } a_def; #pragma section e /* Definition E created on 10/13/1995 at 13:23 */ typedef char e_def; #pragma section f /* Definition F created on 10/13/1995 at 13:23 */ #pragma fieldalign shared8 __f typedef struct __f short...
  • Page 290 DDL Compiler Commands FILLER Command The DDL compiler compiles source code in several phases. In each phase DDL evaluates records and definitions to see if filler bytes are necessary to make sure the next field or group starts on a word boundary. Where filler bytes are necessary, the DDL compiler inserts FILLER fields according to the specified algorithm.
  • Page 291 DDL Compiler Commands FILLER Command If the group referred to does not start on a word boundary but is described with a REDEFINES clause, DDL inserts a filler byte before the group being redefined. FILLER Command Example The filler algorithm you select affects the structure of the source code; for example, consider the following DEFINITION statements: DEF test1.
  • Page 292: Forcheck Command

    DDL Compiler Commands FORCHECK Command When FILLER 1 is specified, the structure of TEST1 is the same in both CASE1 and CASE2. A COBOL program containing these data structures could successfully execute the following COBOL statement: MOVE TEST1 OF CASE1 to TEST1 OF CASE2. When FILLER 0 is specified, the structure of TEST1 in CASE1 differs from the structure of TEST1 in CASE2.
  • Page 293: Fortran Command

    DDL Compiler Commands FORTRAN Command The DDL compiler does not make all the lengthy syntax tests that the FORTRAN compiler makes. The DDL compiler tests the DDL statements to ensure that they do not violate the following rules of form specified by FORTRAN: An elementary field must not be larger than 255 bytes.
  • Page 294 DDL Compiler Commands FORTRAN Command FORTRAN source file. If a FORTRAN source file is already open, the command closes the current file and opens a new source file. fortran-source-file identifies the FORTRAN source file. If fortran-source-file is omitted, DDL lists the FORTRAN source statements at the home terminal. purges the contents of an existing FORTRAN source file before opening the file.
  • Page 295 DDL Compiler Commands FORTRAN Command FORTRAN does not support unsigned numbers. If you specify an unsigned number, DDL translates it to a FORTRAN signed integer. For the data types that DDL generates for FORTRAN source code, see Table C-3 on page C-6. FORTRAN does not accept FILLER fields greater than 255 single-byte characters.
  • Page 296: Fortranunderscore Command

    DDL Compiler Commands FORTRANUNDERSCORE Command The UPSHIFT clause is not recognized by FORTRAN, but is included as a comment. FORTRANUNDERSCORE Command The FORTRANUNDERSCORE command converts hyphens in DDL names into underscores in FORTRAN output. NOFORTRANUNDERSCORE discards the hyphens from FORTRAN output.[ [ NO ] FORTRANUNDERSCORE FORTRANUNDERSCORE converts hyphens in DDL names into underscores in FORTRAN output.
  • Page 297 DDL Compiler Commands FUP Command purges the contents of an existing FUP source file before opening the file. If the specified file does not exist, DDL ignores the exclamation point. NOFUP closes the currently open FUP source file and thus stops the translation of record file attributes into FUP file-creation commands.
  • Page 298 DDL Compiler Commands FUP Command FUP Command Example The following example illustrates an interactive session in which FUP source code is generated from a record in the dictionary. 34> DDL DICT Run DDL and open dictionary Open FUPSRC; if file exists, purge existing data !?FUP fupsrc ! Get record from dictionary, write FUP file- !OUTPUT RECORD customer.
  • Page 299: Help Command

    DDL Compiler Commands HELP Command HELP Command The HELP command lists a brief description of any specified command or of all commands. HELP [ command ] command is the name or partial name of a DDL compiler command. If command is omitted, DDL lists a brief description of all the DDL compiler commands.
  • Page 300: List Command

    DDL Compiler Commands LIST Command LINECOUNT Command Examples This example sets the number of lines per page for the compiler listing pages to 60 lines: 37> DDL/IN myschema,OUT $S.#printer/LINECOUNT 60 The next example sets the number of lines per page for a schema report to 24: 38>...
  • Page 301: Nclconstant Command

    DDL Compiler Commands NCLCONSTANT Command LIST Command Example The following example shows placement of LIST and NOLIST commands in the source file to control listing of source lines: *beginning of source file List source lines by default ?NOLIST Starting with this command, stop listing source lines ?LIST Resume listing source...
  • Page 302 DDL Compiler Commands NCLCONSTANT Command NCLCONSTANT Command Guidelines The following points are guidelines for using the NCLCONSTANT command: When NCLCONSTANT is in effect, DDL translates only DDL Constant objects. DDL record, definition, token type, token code, and token map objects are not translated.
  • Page 303: Newfup_Fileformat Command

    DDL Compiler Commands NEWFUP_FILEFORMAT Command definition def-1. 02 a pic x(10). end. constant val-4 value 4. ?NONCLCONSTANT constant val-5 value 5. constant val-6 value 6. ?NCLCONSTANT $vol.subvol.myncl constant val-7 value 7. constant val-8 value 8. constant large-val value 32768 type binary 32. DDL stores the NCL source code for the preceding example in $vol.subvol.myncl as follows: /* SCHEMA PRODUCED DATE - TIME :12/01/1992 10:43:29 */...
  • Page 304 DDL Compiler Commands NEWFUP_FILEFORMAT Command command) and stores the records in the dictionary, then the user must use the same commands while requesting FUP output of those records. The format specification for both alternate key and main file is the same (file format 2 in this case).
  • Page 305 DDL Compiler Commands NEWFUP_FILEFORMAT Command Definition EMP size is 30 bytes. Definition EMP added to dictionary. !?FUP < SCHEMA PRODUCED DATE - TIME : 3/02/2000 17:59:53 Output source for FUP is opened on $ZTNT.#PTVWAT5 !RECORD EMPL. !FILE IS EMPLOYEE. !DEF IS EMP. !KEY IS EMPL.EMP-ID.
  • Page 306: Nofileformat Command

    DDL Compiler Commands NOFILEFORMAT Command NOFILEFORMAT Command The NOFILEFORMAT command specifies no file format in FUP source files. It: Suppresses specification of any file format in FUP source files. Nullifies the effect of the OLDFUP_FILEFORMAT or NEWFUP_FILE FORMAT command if either of those commands is already in use. NOFILEFORMAT NOFILEFORMAT Command Guidelines The following points are guidelines for using the NOFILEFORMAT command:...
  • Page 307 DDL Compiler Commands NOFILEFORMAT Command !END. !?FUP !RECORD EMPL. !FILE IS "EMPLOYEE". !DEF EMP. !KEY EMPL.EMP-ID. !KEY "MN" IS EMPL.EMP-NAME. !END. !?DICT Dictionary opened on subvol $ADE101.MANUAL for update access. !DEF EMP. EMP-NAME PIC X(20). EMP-ID PIC 9(4) COMP. EMP-SALARY PIC 9(6)V9(2). !END.
  • Page 308: Oldfup_Fileformat Command

    DDL Compiler Commands OLDFUP_FILEFORMAT Command CREATE EMPLOYE0 FUP output produced for EMPL. OLDFUP_FILEFORMAT Command The OLDFUP_FILEFORMAT command specifies file format 1 in all FUP source files. The OLDFUP_FILEFORMAT command instructs the DDL compiler to: Specify file format 1 in all FUP source files. Specify file format 1 in all FUP alternate key files.
  • Page 309 DDL Compiler Commands OLDFUP_FILEFORMAT Command ?OLDFUP_FILEFORMAT DEF EMP. EMP-NAME PIC X(20). EMP-ID PIC 9(4) COMP. EMP-SALARY PIC 9(6)V9(2). END. ?FUP RECORD EMPL. FILE IS "EMPLOYEE". EMP. EMPL.EMP-ID. KEY "MN" IS EMPL.EMP-NAME. END. ?DICT! Audited dictionary created on subvol $ADE101.MANUAL. Dictionary opened on subvol $ADE101.MANUAL for update access. DEF EMP.
  • Page 310: Out Command

    DDL Compiler Commands OUT Command CREATE EMPLOYEE RESET SET FORMAT 1 SET TYPE K SET KEYLEN 16 SET REC 16 SET BLOCK 4096 SET IBLOCK 4096 SET EXT( 4, 32 ) SET MAXEXTENTS 100 CREATE EMPLOYE0 OUT Command The OUT command instructs the DDL compiler to list source lines on a listing destination different from the one specified in the DDL run command.
  • Page 311: Output_Sensitive Command

    DDL Compiler Commands OUTPUT_SENSITIVE Command OUT Command Example The following example shows placement of OUT commands in the source file to control printing of source lines and messages: *beginning of source file List source lines on listing destination from the DDL run command ?OUT $S.#printer List source lines and error messages on $S.#printer;...
  • Page 312 DDL Compiler Commands OUTPUT_SENSITIVE Command In order to get case-sensitive output for a particular definition, record, or constant, the OUTPUT_SENSITIVE compiler command should be used before adding that definition, record, or constant to the dictionary. If a definition, record, or constant is defined using the OUTPUT_SENSITIVE (or NOOUTPUT_SENSITIVE) compiler command, then the user must use the same definition while requesting output for that definition, record, or constant.
  • Page 313 DDL Compiler Commands OUTPUT_SENSITIVE Command STRUCT CUTNAME; BEGIN STRING BYTE [1:10]; END; STRUCT CDT^ID; BEGIN STRING BYTE [1:6]; END; END; TAL output produced for KISHOY. !?OUTPUT_SENSITIVE !DEF emp. emp-NAME PIC X(10). emp-ID PIC 9(6) COMP. !END. Definition emp size is 14 bytes. Definition emp added to dictionary.
  • Page 314: Page Command

    DDL Compiler Commands PAGE Command PAGE Command The PAGE command directs the DDL compiler to list the next input line at the top of the next page. Optionally, the PAGE command can also specify a page title. PAGE [ "listing-title" ] listing-title is an ASCII character string.
  • Page 315 DDL Compiler Commands PASCAL Command PASCAL opens the specified Pascal source file, translates all subsequent DDL objects defined by statements or output from the dictionary into Pascal source statements, and writes them to the open Pascal source file. If a Pascal source file is already open, the command closes the current file and opens a new source file.
  • Page 316 DDL Compiler Commands PASCAL Command Appends _DEF to every group definition name and record name (but not to any field definition name) Appends _KEY to every primary-key name and alternate-key name As a result, the maximum length for the name of a DDL group definition, record, or key that is to be written to Pascal is 27 ASCII characters, not the standard DDL name length of 30 characters.
  • Page 317: Pascalbound Command

    DDL Compiler Commands PASCALBOUND Command CONST CUSTOMER_CUSTNAME_KEY = 25454; PASCALBOUND Command The PASCALBOUND command sets the lower bound for Pascal arrays. This value is stored in the dictionary with the field or group definition. PASCALBOUND { 0 | 1 } PASCALBOUND 0 assigns any subsequent Pascal arrays a lower bound of 0.
  • Page 318: Pascalcheck Command

    DDL Compiler Commands PASCALCHECK Command PASCALBOUND Command Example This example illustrates both PASCALBOUND settings: ?PASCAL Open Pascal source file PASCALBOUND is 1 by default ?PASCALBOUND 0 Change PASCALBOUND to 0 DEF test0 PIC X(10). ?PASCALBOUND 1 DEF test1 PIC X(10). Return to default setting VST920.vsd PASCALCHECK Command...
  • Page 319 DDL Compiler Commands PASCALCHECK Command A name cannot be longer than 31 ASCII characters. A name might become longer because DDL appends _DEF or _KEY to the end of the name of a definition, record, or key. Pascal reserved words cannot be DDL names. A Pascal named substructure that contains word data must be word aligned.
  • Page 320: Pascalnamedvariant Command

    DDL Compiler Commands PASCALNAMEDVARIANT Command PASCALNAMEDVARIANT Command The PASCALNAMEDVARIANT command generates the last DDL REDEFINES clause for Pascal as a named variant record. NOPASCALNAMEDVARIANT generates the clause as an anonymous variant record.[ [ NO ] PASCALNAMEDVARIANT PASCALNAMEDVARIANT generates the REDEFINES clause in the last element as a named variant record in Pascal output.
  • Page 321 DDL Compiler Commands REPORT Command The REPORT command produces a schema report when DDL compiles the schema; REPORT can be placed in a DDL run command or in the schema itself. Only one report file can be open at a time. If you use the REPORT command when you already have a report file open, DDL closes the current report file before opening the new report file.
  • Page 322: Reset Command

    DDL Compiler Commands RESET Command 01 NAME Group 22 02 LAST-NAME Character 12 02 FIRST-NAME Character 8 02 MIDINIT Character 2 Definition size is 22 bytes. If any object is defined by reference to another object, the name of the referenced object appears under the heading “Source Definition.”...
  • Page 323: Save Command

    DDL Compiler Commands SAVE Command SAVE Command The SAVE command instructs the DDL compiler to save (or purge) the currently open dictionary when the dictionary is closed.[ [ NO ] SAVE SAVE directs the DDL compiler to save the currently open dictionary when the dictionary is closed.
  • Page 324: Section Command

    DDL Compiler Commands SECTION Command SAVE Command Example In the following example, ERRORS 1 directs the DDL compiler to cease processing the schema when it encounters the first error. While NOSAVE is in effect, it directs the compiler to purge the dictionary when compilation terminates. The SAVE command is executed only if compilation reaches the ?SAVE line with no errors.
  • Page 325: Setlocalename Command

    DDL Compiler Commands SETLOCALENAME Command SECTION Command Example The following source file has two sections: SALES-FILES and EMPLOYEE-FILES. Note that the EMPLOYEE-FILES section is made up of two portions of the source schema separated by the SALES-FILES section. * first line of DDL source schema ?SECTION employee-files ?SECTION sales-files Sales files section...
  • Page 326: Setsection Command

    DDL Compiler Commands SETSECTION Command SETLOCALENAME Command Example The following example shows the use of the SETLOCALENAME command to generate output for text items in French. ? DICT ! ? COBOL COBSRC ! ? SETLOCALENAME no_NO.ISO8859-1 CONSTANT custnum-heading VALUE "Finnish" LN"fi_FI.ISO8859-1" "Norwegian"...
  • Page 327 DDL Compiler Commands SETSECTION Command If SETSECTION is not specified or if SETSECTION is specified without section- name, DDL precedes each DDL object in the open source-code files with a ?SECTION heading that uses the DDL object name as the section name. The SETSECTION command affects only host-language source files (except TACL source files) and DDL source files opened by the DDL command.
  • Page 328: Source Command

    DDL Compiler Commands SOURCE Command SOURCE Command The SOURCE command directs the DDL compiler to compile a DDL source-schema file or specified sections of that file. SOURCE source-name [ ( section-name [ , section-name ] ...) ] source-name identifies the source-schema file to be compiled; source-name is a file name. section-name identifies a section within the source-schema file.
  • Page 329: Spacing Command

    DDL Compiler Commands SPACING Command SOURCE Command Example In the following example, DDL opens a new DDL source file called NEWSRC. DDL first compiles all of FILE1 and writes it to NEWSRC; then compiles SECT-1 and SECT-3 of FILE2 and appends them to the contents of NEWSRC; and lastly, compiles SECT-1 and SECT-5 of FILE3 and appends them to the end of NEWSRC.
  • Page 330: Tacl Command

    DDL Compiler Commands TACL Command TACL Command The TACL command instructs the DDL compiler to: Create and open a TACL source file or open an existing TACL source file. Translate all subsequent statements that define DDL objects into TACL source statements.
  • Page 331 DDL Compiler Commands TACL Command If the TACL source file already exists and the exclamation point is omitted, DDL appends the DDL objects to the end of the file’s original contents. DDL does not replace any existing structures. The compiler can translate DDL objects specified in an OUTPUT statement only if the dictionary containing these objects is open.
  • Page 332 DDL Compiler Commands TACL Command For the definition of the CUSTOMER record, see the sample database schema in Appendix B, Sample Schemas.” ?DICT ?TACL \dallas.$data.sales.taclsrc OUTPUT RECORD customer. The TACL source code in TACLSRC follows: ?Section CUSTOMER Struct Begin STRUCT CUSTNUM;...
  • Page 333: Taclgen Command

    DDL Compiler Commands TACLGEN Command TACLGEN Command The TACLGEN command instructs the DDL compiler to use a specified TACL code generation version TACLGEN 0 TACLGEN specifies a source code generation version to use when you generate TACL code. The default is 0, which specifies the current version of TACL code. specifies that DDL generates code for the current version of TACL.
  • Page 334 DDL Compiler Commands TAL Command tal-source-file identifies the pTAL or TAL source file. If tal-source-file is omitted, DDL lists the pTAL or TAL source code at the home terminal. purges the contents of an existing pTAL or TAL source file before opening the file. If the specified file does not exist, DDL ignores the exclamation point.
  • Page 335 DDL Compiler Commands TAL Command Appends ^WLN to every SPI TOKEN-MAP name Appends ^KEY to every primary-key name and alternate-key name As a result, the maximum length for the name of a DDL group definition, record, token map, or key that is to be written to pTAL or TAL is 27 ASCII characters, not the standard DDL name length of 30 characters.
  • Page 336: Talallocate Command

    DDL Compiler Commands TALALLOCATE Command END; STRUCT ADDR; BEGIN STRUCT ADDRESS; BEGIN STRING BYTE [1:22]; END; STRUCT CITY; BEGIN STRING BYTE [1:14]; END; STRUCT STATE; BEGIN STRING BYTE [1:2]; END; STRUCT ZIP^CODE; BEGIN STRING BYTE [1:5]; END; END; END; LITERAL CUSTOMER^CUSTNUM^KEY = %000000; LITERAL CUSTOMER^CUSTNAME^KEY = %061556;...
  • Page 337: Talbound Command

    DDL Compiler Commands TALBOUND Command DEF number Pic "9(5)". STRUCT NUMBER; BEGIN STRING BYTE [1:5]; END; ?NOTALALLOCATE DEF status TYPE ENUM BEGIN. LITERAL NO^ERROR = 0, 89 no-error. READ^ERROR = 1, 89 read-error. WRITE^ERROR = 6; 89 write-error VALUE 6. DEFINE STATUS = INT #;...
  • Page 338: Talcheck Command

    DDL Compiler Commands TALCHECK Command In the array bounds, number is the number of occurrences of a field described with an OCCURS clause, or the number of characters in a field described with an alphanumeric PICTURE or a TYPE CHARACTER clause. If you specify TALBOUND 1, the array bounds are: [1:number] TALBOUND Command Example...
  • Page 339 DDL Compiler Commands TALCHECK Command NOTALCHECK terminates the TALCHECK checking. If a pTAL or TAL source file is not open, NOTALCHECK is the default. TALCHECK Command Guidelines The following points are guidelines for using the TALCHECK command: If a pTAL or TAL source file is open, the compiler performs checks whether or not TALCHECK is set.
  • Page 340: Talunderscore Command

    DDL Compiler Commands TALUNDERSCORE Command In the message, name is the name of the object checked by TALCHECK. TALUNDERSCORE Command The TALUNDERSCORE command converts hyphens in DDL names to underscores in pTAL or TAL output. NOTALUNDERSCORE converts hyphens in DDL names into circumflex characters in pTAL or TAL output.
  • Page 341 DDL Compiler Commands TEDIT Command edit-file-name identifies an EDIT file. If you omit edit-file-name, DDL uses the last edit- file-name and the last edit-parameter, if any, specified in the current DDL session. edit-parameter is any valid PS Text Edit command. You can enter multiple commands, separated by semicolons.
  • Page 342: Timestamp Command

    DDL Compiler Commands TIMESTAMP Command TEDIT Command Example The following example illustrates using TEDIT to change a source file interactively; it also illustrates how DDL handles a default EDIT-file name and PS Text Edit parameter: 48> DDL DICT Open DDLFIL !?DDL ddlfil !RECORD sum.
  • Page 343: Values Command

    DDL Compiler Commands VALUES Command TIMESTAMP Command Example The following example illustrates selective listing or suppression of the timestamp comments in a COBOL source file: ?COBOL cobsrc DEF aa PIC X(8). ?NOTIMESTAMP DEF bb PIC 9(5). • • • ?TIMESTAMP RECORD rec1.
  • Page 344 DDL Compiler Commands VALUES Command VALUES Command Guidelines The following points are guidelines for using the VALUES command: The VALUES command does not affect VALUE clauses associated with level 88 items or with CONSTANT, TOKEN-CODE, TOKEN-MAP, or TOKEN-TYPE statements. When the VALUES command is specified and DDL is generating source code for FORTRAN, the compiler translates any initial values into comments.
  • Page 345: Warn Command

    DDL Compiler Commands WARN Command WARN Command .The WARN command directs the DDL compiler to list all warning messages on the DDL compiler listing. NOWARN suppresses warning messages on the listing. [ NO ] WARN WARN writes compilation warnings to the DDL listing. WARN is the default. NOWARN suppresses warning messages on the DDL listing.
  • Page 346 DDL Compiler Commands WARNINGS Command If WARNINGS is specified but max-warnings is omitted, DDL stops compilation after the first warning; thus, WARNINGS is the same as WARNINGS 1. When compilation terminates because the specified number of warnings is exceeded, DDL closes an open dictionary and any open files, issues session statistics, and terminates.
  • Page 347: Dictionary Maintenance

    Dictionary Maintenance Dictionary maintenance includes the following functions: Generating a new (backup) source schema from an existing dictionary Adding new objects to the dictionary Deleting existing objects from the dictionary Modifying existing dictionary objects Making major modifications to an existing dictionary Changing dictionary security Moving a dictionary from one subvolume to another Purging a dictionary from a subvolume...
  • Page 348: Adding New Dictionary Objects

    Dictionary Maintenance Adding New Dictionary Objects The following example re-creates the database schema for the dictionary on $DATA.SALES and writes it to the new file SCHEMBAK: 39> DDL !?DICT $data.sales Open the dictionary !?DDL $data.sales.schembak ! Open a new source file !OUTPUT *.
  • Page 349: Deleting Dictionary Objects

    Dictionary Maintenance Deleting Dictionary Objects The following example adds a new record to the dictionary on $DATA.SALES: 40> EDIT newsrc !; ADD Specify a new record 1 RECORD dependents. 2 FILE IS $data.sales.empdep KEY- SEQUENCED 3 AUDIT. 4 02 dep-key. 5 04 empnum TYPE *.
  • Page 350: Deleting Unreferenced Objects

    Dictionary Maintenance Deleting Unreferenced Objects objects. The technique for deleting referenced objects is described later in this subsection under Deleting Referenced Objects, following. Deleting Unreferenced Objects When you delete a record, an SPI token code, or an SPI token map, you need not be concerned that the deletion affects other objects in the dictionary.
  • Page 351 Dictionary Maintenance Deleting Referenced Objects If the object you want to delete is never referenced by another object, use the technique described under Deleting Unreferenced Objects, preceding. If the object you want to delete is referred to, you must first delete the referring objects in an exact sequence.
  • Page 352 Dictionary Maintenance Deleting Referenced Objects b. Use the EDIT command to examine the DDL source file. Make a note of the name of the section that contains the DELETE statements produced by OUTPUT UPDATE; then exit from the editor. 5. Delete all the referring objects from the dictionary. Use the SOURCE command to submit the DDL source file section containing the DELETE statements for these objects to the DDL compiler.
  • Page 353: Modifying Dictionary Objects

    Dictionary Maintenance Modifying Dictionary Objects The following example of an interactive DDL session shows the DDL statements and commands needed to delete AGE; it also shows the response of the DDL compiler to each statement and command. Run DDL and open 44>...
  • Page 354: Modifying Unreferenced Objects

    Dictionary Maintenance Modifying Unreferenced Objects object is referenced by other objects, then you must first delete and then redefine the referring objects. Objects that can be referenced by other objects are constants, definitions, and SPI token types. Modifying these objects is described under Modifying Referenced Objects on page 10-9.
  • Page 355: Modifying Referenced Objects

    Dictionary Maintenance Modifying Referenced Objects the record definition, and then compile the record definition back into the dictionary with a SOURCE command; for example: 45> DDL DICT $data.sales Run DDL and open dictionary !?DDL newsrc ! Open and clear source file !OUTPUT RECORD orders.
  • Page 356 Dictionary Maintenance Modifying Referenced Objects Before you can modify a referenced object, you must first delete any objects that refer to that object. After you modify the object, you must redefine the deleted objects. The deletion and the redefinition must be done in exact sequence. For example: CONSTANT a VALUE IS 1.
  • Page 357 Dictionary Maintenance Modifying Referenced Objects DDL EDIT command; if you exit from DDL, you run the editor from the command interpreter. 6. Compile the DDL source file. If you are still in an interactive session, use the SOURCE command to submit the source file to the compiler. If you exited from DDL after Step 4, run the DDL compiler from the command interpreter specifying the DDL source file as the input file.
  • Page 358: Making Major Modifications

    Dictionary Maintenance Making Major Modifications Run DDL and open dictionary 47> DDL DICT $data.sales Dictionary opened on subvol $DATA.SALES for update access Open and clear DDL source !?DDL modfile ! Output source for DDL is opened on $DATA.SALES.MODFILE MODFILE !OUTPUT UPDATE zip-cd. Write update statements Searching for objects affected by ZIP-CD to MODFILE...
  • Page 359 Dictionary Maintenance Making Major Modifications generate a new schema exactly as described under Generating a Backup Schema page 10-1. Note. do not use the procedure for generating a new schema to modify a dictionary that is part of a Pathmaker catalog. Pathmaker dictionaries contain application design information that is not in generated DDL schemas.
  • Page 360: Changing Dictionary Security

    Dictionary Maintenance Changing Dictionary Security Changing Dictionary Security Dictionary files are created with the default file-creation security of the user who created them. If you are the owner of the files, you can change the security applied to the dictionary files by the DDL compiler with the FUP SECURE command. Follow these steps to change file security: 1.
  • Page 361: Moving A Nonaudited Dictionary

    Dictionary Maintenance Moving a Nonaudited Dictionary Moving a Nonaudited Dictionary To move a nonaudited dictionary: 1. Duplicate the dictionary files on another subvolume using FUP DUP commands. 2. Change the subvolume name of the alternate key file in the file label of each dictionary file that has alternate keys using FUP ALTER commands.
  • Page 362 Dictionary Maintenance Moving an Audited Dictionary disable auditing before using FUP DUP to duplicate files, then use FUP ALTER to reenable auditing after duplicating the files. When you use FUP ALTER to disable auditing on a file that uses alternate keys, FUP also disables auditing on the associated alternate key file.
  • Page 363 Dictionary Maintenance Moving an Audited Dictionary For example, to move an audited dictionary from $MKT.SALESDIC to $DATA.SALES, you can build and then execute a source file that contains the following commands: VOLUME $mkt.salesdic Default volume and subvolume FUP ALTER DICTCDF, NO AUDIT FUP ALTER DICTKDF, NO AUDIT Also disables auditing on DICTALT FUP ALTER DICTMAP, NO AUDIT...
  • Page 364: Purging A Dictionary

    Dictionary Maintenance Purging a Dictionary Purging a Dictionary You can purge a dictionary by purging each dictionary file individually or, if the dictionary is open, by entering the NOSAVE command following the DICT or DICTN command. To purge dictionary files individually, you must know the file names. You can see Appendix D, Dictionary Database Structure, for the file names, or you can position yourself on the subvolume that contains the dictionary and use a FILES command to...
  • Page 365: Increasing Dictionary File Size

    Dictionary Maintenance Increasing Dictionary File Size Increasing Dictionary File Size The DDL compiler creates the dictionary files with the primary and secondary extent sizes listed in Table 10-1. Table 10-1. Dictionary File Extent Sizes Dictionary File Primary Extent Secondary Extent DICTALT 4 pages 32 pages...
  • Page 366: Rebuilding A Dictionary

    Dictionary Maintenance Rebuilding a Dictionary If you are altering only one file, you can use a single FUP command to change MAXEXTENTS. The following commands increase the size of DICTOTF and verify the change: 63> FUP ALTER DICTOTF, MAXEXTENTS 200 64>...
  • Page 367: Rebuilding An Audited Dictionary

    Dictionary Maintenance Rebuilding an Audited Dictionary To illustrate these procedures, this example rebuilds a dictionary with a schema generated from a corrupted dictionary. 65> DDL !?DICT $data.sales !?DDL $data.newsales.ddlsrc !OUTPUT * !?NODDL !?DICT $data.newsales !?SOURCE $data.newsales.ddlsrc !EXIT In some cases, you cannot generate a source schema from a corrupted dictionary. To protect your dictionary from such an occurrence, you should keep a fairly current backup schema of any important dictionary.
  • Page 368 Dictionary Maintenance Converting a Dictionary Version 5, used by C20 and C30 versions of the DDL compiler. Version 6, used by D00, D10, and D20 versions of the DDL compiler Version 7, used by D30 and later version of the DDL compiler To have full use of a dictionary created with DDL software prior to version D00 from a D-series version of DDL, follow the conversion procedures described in this subsection.
  • Page 369 Dictionary Maintenance Converting a Dictionary Alternately, you can keep a dictionary with the earlier dictionary description in one subvolume and the D-series dictionary or G-series dictionary description in another subvolume. Use the earlier dictionary for Enform reports for unconverted files and the D-series or G-series dictionary for Enform reports on D-series or G-series files.
  • Page 370 Dictionary Maintenance Converting a Dictionary Data Definition Language (DDL) Reference Manual—426798-002 10 -24...
  • Page 371: Ddl Messages

    DDL Messages This appendix lists all of the DDL error and warning messages in alphabetic order. For each message, it gives the cause, describes the action taken by the DDL compiler, and provides a recovery procedure. During DDL processing, you might receive a message from a sequential I/O procedure. Sequential I/O error messages, numbered from 500 to 600, are not documented in this manual.
  • Page 372 DDL Messages DDL Error and Warning Messages A non PACKED-DECIMAL item was specified in group - group_name Cause. The group identified by group_name is described with a USAGE IS COMP-3, COMPUTATIONAL-3, or PACKED-DECIMAL clause but contains a field with a data type that is not PACKED-DECIMAL. Effect.
  • Page 373 DDL Messages DDL Error and Warning Messages Recovery. Qualify the referenced field, or rename one of the fields so that no ambiguity exists, and recompile the object. ***ERROR*** Attribute already specified- attribute Cause. A definition attribute clause is specified more than once for the same field, or a file creation attribute is specified more than once for the same record.
  • Page 374 DDL Messages DDL Error and Warning Messages Cause. You specified a bit field as a key. Effect. DDL rejects the object. Recovery. Specify a field of a type other than bit as the key. ***ERROR*** BLOCK must be 512, 1024, 2048, or 4096 bytes Cause.
  • Page 375 DDL Messages DDL Error and Warning Messages Recovery. Change the file type to unstructured or change BUFFERSIZE to BLOCK and recompile. ***ERROR*** C DEF or RECORD or union tag name too long Cause. The name of a definition or record exceeds the limit of 31 ASCII characters that C allows for these names.
  • Page 376 ***WARNING*** CODE withing range reserved by TANDEM, 100-999 Cause. A file code in a record definition is an integer between 100 and 999, the range reserved for use by HP. Effect. DDL continues compiling the statement. Data Definition Language (DDL) Reference Manual—426798-002...
  • Page 377 DDL Messages DDL Error and Warning Messages Recovery. Change the file code to an integer from 0 to 99 or from 1,000 to 65,535 and recompile the statement. ***WARNING*** COLUMNS must be between 12 and 132- value not changed Cause. The COLUMNS command specified fewer than 12 or more than 132 columns. Effect.
  • Page 378 DDL Messages DDL Error and Warning Messages ***ERROR*** COMP item found within VALUE Cause. You have defined a computational item within a group defined with a VALUE clause. For example, the following definition is invalid: Def a. 02 b value zeros. 03 c pic 9 comp.
  • Page 379 DDL Messages DDL Error and Warning Messages *** ERROR *** COMP-3 data item must be of the form PIC [S]9(n)[V9(n)] Last diagnostic on page 1 *** WARNING *** Errors detected - no output produced for EMP Recovery. Correct the error and recompile. ***ERROR*** COMP-3 specified with reference item which is not COMP-3 - element_name Cause.
  • Page 380 DDL Messages DDL Error and Warning Messages ***ERROR*** CONSTANT in Pascal exceeds DDL’s 130-byte limit- constant-name Cause. A CONSTANT statement has a value that is greater than the 130 ASCII character limit set for DDL. Effect. DDL does not generate Pascal code for the constant or for any object that refers to the constant.
  • Page 381 DDL Messages DDL Error and Warning Messages ***ERROR*** DCOMPRESS made record one byte too long for block Cause. The record definition of a key-sequenced file contains a DCOMPRESS clause that makes the block size of the record 1 byte longer than specified in the BLOCK clause.
  • Page 382 DDL Messages DDL Error and Warning Messages ***WARNING*** DDL OUTPUT DIAGNOSTICS: Cause. You requested DDL output, but the object does not conform to DDL rules. Effect. A message follows describing the DDL error. DDL does not write the object to the DDL source file.
  • Page 383 DDL Messages DDL Error and Warning Messages ***ERROR*** DEFINITION not found Cause. A definition named in a TOKEN-MAP or a TOKEN-TYPE statement cannot be found in the dictionary. Effect. DDL rejects the token map or token type. Recovery. Correct the definition name or add the referenced definition to the dictionary, then recompile the token map or token type.
  • Page 384 DDL Messages DDL Error and Warning Messages ***ERROR*** Dictionary conversion failed Cause. DDL was unable to convert the dictionary. To determine the cause, see the preceding error message in your output listing. Effect. The dictionary is not converted. Recovery. Correct the error and rebuild the dictionary. Data Definition Language (DDL) Reference Manual—426798-002 A -14...
  • Page 385 DDL Messages DDL Error and Warning Messages ***FATAL ERROR*** DICTIONARY IS CORRUPT- purge and restart Cause. Data stored in the dictionary is in an inconsistent state, or some of the dictionary files are missing. Effect. DDL closes the dictionary and output files and stops processing. Recovery.
  • Page 386 DDL Messages DDL Error and Warning Messages Cause. You attempted to convert a current dictionary. Effect. DDL closes the dictionary and stops processing. Recovery. No recovery is necessary. ***ERROR*** Disk file exists but is not an EDIT file Cause. A COBOL, DDL, FORTRAN, FUP, TACL, TAL, C, or Pascal command specified a file that is not in EDIT format.
  • Page 387 DDL Messages DDL Error and Warning Messages ***WARNING*** EDIT did not recieve the startup message- File error file-error Cause. The EDIT or T4/18/07EDIT process did not receive a startup message because of the file error identified by file-error. Effect. DDL cannot start the EDIT or TEDIT process. Recovery.
  • Page 388 DDL Messages DDL Error and Warning Messages Cause. A NEWPROCESS error occurred during creation of the EDIT or TEDIT process. No user error is implied. Effect. DDL cannot start the EDIT or TEDIT process. Recovery. Reissue the EDIT or TEDIT command. If problem persists, consult your system manager.
  • Page 389 DDL Messages DDL Error and Warning Messages ***ERROR*** Element being redefined redefines another element Cause. An element has a REDEFINES clause redefining an element that also has a REDEFINES clause, and the first element refers to a different field than the second element Effect.
  • Page 390 DDL Messages DDL Error and Warning Messages Recovery. Change the name and recompile for Enform access. If Enform is not to be used, recompilation is not necessary. ***ERROR*** ENUM values out of range for bit field- field-name Cause. The enumeration definition specified for a bit field has a value or values that do not fit in the bit field.
  • Page 391 DDL Messages DDL Error and Warning Messages ***WARNING*** Errors detected- no output produced for object-name Cause. DDL detected one or more errors while processing the statement for object- name. Effect. DDL rejects the object. Recovery. Correct the error or errors and recompile. ***WARNING*** ERRORS is not a legal positive integer- value not changed Cause.
  • Page 392 DDL Messages DDL Error and Warning Messages ***ERROR*** EXT must be a positive integer Cause. A value for EXT is equal to or less than 0; the extent size must be a positive integer. Effect. DDL rejects the object. Recovery. Correct the extent size and recompile. ***ERROR*** External clause must be on object name level Cause.
  • Page 393 DDL Messages DDL Error and Warning Messages Effect. DDL rejects the object. Recovery. Remove the OCCURS DEPENDING ON clause for the field and recompile. ***WARNING*** File name ignored when opening dictionary Cause. A fully qualified file name was specified as a dictionary subvolume in a DICT, DICTN, or DICTR command.
  • Page 394 DDL Messages DDL Error and Warning Messages Recovery. Remove the HEADING clause and recompile. ***ERROR*** Filler cannot have a HELP clause Cause. A FILLER field is described with a HELP clause. Effect. DDL rejects the object. Recovery. Remove the HELP clause and recompile. ***ERROR*** Filler cannot have a KEYTAG clause Cause.
  • Page 395 DDL Messages DDL Error and Warning Messages Recovery. Remove the TACL clause and recompile. ***ERROR*** Filler cannot have an EXTERNAL clause Cause. A FILLER field is described with an EXTERNAL clause. Effect. DDL rejects the object. Recovery. Remove the EXTERNAL clause and recompile. ***ERROR*** Filler cannot have an UPSHIFT clause Cause.
  • Page 396 DDL Messages DDL Error and Warning Messages ***WARNING*** FORTRAN OUTPUT DIAGNOSTICS: Cause. You requested FORTRAN output, but the object does not conform to FORTRAN syntax rules. Effect. A message follows describing the FORTRAN error. DDL does not write the object to the FORTRAN source file. Recovery.
  • Page 397 DDL Messages DDL Error and Warning Messages ***WARNING*** FUP OUTPUT DIAGNOSTICS: Cause. You requested FUP output, but the object does not conform to FUP rules. Effect. A message follows describing the FUP error. DDL does not write the object to the FUP source file.
  • Page 398 DDL Messages DDL Error and Warning Messages ***ERROR*** Group level initialization VALUE must be alphanumeric Cause. You specified a numeric value with a VALUE clause for a group; group values must be alphanumeric Effect. DDL rejects the object. Recovery. Specify an alphanumeric value and recompile. ***ERROR*** Group with initial VALUE contains MUST BE- group-name Cause.
  • Page 399 DDL Messages DDL Error and Warning Messages Recovery. Shorten the name and recompile. ***ERROR*** Improper type of Constant for this usage Cause. A constant is used as a value, but the constant data type is not consistent with the data type of the object receiving the value. Effect.
  • Page 400 DDL Messages DDL Error and Warning Messages Cause. A field described with the USAGE IS INDEX clause is the wrong size for COBOL85 output. Effect. DDL does not produce the requested output for the object. Recovery. Change the size of the index field, specify an index field of the correct size, or request the output appropriate for the field size.
  • Page 401 DDL Messages DDL Error and Warning Messages Cause. An input line contains more than 132 ASCII characters. Effect. DDL truncates the line to 132 characters. Recovery. Break the line into several shorter lines and reenter them. ***ERROR*** Integer conversion error- value Cause.
  • Page 402 DDL Messages DDL Error and Warning Messages Recovery. Correct the display format and recompile. ***ERROR*** Invalid EDIT picture Cause. The edit picture you specified in an EDIT-PIC clause does not follow the COBOL85 rules for edit pictures. Effect. DDL rejects the object. Recovery.
  • Page 403 DDL Messages DDL Error and Warning Messages ***ERROR*** Invalid locale name Cause. The locale name is invalid. Effect. DDL rejects the text item. Recovery. Use a valid locale name. ***ERROR*** Invalid number Cause. You entered an invalid number; for example, %8. Effect.
  • Page 404 DDL Messages DDL Error and Warning Messages Recovery. Correct the error and recompile. ***ERROR*** Invalid size for element type Cause. A TYPE clause specifies a size that is invalid for the particular data type. Effect. DDL rejects the object. Recovery. Correct the error and recompile. ***ERROR*** Invalid SSID format Cause.
  • Page 405 DDL Messages DDL Error and Warning Messages Recovery. This error cannot be recovered using DDL alone. Report the error to your service provider. ***ERROR*** Invalid value spedified for MAXEXTENTS Cause. You specified a MAXEXTENTS value that is outside the valid range. As many as 978 maximum extents can be specified, but the actual upper limit depends on the number of alternate keys.
  • Page 406 DDL Messages DDL Error and Warning Messages ***ERROR*** Item with UPSHIFT found on nonalphabetic data item- field-name Cause. You specified an UPSHIFT clause for a field that does not have an alphabetic data type; UPSHIFT is allowed only for fields described by PIC A, PIC X, TYPE CHARACTER, TYPE *, or TYPE def-name, in which def-name or * is a definition of an alphabetic or alphanumeric type field.
  • Page 407 DDL Messages DDL Error and Warning Messages Effect. DDL rejects the object. Recovery. Specify a different key attribute. ***ERROR*** Key element invalid- Dictionary is corrupt Cause. A dictionary was updated incorrectly. Effect. DDL rejects the object. Recovery. Rebuild the dictionary. ***ERROR*** Key file name already used- file-name Cause.
  • Page 408 DDL Messages DDL Error and Warning Messages ***ERROR*** KEYTAG with repeating group or element Cause. A field or group that is a key field has an OCCURS clause. Effect. DDL rejects the record. Recovery. Remove the OCCURS clause or the key specification for the field and recompile.
  • Page 409 DDL Messages DDL Error and Warning Messages Recovery. Put the level 88 element after a field description and recompile. ***ERROR*** LEvel 88 value inconsistent with data type Cause. A level 88 value is incompatible with the type of the field that the level 88 clause describes.
  • Page 410 DDL Messages DDL Error and Warning Messages Effect. DDL does not do anything. Recovery. If you want DDL to write the record definition to a pTAL or TAL source file without changing the literal name to a comment, shorten the key name and recompile. ***ERROR*** Logical type mixing not supported by FORTRAN- object-name Cause.
  • Page 411 DDL Messages DDL Error and Warning Messages Cause. You have entered a VALUE clause that contains more than one initial value. Effect. DDL rejects the object. Recovery. Remove all but one initial value and recompile. ***ERROR*** More than one sequence clause specified- record-name Cause.
  • Page 412 DDL Messages DDL Error and Warning Messages Effect. If COBOL output is requested, DDL issues a COBOL error message and suppresses COBOL output. Recovery. Remove all but one key at the same offset and recompile. ***ERROR*** Multiple primary keys Cause. More than one key is identified as a primary key; a key-sequenced file has exactly one primary key.
  • Page 413 DDL Messages DDL Error and Warning Messages !?cendif ***WARNING*** No CIFNDEF or CIFDEF is used for this CENDIF, no output produced for CENDIF. Recovery. No recovery is necessary. ***WARNING*** No DDL output file; no UPDATE output produced Cause. A DDL command was not entered to open a DDL source file before an OUTPUT UPDATE statement was issued.
  • Page 414 DDL Messages DDL Error and Warning Messages ***ERROR*** No JUSTIFIED clause allowed within a group with VALUE clause Cause. You specified a JUSTIFIED clause for an elementary item that is subordinate to a group item with a VALUE clause. Effect. DDL rejects the object. Recovery.
  • Page 415 DDL Messages DDL Error and Warning Messages Effect. DDL closes the dictionary and output files and stops processing. Recovery. Rebuild the dictionary. ***ERROR*** No REDERINES clause allowed within an object with EXTERNAL Cause. You attempted to specify an EXTERNAL clause and one or more line items in the definition or record have a REDEFINES clause.
  • Page 416 DDL Messages DDL Error and Warning Messages Recovery. If you want to run a test compilation using NOSAVE, you can create a test dictionary on a subvolume unconnected with the Pathmaker project. ***ERROR*** NOVALUE cannot be specified unless referencing a DEF name Cause.
  • Page 417 DDL Messages DDL Error and Warning Messages ***ERROR*** Object element invalid- Dictionary is corrupt Cause. A dictionary was updated incorrectly. Effect. DDL rejects the object. Recovery. Rebuild the dictionary. ***ERROR*** Object is used by some other object(s)- object-name Cause. An object you attempted to create or delete is referenced by another object. Effect.
  • Page 418 DDL Messages DDL Error and Warning Messages ***WARNING*** Object type not specified- DEF assumed Cause. An OUTPUT UPDATE or SHOW USE OF statement does not include a keyword to specify an object type; DDL assumes the object is a definition. Effect.
  • Page 419 DDL Messages DDL Error and Warning Messages ***ERROR*** OCCURS DEPENDING ON found with or within REDEFINES- name Cause. A definition that contains a REDEFINES clause also contains an OCCURS DEPENDING ON clause when COBOL output is requested. Effect. DDL suppresses COBOL output. Recovery.
  • Page 420 DDL Messages DDL Error and Warning Messages Recovery. Change the file security and manually purge the remaining dictionary files. ***ERROR*** Only one TYPE clause per element allowed Cause. A field definition or description has more than one PICTURE or TYPE clause. Effect.
  • Page 421 DDL Messages DDL Error and Warning Messages Effect. A message follows describing the Pascal error. DDL does not write the object to the Pascal source file. Recovery. Correct the error and recompile if you want Pascal output. ***WARNING*** PATHMAKER subvol check failed, assuming PATHMAKER subvol- subvolume-name Cause.
  • Page 422 DDL Messages DDL Error and Warning Messages Recovery. Remove DUPLICATES ALLOWED and recompile. ***ERROR*** Primary key specified but file is not key- sequenced- file-name Cause. A primary key is declared in a KEYTAG or KEY IS clause, but the FILE IS clause declares the file as other than key-sequenced.
  • Page 423 DDL Messages DDL Error and Warning Messages Recovery. Correct the error and recompile. ***ERROR*** Record size too big for file type Cause. The total length of a record is greater than the maximum size allowed for the special file type: For Format 1 files: File Type Maximum Length...
  • Page 424 DDL Messages DDL Error and Warning Messages ***ERROR*** REDEFINES not allowed on or with bit fields- element-name Cause. A REDEFINES clause follows the description of a bit field or is with a bit field. Effect. DDL rejects the object. Recovery. Remove the REDEFINES clause or the bit field and recompile the object. ***ERROR*** REDEFINES too large Cause.
  • Page 425 DDL Messages DDL Error and Warning Messages ***ERROR*** Referenced Def has incompatible alignment Cause. An attempt was made to compile a record or definition with matched2 alignment, that referenced a definition previously compiled without matched2 alignment. Effect. DDL does not add the new record or definition to the dictionary. Recovery.
  • Page 426 DDL Messages DDL Error and Warning Messages Effect. DDL rejects the object. Recovery. Correct the error and recompile. ***ERROR*** RENAMES elements overlap improperly Cause. In a phrase such as “A RENAMES B THRU C,” either field C starts before field B, or field B ends after field C.
  • Page 427 DDL Messages DDL Error and Warning Messages ***ERROR*** Section name not found in source file- section-name Cause. A SOURCE command specifies a section name in a source file, but the section name is not in the source file. Effect. DDL takes no action. Recovery.
  • Page 428 DDL Messages DDL Error and Warning Messages Recovery. This error affects only the report listing. No recovery is necessary unless you want a report with a different spacing. Use the OUTPUT statement with a correct SPACING command to produce the report you want. ***ERROR*** SPI-NULL conflict in group- group-name Cause.
  • Page 429 DDL Messages DDL Error and Warning Messages Recovery. Change the DDL definition so that all character or FILLER items contain an even number of characters, use the C_MATCH_HISTORIC_TAL command, or recompile the definition with the CFIELDALIGN_MATCHED2 command set. ***ERROR*** Structure alignment in Pascal is incompatible with DDL- element-name Cause.
  • Page 430 DDL Messages DDL Error and Warning Messages ***ERROR*** TAL DEF or TOKEN MAP name too long Cause. The name of a definition or token map exceeds the limit of 31 ASCII characters pTAL or TAL allows for these names. Effect. DDL does not write the definition or token map to the pTAL or TAL source file. Recovery.
  • Page 431 DDL Messages DDL Error and Warning Messages Effect. DDL closes the dictionary and output files and stops processing. Recovery. Delete objects from the dictionary and recompile. ***ERROR*** THIS DICTIONARY CANNOT BE UPDATED Cause. You do not have write access to the dictionary. Effect.
  • Page 432 DDL Messages DDL Error and Warning Messages ***ERROR*** TOKEN-CODE TOKEN-TYPE not specified Cause. No TOKEN-TYPE clause is specified in a TOKEN-CODE statement. Effect. DDL rejects the token code. Recovery. Specify a TOKEN-TYPE clause. ***ERROR*** TOKEN-MAP DEFINITION multiply defined Cause. The DEF IS clause in a TOKEN-MAP statement is already specified. Effect.
  • Page 433 DDL Messages DDL Error and Warning Messages ***ERROR*** TOKEN-MAP exceeds TACL 5000-byte limit- token-map-name Cause. A TOKEN-MAP statement generates a TACL structure that is greater than 5,000 bytes. The entire TACL structure, not just individual fields, must be less than or equal to 5,000 bytes.
  • Page 434 DDL Messages DDL Error and Warning Messages ***ERROR*** TOKEN-TYPE DEFINITION exceeds 254 bytes Cause. The definition referenced in a TOKEN-TYPE statement is longer than 254 bytes. The total length of the definition is derived from the sum of the length of individual fields in the definition, optionally repeated by an OCCURS n TIMES clause.
  • Page 435 DDL Messages DDL Error and Warning Messages ***ERROR*** TOKEN-TYPE OCCURS multiply defined Cause. An OCCURS clause is already specified in the TOKEN-TYPE statement. Effect. DDL rejects the token type. Recovery. Delete one of the OCCURS clauses and recompile. ***ERROR*** TOKEN-TYPE VALUE multiply defined Cause.
  • Page 436 DDL Messages DDL Error and Warning Messages Effect. DDL closes the dictionary and output files and stops processing. Recovery. Correct the errors and recompile. ***ERROR*** Too many names- statement has been ignored Cause. An OUTPUT, OUTPUT UPDATE, DELETE, or SHOW USE OF statement has too many definitions or records.
  • Page 437 DDL Messages DDL Error and Warning Messages Effect. The dictionary you were trying to delete still exists. Recovery. Determine the status of the files and proceed accordingly. ***ERROR*** Unable to match locale- locale-name Cause. A text item did not have a literal with a locale name the same as specified either with the SETLOCALENAME command, if set, or with the system default locale, if the SETLOCALENAME was not set.
  • Page 438 DDL Messages DDL Error and Warning Messages Cause. DDL encountered an unexpected error. Effect. DDL issues this message followed by a fatal error message. Recovery. If the problem persists, consult your system manager. ***ERROR*** Union Alignment in C is incompatible with DDL- element Cause.
  • Page 439 DDL Messages DDL Error and Warning Messages Cause. The value of an unsigned integer has an invalid form: either a negative number or a decimal or octal value. Effect. DDL rejects the object. Recovery. Correct the error and recompile. ***ERROR*** Unspecified value Cause.
  • Page 440 DDL Messages DDL Error and Warning Messages ***ERROR*** Unterminated SOURCE command on last line not processed Cause. A SOURCE command does not terminate with a file name or a closing parenthesis following a list of section names, or a comma is missing after a section name.
  • Page 441 DDL Messages DDL Error and Warning Messages ***WARNING*** UPSHIFT on referencing item ignored, UPSHIFT inherited field-name Cause. An UPSHIFT clause describes a field that is defined by reference to an existing definition, and the referenced definition already has an UPSHIFT clause. UPSHIFT cannot be overridden in a referring definition.
  • Page 442 DDL Messages DDL Error and Warning Messages ***ERROR*** VALUE invalid or inconsistent with data type- value Cause. The value specified in a VALUE clause cannot be mapped into the declared data type. Effect. DDL rejects the object. Recovery. Correct the error and recompile. ***ERROR*** VALUE item found with or within an OCCURS name Cause.
  • Page 443 DDL Messages DDL Error and Warning Messages ***ERROR*** VALUE item found with or within REDEFINES name Cause. A field definition or description contains both REDEFINES and VALUE clauses. A field described with a REDEFINES clause cannot have an initial value. Effect.
  • Page 444 DDL Messages DDL Error and Warning Messages Recovery. Check the referenced definition, and correct the VERSION clause to specify a field or group name in the referenced definition; then recompile. ***ERROR*** Version THRU name not unique Cause. A field or group name in a definition referenced by a TOKEN-MAP VERSION clause is not unique within the definition.
  • Page 445: Sample Schemas

    Sample Schemas This appendix contains two schemas: one to define a database and the other to define SPI tokens. Sample Database Schema .The sample database schema defines a database consisting of nine files. The database files are defined in RECORD statements that refer to previous DEFINITION statements for their record structures.
  • Page 446: Database Schema Listing

    Sample Schemas Database Schema Listing Database Schema Listing !*************************************************************** ! COMPILER COMMANDS: !*************************************************************** ? ERRORS 1 ? DICT ! ? COMMENTS ? FUP FUPSRC ! ? COBOL COBSRC85 ! !*************************************************************** ! CONSTANT DEFINITIONS !*************************************************************** CONSTANT custnum-heading VALUE "Customer/Number"LN en_US.ISO8859-1, "Cliente/Numero"LN.es_ES.ISO8859-1 "Client/Numero"LN fr_FR.ISO8859-1.
  • Page 447 Sample Schemas Database Schema Listing en_US.ISO8859-1, "Sucursal/Numero"LN.es_ES.ISO8859-1, "Bureau/Numero"LN fr_FR.ISO8859-1. CONSTANT manager-heading VALUE "Manager"LN en_US.ISO8859-1, "Gerente",LN.es_ES.ISO8859-1 "Chef De Service"LN fr_FR.ISO8859-1. CONSTANT salesperson-heading VALUE "Salesperson"LN en_US.ISO8859-1, "Vendedor"LN.es_ES.ISO8859- "Vendeur"LN fr_FR.ISO8859-1. CONSTANT mdy-date-display VALUE "M<99/99/99>". CONSTANT part-cost-display VALUE "M<ZZZ,ZZ9,99>". !*************************************************************** ! FIELD DEFINITIONS !*************************************************************** DEFINITION custnum PIC 9(4) HEADING custnum-heading.
  • Page 448 Sample Schemas Database Schema Listing UPSHIFT. 02 midinit PIC X(2) UPSHIFT. DEFINITION addr. 02 address PIC X(22). 02 city PIC X(14). 02 state PIC X(2) HELP "Enter 2-character code". 02 zip TYPE zip-cd. DEFINITION mdy-date. DISPLAY mdy-date-display HELP "Enter date as:" "mm/dd/yy".
  • Page 449 Sample Schemas Database Schema Listing DEFINITION suppinfo. 02 suppnum TYPE *. 02 suppname TYPE name. 02 addr TYPE *. * Definition for REGION Record DEFINITION reginfo. 02 regnum TYPE *. 02 regname PIC X(12). 02 location PIC X(14). 02 manager TYPE empnum HEADING manager-heading.
  • Page 450 Sample Schemas Database Schema Listing MAXEXTENTS 100. DEFINITION IS orderinfo. KEY IS orders.ordernum DUPLICATES NOT ALLOWED. KEY "sn" IS orders.salesperson. KEY "cn" IS orders.custnum. * Contains each order line for each order RECORD odetail. FILE IS "$data.sales.odetail"KEY-SEQUENCED AUDIT MAXEXTENTS 100. 02 primkey.
  • Page 451: Sample Spi Schema

    The first step in creating the dictionary is to compile this entire file into your dictionary using the DDL SOURCE command. Note that you do not generate COBOL, pTAL, TAL, or TACL source code for the standard SPI definitions; HP supplies the COBOL, pTAL, TAL, or TACL source code in these files: ZSPIDEF.ZSPICOB COBOL source code ZSPIDEF.ZSPITAL...
  • Page 452: Ddl Commands To Create An Spi Schema

    Sample Schemas DDL Commands to Create an SPI Schema For this example, the DDL definitions that are not part of the standard SPI definition file are contained in the file ASSNDDL. Note that when you write a subsystem, the file name of the file containing the subsystem’s DDL definitions should have this format: ssssDDL In the format, ssss is a code to identify the subsystem.
  • Page 453: Selected Zspiddl Statements

    Sample Schemas Selected ZSPIDDL Statements The SETSECTION commands in this example divide the host-language source files into sections as recommended in the Distributed Systems Management (DSM) Manual. Selected ZSPIDDL Statements The following DDL statements from the file ZSPIDEF.ZSPIDDL are either used by the DDL statements in the file ASSNDDL or used in examples in this manual.
  • Page 454: Assnddl Statements

    Sample Schemas ASSNDDL Statements OCCURS VARYING. TOKEN-CODE zspi-tkn-command VALUE IS zspi-tnm-command TOKEN-TYPE IS zspi-typ-enum. TOKEN-CODE zspi-tkn-retcode VALUE IS zspi-tnm-retcode TOKEN-TYPE IS zspi-typ-enum. ASSNDDL Statements The following DDL statements are in the sample DDL file ASSNDDL. They are the statements needed by the sample subsystem in addition to those provided by ZSPIDEF.ZSPIDDL.
  • Page 455 Sample Schemas ASSNDDL Statements ! Token-code definitions: TOKEN-CODE assn-tkn-my-status VALUE IS assn-tnm-my-status TOKEN-TYPE IS assn-typ-status. TOKEN-CODE assn-tkn-stat-reply VALUE IS assn-tnm-stat-reply TOKEN-TYPE IS assn-typ-status. ! Token-map definition: TOKEN-MAP assn-map-jobinfo VALUE IS assn-tnm-jobinfo DEF IS assn-ddl-jobinfo. VERSION "D00" FOR jnumber THRU location. VERSION "D30"...
  • Page 456 Sample Schemas ASSNDDL Statements Data Definition Language (DDL) Reference Manual—426798-002 B -12...
  • Page 457 DDL Data Translation This appendix describes how data defined in DDL is translated into each of the seven supported host languages. The DDL compiler can translate any definition or record into data-declaration source code for host languages (C, COBOL, FORTRAN, Pascal, TACL, TAL, and pTAL). The only restriction on translation is that not all data types are supported in all languages, as indicated by the following: Whenever a declared data type is not supported in a particular language, DDL...
  • Page 458: Table C-1. Sample Ddl/C Data Translation Table

    DDL Data Translation Table C-1. Sample DDL/C Data Translation Table (page 1 of 2) Clause Type DDL Clause Specification C Data Type DDL PICTURE clause PIC A(10) char [10] PIC 9(10) char [10] PIC X(10) char [10] PIC A(2)X(10)9(2)A(5) char [19] PIC SV9(3) char [4] PIC 9V9(2)
  • Page 459 DDL Data Translation Table C-1. Sample DDL/C Data Translation Table (page 2 of 2) Clause Type DDL Clause Specification C Data Type TYPE COMPLEX double (inaccurate representation) TYPE LOGICAL 1 char TYPE LOGICAL[2] short TYPE LOGICAL 4 long TYPE ENUM enum TYPE CHARACTER 8 char[100][8]...
  • Page 460: Table C-2. Sample Ddl/Cobol Data Translation Table

    DDL Data Translation Table C-2. Sample DDL/COBOL Data Translation Table (page 1 of 2) Clause Type DDL Clause Specification COBOL85 Data Type DDL PICTURE clause PIC A(10) PIC A(10) PIC 9(10) PIC 9(10) PIC X(10) PIC X(10) PIC N(10) PIC N(10) PIC A(2)X(10)9(3) PIC A(2)X(10)9(3) PIC SV9(3)
  • Page 461 DDL Data Translation Table C-2. Sample DDL/COBOL Data Translation Table (page 2 of 2) Clause Type DDL Clause Specification COBOL85 Data Type TYPE COMPLEX PIC X(8) TYPE LOGICAL [2] PIC X(2) TYPE LOGICAL 4 PIC X(4) TYPE ENUM NATIVE-2 TYPE CHARACTER 8 PIC X(8) OCCURS 100 TIMES Occurs 100 TIMES...
  • Page 462: Table C-3. Sample Ddl/Fortran Data Translation Table

    DDL Data Translation Table C-3. Sample DDL/FORTRAN Data Translation Table (page 1 of 2) Clause Type DDL Clause Specification FORTRAN Data Type DDL PICTURE clause PIC A(10) CHARACTER*10 PIC 9(10) CHARACTER*10 PIC X(10) CHARACTER*10 PIC N(10) CHARACTER*20 PIC A(2)X(10)9(3) CHARACTER*15 PIC SV9(3) CHARACTER*4 PIC 9V9(2)S...
  • Page 463 DDL Data Translation Table C-3. Sample DDL/FORTRAN Data Translation Table (page 2 of 2) Clause Type DDL Clause Specification FORTRAN Data Type TYPE LOGICAL 4 LOGICAL*4 TYPE ENUM INTEGER*2 CHARACTER*8 (1:100) TYPE CHARACTER 8 OCCURS 100 TIMES INTEGER*2 TYPE BINARY 16 OCCURS 3 TIMES Record TYPE SQL VARCHAR 10...
  • Page 464: Table C-4. Sample Ddl/Pascal Data Translation Table

    DDL Data Translation Table C-4. Sample DDL/Pascal Data Translation Table (page 1 of 2) Clause Type DDL Clause Specification Pascal Data Type DDL PICTURE clause PIC A(10) CHARACTER*10 PIC 9(10) CHARACTER*10 PIC X(10) CHARACTER*10 PIC N(10) CHARACTER*20 PIC A(2)X(10)9(3) CHARACTER*15 PIC SV9(3) CHARACTER*4 PIC 9V9(2)S...
  • Page 465 DDL Data Translation Table C-4. Sample DDL/Pascal Data Translation Table (page 2 of 2) Clause Type DDL Clause Specification Pascal Data Type TYPE LOGICAL 1 BOOLEAN TYPE LOGICAL[2] INT16 TYPE LOGICAL 4 INT32 TYPE ENUM INT16 TYPE CHARACTER 8 Array[1..100] of FSTRING(8) OCCURS 100 TIMES TYPE BINARY 16 Array[1..3] of INT16...
  • Page 466: Table C-5. Sample Ddl/Tacl Data Translation Table

    DDL Data Translation Table C-5. Sample DDL/TACL Data Translation Table (page 1 of 2) Clause Type DDL Clause Specification TACL Data Type DDL PICTURE clause PIC A(10) CHAR BYTE(0:9) PIC 9(10) CHAR BYTE(0:9) PIC X(10) CHAR BYTE(0:9) PIC N(10) CHAR BYTE(0:19) PIC A(2)X(10)9(2)A(5) CHAR BYTE(0:18) PIC SV9(3)
  • Page 467 DDL Data Translation Table C-5. Sample DDL/TACL Data Translation Table (page 2 of 2) Clause Type DDL Clause Specification TACL Data Type DDL TYPE clause TYPE COMPLEX INT4 (continued) TYPE LOGICAL 1 BYTE TYPE LOGICAL[2] BOOL TYPE LOGICAL 4 INT2 TYPE ENUM ENUM TYPE CHARACTER 8...
  • Page 468: Table C-6. Sample Ddl/Tal Data Translation Table

    DDL Data Translation Table C-6. Sample DDL/TAL Data Translation Table (page 1 of 2) DDL Clause Clause Type Specification pTAL or TAL Data Type DDL PICTURE clause PIC A(10) STRUCT BEGIN STRING BYTE [1:10]; END; PIC 9(10) STRUCT BEGIN STRING BYTE [1:10]; END; PIC X(10) STRUCT BEGIN STRING BYTE [1:10];...
  • Page 469 DDL Data Translation Table C-6. Sample DDL/TAL Data Translation Table (page 2 of 2) DDL Clause Clause Type Specification pTAL or TAL Data Type DDL TYPE clause TYPE BINARY 32 INT(32) (continued) TYPE BINARY 32 INT(32) UNSIGNED TYPE BINARY 64 FIXED TYPE BINARY 64,-16 FIXED(-16)
  • Page 470 DDL Data Translation Data Definition Language (DDL) Reference Manual—426798-002 C -14...
  • Page 471: Dictionary Components

    Dictionary Database Structure A DDL dictionary is itself a DDL database consisting of 14 files. DDL supplies the names of the dictionary database files; these names must not be changed. This appendix describes the structure of the dictionary database in detail, covering the following topics: Basic components of a dictionary: objects, elements, and text items Files that make up the dictionary database: their names, their structure, and what...
  • Page 472: Elements

    Dictionary Database Structure Elements DDL assigns each object a unique object number for identification. Object numbers are assigned in ascending order and are never reused. When an object is removed from the dictionary, all references to its object number are also removed. Elements Definitions and records can contain one or more elements.
  • Page 473: Table D-1. Text Ids Assigned To Text Items

    Dictionary Database Structure Dictionary Files Table D-1 shows the text items described in the following three objects: CONSTANT custnum-heading VALUE "Customer". DEF initials PIC XXX VALUE ALL SPACES HELP "Initials". DEF quantity PIC 999 MUST BE 1 THRU 999. Table D-1, each text item is assigned a unique text ID number.
  • Page 474: Field Descriptions

    TOKEN MAP FIELD VERSION FILE—contains one VER record for each VERSION or NOVERSION clause associated with a token map. Field Descriptions The DDL dictionary is itself a database. HP supplies the DDL schema for the dictionary database in the following file: $SYSTEM.SYSTEM.DDSCHEMA In the following subsections, the record definitions for the dictionary database files are fully expanded to show the field descriptions.
  • Page 475: Dictcdf Fields

    Dictionary Database Structure DICTCDF Fields DICTCDF Fields DICTCDF (Constant Definition File) contains one record for each constant in the dictionary. The record links the constant with the constant text in the DICTOTF file. Record CDF. File is "DICTCDF" Key-sequenced Code 207 Audit.
  • Page 476: Dictddf Fields

    Dictionary Database Structure DICTDDF Fields CONSTANT-TYPE-EXPLICIT contains an ASCII character Y (yes) to indicate the constant type was entered explicitly or N (no) to indicate the constant type was inherited from another constant or by default. DICTDDF Fields DICTDDF (Dictionary Definition File) contains a single record, updated every time DDL adds a new object to the dictionary.
  • Page 477: Dictkdf Fields

    Dictionary Database Structure DICTKDF Fields The version number encoded in the DDL compiler is checked against this field whenever a dictionary is opened. CREATOR-USERID a group field that describes the user ID of the person who created this dictionary. CREATOR-USERID consists of the next two fields: GROUP-NAME the name of the group to which the user belongs.
  • Page 478 Dictionary Database Structure DICTKDF Fields Record KDF. File is "DICTKDF" Key-sequenced Code 206 Audit. 02 IDENTIFIER. 03 RECORD-NUMBER Pic "9(9)" COMP Null 0 Display "[BZ]I10" Heading "Record/Number". 03 ELEMENT Type Binary 16 Display "I3" Heading "Key/Num". 02 OBL-KEY. 03 OBJECT Pic "9(9)"...
  • Page 479 Dictionary Database Structure DICTKDF Fields 02 NULL-VALUE Type Binary 16 Display "I5" Heading "Null/Value". 02 NULL-VALUE-SPECIFIED Type ASCII-SWITCH VALUE "N" Heading "Null/Specified". 02 KEY-CLASS Pic "XXX" VALUE "PRI" Heading "Key/Class". 02 KEY-UNIQUE Type Character 1 MUST BE "Y", "N" UPSHIFT Display "A1"...
  • Page 480 Dictionary Database Structure DICTKDF Fields KEYTAG-STRING a 2-character string used when the Enscribe key specifier is declared as two ASCII characters. KEYTAG-STRING redefines KEYTAG-VALUE as a 2-byte string. KEYTAG-OBJECT if the keytag value is defined by a constant, contains the object number of the constant.
  • Page 481: Dictmap Fields

    Token numbers can be in the range -32,768 through 32,767. Any user-supplied token numbers must be in the range 1 through 9,998; the other token numbers are reserved by HP or are previously defined by SPI. Data Definition Language (DDL) Reference Manual—426798-002...
  • Page 482: Dictobl Fields

    Dictionary Database Structure DICTOBL Fields TOKEN-NUMBER-CONSTANT contains the object-number of the constant used to define the token number; if the token number was not specified using a constant, this field is set to 0. MAP-DEF contains the object number of the definition (DEF) for the token map. The definition defines the data structure of the extensible structured token described by the token map.
  • Page 483 Dictionary Database Structure DICTOBL Fields Record OBL. File is "DICTOBL" Key-sequenced MaxExtents 500 Code 204 Audit. 02 IDENTIFIER. 03 OBJECT Pic "9(9)" COMP Null 0 Display "[BZ]I10" Heading "Object/Number". 03 ELEMENT Type Binary 16 Display "I3" Heading "Element/Number". 02 LEVEL Type Binary 16 Display "I2"...
  • Page 484 Dictionary Database Structure DICTOBL Fields 02 MUST-BE-TEXT Pic "9(9)" COMP Null 0 Display "[BZ]I10" Heading "Must Be/Text ID". 02 EDIT-PIC-TEXT Pic "9(9)" COMP Null 0 Display "[BZ]I10" Heading "Edit Pic/Text ID". 02 TACL-TYPE Type Character 2 UPSHIFT Heading "TACL/Type" MUST BE "CP", "DV", "EN", "FN", "F3", "PH", "SI", "SV", "TI", "TS", "UN", "...
  • Page 485 Dictionary Database Structure DICTOBL Fields 02 OCCURS-MIN-OBJECT Pic "9(9)" COMP Display "[BZ]I10" Null 0 Heading "Occurs Min/Object #". 02 OCCURS-MAX-OBJECT Pic "9(9)" COMP Display "[BZ]I10" Null 0 Heading "Occurs Max/Object #". 02 OCCURS-ELEMENT Type Binary 16 Display "I4" Heading "Occurs/Element". 02 STARTING Type Binary 16 Display "I4"...
  • Page 486 Dictionary Database Structure DICTOBL Fields 02 UPSHIFT Type Character 1 MUST BE "Y", "N" UPSHIFT Display "A1" VALUE "N" Heading "Upshift". 02 USER-DEFINED-FILLER Type Character 1 MUST BE "Y", "N" UPSHIFT Display "A1" VALUE "N" Heading "User Defined/Filler". 02 PADDED-FILLER REDEFINES USER-DEFINED-FILLER Type Character 1 MUST BE "Y", "N"...
  • Page 487 Dictionary Database Structure DICTOBL Fields 02 SPI-NULL-INHERITED Type Character 1 MUST BE "Y", "N" UPSHIFT Display "A1" Heading "SPI-Null/Inherited". 02 UPSHIFT-INHERITED Type Character 1 MUST BE "Y", "N" UPSHIFT Display "A1" Heading "Upshift/Inherited". 02 USAGE-IS-INDEX Type Character 1 MUST BE "Y", "N" UPSHIFT Display "A1"...
  • Page 488 Dictionary Database Structure DICTOBL Fields 02 JUSTIFY-INHERITED Type Character 1 MUST BE "Y", "N" VALUE "N" UPSHIFT Display "A1" Heading "Just-Right/Inherited". 02 SQLNULLABLE-SPECIFIED Type Character 1 MUST BE "Y", "N" VALUE "N" UPSHIFT Display "A1" Heading "SqlNull/Spec". 02 INTERVAL-LEADING-PRECISION Type Binary 16 Display "I4"...
  • Page 489 Dictionary Database Structure DICTOBL Fields level numbers in the source schema can be incremented by values greater than one, the DDL compiler compresses all level values so that there is no skipping. This field also identifies Level 66 RENAMES and Level 88 clauses, which have reserved level numbers.
  • Page 490 Dictionary Database Structure DICTOBL Fields EDIT-PIC-TEXT the text ID of the OTF record containing the edit picture value. TACL-TYPE contains a 2-character ASCII code identifying the high-level TACL data type associated with the element. Valid values for this field are: Code TACL Type CRTPID...
  • Page 491: Table D-3. Structure Codes

    Dictionary Database Structure DICTOBL Fields ORDER-DATE in the object ORD-HEADER; in this case, SOURCE-DEF does not indicate that ORDER-DATE in turn refers to DATE. ELEMENT-REDEFINED the element number of the group or field that this element redefines if this element redefines another element. OBJ-CLASS an indicator that describes this element as a group or elementary field;...
  • Page 492 Dictionary Database Structure DICTOBL Fields Table D-3. STRUCTURE Codes (page 2 of 3) Code Meaning Bit unsigned National string SQL DATETIME YEAR SQL DATETIME MONTH SQL DATETIME YEAR TO MONTH SQL DATETIME DAY SQL DATETIME MONTH TO DAY SQL DATETIME YEAR TO DAY SQL DATETIME HOUR SQL DATETIME DAY TO HOUR SQL DATETIME MONTH TO HOUR...
  • Page 493 Dictionary Database Structure DICTOBL Fields Table D-3. STRUCTURE Codes (page 3 of 3) Code Meaning SQL INTERVAL HOUR SQL INTERVAL DAY TO HOUR SQL INTERVAL MINUTE SQL INTERVAL HOUR TO MINUTE SQL INTERVAL DAY TO MINUTE SQL INTERVAL SECOND SQL INTERVAL MINUTE TO SECOND SQL INTERVAL HOUR TO SECOND SQL INTERVAL DAY TO SECOND SQL INTERVAL FRACTION...
  • Page 494 Dictionary Database Structure DICTOBL Fields Table D-4. SQL DATETIME Element Sizes (page 2 of 2) Code Meaning Element Size SQL DATETIME MINUTE SQL DATETIME HOUR TO MINUTE SQL DATETIME DAY TO MINUTE SQL DATETIME MONTH TO MINUTE SQL DATETIME YEAR TO MINUTE SQL DATETIME SECOND SQL DATETIME MINUTE TO SECOND SQL DATETIME HOUR TO SECOND...
  • Page 495 Dictionary Database Structure DICTOBL Fields Table D-5. SQL INTERVAL Element Sizes (page 2 of 2) Code Meaning Element SQL INTERVAL MINUTE TO SECOND SQL INTERVAL HOUR TO SECOND SQL INTERVAL DAY TO SECOND SQL INTERVAL FRACTION SQL INTERVAL SECOND TO FRACTION SQL INTERVAL MINUTE TO FRACTION SQL INTERVAL HOUR TO FRACTION SQL INTERVAL DAY TO FRACTION...
  • Page 496 Dictionary Database Structure DICTOBL Fields NULL-VALUE the ASCII value used by DDL when producing FUP source output for an alternate key. NULL-VALUE-OBJECT if the null value is defined by a constant, contains the object number of the constant; otherwise, it is 0. SPI-NULL-VALUE contains a user-specified SPI null value used by SPI to process token maps.
  • Page 497 Dictionary Database Structure DICTOBL Fields NULL-INHERITED contains the ASCII character Y (yes) to indicate the null was inherited from a definition or N (no) to indicate it was explicitly specified. SPI-NULL-INHERITED contains the ASCII character Y (yes) to indicate the SPI null was inherited from a definition or from the default, or N (no) to indicate the SPI null was explicitly specified.
  • Page 498: Dictodf Fields

    Dictionary Database Structure DICTODF Fields SQLNULLABLE-SPECIFIED contains the ASCII character Y (yes) if the line item has the [NOT] SQLNULLABLE clause specified, or N (no) if no such clause is specified. The default value for this field is N. If the value of this field is Y, the value of the SQLNULLABLE-FLAG field, described below, indicates whether SQLNULLABLE or NOT SQLNULLABLE is specified.
  • Page 499 Dictionary Database Structure DICTODF Fields Record ODF. File is "DICTODF" Key-sequenced Code 202 Audit. 02 OBJECT Pic "9(9)" COMP Null 0 Display "[BZ]I10" Heading "Object/Number". 02 IDENTIFIER Null " " Heading "Object Identifier". 03 OBJ-TYPE Type Character 2 MUST BE "ID","RD",“CD”,“TT”, "TC","TM","SR","SV", "RQ","TB"...
  • Page 500 Dictionary Database Structure DICTODF Fields An explanation of each field follows: OBJECT the object number, a system-assigned number that uniquely identifies each object within the dictionary. Each object corresponds to exactly one identifier. IDENTIFIER a unique identifier of each object in the dictionary, consisting of the next two fields: OBJ-TYPE a 2-byte field that has one of the following values: Value...
  • Page 501: Dictotf Fields

    Dictionary Database Structure DICTOTF Fields CREATOR-USERID consists of the next two fields: GROUP-NAME the name of the group to which the user belongs. USER-NAME a name identifying the user within the group. DATE-MODIFIED a 6-byte timestamp that is updated every time the object is modified.
  • Page 502 Dictionary Database Structure DICTOTF Fields 88 CONSTANT-STRING Value is "ST". 88 CONSTANT-VERSION Value is "VR". 88 CONSTANT-BINARY-16 Value is "2S". 88 CONSTANT-BINARY-UNSIGNED Value is "2U". 88 CONSTANT-BINARY-32 Value is "4S". 88 CONSTANT-BINARY-32-UNSIGNED Value is "4U". 88 CONSTANT-BINARY-64 Value is "8S". 88 CONSTANT-NATIONAL-STRING Value is "NS".
  • Page 503: Dictouf Fields

    Dictionary Database Structure DICTOUF Fields CONSTANT-ID if the text element was defined by referring to a constant, contains the object number of the constant; otherwise, it is 0. CONSTANT-TYPE-STRING a two-character ASCII code that identifies the type of constant. CONSTANT-TYPE a numeric code identifying the type of constant. CONSTANT-TYPE-EXPLICIT contains an ASCII character “Y”...
  • Page 504 Dictionary Database Structure DICTOUF Fields Record OUF. File is "DICTOUF" Key-sequenced Code 208 Audit. 02 IDENTIFIER. 03 OBJECT-USED Null 0 Heading "Object/Used". 04 OBJ-TYPE Type Character 2 MUST BE "ID","RD","CD" "TT", "TC","TM","SR","SV", "RQ","TB" UPSHIFT Heading "Obj/Type". 04 NAME Type Character 30 Heading "Object Name".
  • Page 505: Dictrdf Fields

    Dictionary Database Structure DICTRDF Fields Code Object SPI Token Type SPI Token Code SPI Token Map Server Service Requester Table NAME contains the name of the object. REPLACEMENT-ALLOWED contains the ASCII character Y (yes) to indicate that the object used can be replaced or deleted even if the using object (consumer) is still in the dictionary;...
  • Page 506 Dictionary Database Structure DICTRDF Fields Record RDF. File is "DICTRDF" Key-sequenced Code 205 Audit. 02 OBJECT Pic "9(9)" COMP Null 0 Display "[BZ]I10" Heading "Record/Number". 02 DEF-NUMBER Pic "9(9)" COMP Null 0 Display "[BZ]I10" Heading "Def/Number". 02 RECORD-LENGTH Type Binary 16 Heading "Record/Length".
  • Page 507 Dictionary Database Structure DICTRDF Fields 02 REFRESH Type Character 1 MUST BE "Y", "N" UPSHIFT Display "A1" VALUE "N" Heading "Refresh". 02 AUDIT Type Character 1 MUST BE "Y", "N" UPSHIFT Display "A1" VALUE "N" Heading "Audit". 02 BLOCK-SIZE Type Binary 16 VALUE 4096 Display "I4"...
  • Page 508 NUMBER contains the object number of the record itself. RECORD-LENGTH the length in bytes of the record. FILE-NAME this record's permanent HP file name, stored in FNAMECOLLAPSE form. For a description of FNAMECOLLAPSE, see the Guardian Procedure Calls Reference Manual. This field is defined only if FILE-DURATION is permanent.
  • Page 509 Dictionary Database Structure DICTRDF Fields FILE-TYPE contains a 1-character ASCII code that indicates the record's file type, as follows: Code File Type Unstructured Relative Entry-sequenced Key-sequenced FILE-DURATION a value that indicates whether the file specified by FILE-NAME is permanent, dynamically assigned, or temporary. FILE-DURATION values are: P (permanent) T (temporary) A (assigned)
  • Page 510 Dictionary Database Structure DICTRDF Fields BUFFER-SIZE buffer size of an unstructured file in bytes. BUFFER-SIZE redefines BLOCK-SIZE. Value must be 512, 1,024, 2,048, or 4,096 bytes; the default is 4,096 bytes. BLOCK-SIZE-OBJECT if block size is defined by a constant, contains the object number of the constant;...
  • Page 511: Dicttkn Fields

    Dictionary Database Structure DICTTKN Fields about even unstructured and odd unstructured files, see the File Utility Program (FUP) Reference Manual. DICTTKN Fields DICTTKN (Token Code File) is a key-sequenced file containing one record for each SPI token code. Each record contains the detailed information about a token code, including the object number of the token code, the object number of the associated token type, and the value of the token number that identifies the token code within its type.
  • Page 512: Dicttyp Fields

    Token numbers can be in the range -32,768 through 32,767. Any user-supplied token numbers must be in the range 1 through 9,998; the other token numbers are reserved by HP or are previously defined by SPI. TOKEN-NUMBER-CONSTANT if the token number is specified as a constant, this field contains the object number of the constant;...
  • Page 513 Dictionary Database Structure DICTTYP Fields 88 OCCURS-VARYING Value is -1. 88 OCCURS-0 Value is 0. 02 TOKEN-OCCURS-CONSTANT Pic "9(9)" COMP Null 0 Display "[BZ]I10" Heading "Occurs/Object". 02 STRUCTURE Type Binary 16 Heading "Structure". 02 TOKEN-LENGTH Type Binary 16 Unsigned Heading "Token/Length". Key is OBJECT-NUMBER Duplicates not allowed.
  • Page 514: Dictver Fields

    Dictionary Database Structure DICTVER Fields If TOKEN-OCCURS-VALUE is a positive integer in the range 1 through 254 and if a DEF IS clause was specified, the length from the definition (DEF) is multiplied by the OCCURS value and stored in TOKEN-LENGTH. If no DEF IS clause was specified, the TOKEN-OCCURS-VALUE is stored in TOKEN-LENGTH.
  • Page 515: Figure D-1. Sample Dictionary Schema For A Definition And A Record

    Dictionary Database Structure Definition and Record Storage in the Dictionary VERSION-CONSTANT if the version number was specified as a constant, this field contains the object number of the constant; otherwise, it is 0. BEG-ELEMENT contains the element number from DICTOBL for the first element specified in the sequence of fields with this version.
  • Page 516: Object Definition File

    Dictionary Database Structure Object Definition File entered into the dictionary, it is given the current value of NEXT-OBJ. NEXT-OBJ is then incremented by 1. NEXT-TEXT-ID is used by the DDL compiler to assign text numbers to text items as they are added to the dictionary. Like NEXT-OBJ, NEXT-TEXT-ID has an initial value of 1 and is incremented after a text item is entered into the dictionary.
  • Page 517: Object Text File

    Dictionary Database Structure Object Text File IDENTIFIER. IDENTIFIER.E LOCAL- PICTURE- HEADING- VALUE- OBJECT LEMENT NAME TEXT TEXT TEXT UPSHIFT standard- price location san- francisco Object Text File DICTOTF contains one record for each text item entered into the dictionary. Text items can have one of the following five types: Code Meaning...
  • Page 518: Key Definition File

    Dictionary Database Structure Key Definition File For the sample dictionary shown in Figure D-1 on page D-45, DICTRDF contains the following values: OBJECT: 2 DEF-NUMBER: 2 FILE-NAME: $data.sales.parts DICTRDF.OBJECT uniquely identifies each record by its object number. DICTRDF.DEF-NUMBER is equal to the object number of the record, unless it is defined with a DEFINITION IS def-name clause.
  • Page 519: Figure D-2. Main Links Among Dictionary Files

    Dictionary Database Structure Dictionary Structure Link Diagram Figure D-2. Main Links Among Dictionary Files Legend: **Primary Key *Alternate Key 02 next-object 02 next-text-id **02 object **02 object-number **02 object 02 token-type-object *02 identifier *02 def-number 03 obj-type 03 name 02 ssid-text 02 heading-text 02 display-text 02 comment-text...
  • Page 520 Dictionary Database Structure Dictionary Structure Link Diagram Data Definition Language (DDL) Reference Manual—426798-002 D -50...
  • Page 521: Using Enform Queries For Dictionary Reports

    Dictionary Reports HP supplies a set of Enform queries that you can use to get information about any DDL dictionary. These queries produce a set of reports that provide the following information: A list of all the objects in the dictionary, including any constants, definitions, records, and Subsystem Programmatic Interface (SPI) token codes, token maps, and token types.
  • Page 522 Dictionary Reports Using Enform Queries for Dictionary Reports Table E-1. Summary of Dictionary Reports Query Name Report Description DICTIONARY OBJECTS—R1 describes every constant, definition, record, token code, token map, and token type in the dictionary, giving the time and date of its creation, the time and date of its last modification, and its version number.
  • Page 523: Producing Dictionary Reports

    Dictionary Reports Producing Dictionary Reports Producing Dictionary Reports The Enform report queries use the DDL dictionary that describes the structure of the 14 dictionary files. This dictionary must be compiled before you can produce the Enform dictionary reports. For a description of this dictionary, see Appendix D, Dictionary Database Structure.
  • Page 524: Figure E-1. Creating A Dictionary For Ddschema

    Dictionary Reports Requesting Reports The DDQUERYS queries contain the following command: ?ASSIGN QUERY-COMPILER-LISTING to $NULL If you do not have a $NULL process on your system, or if you want to redirect this output, you can remove or change this line. Figure E-1 illustrates the creation of a dictionary for DDSCHEMA.
  • Page 525 Dictionary Reports Requesting Reports To select particular reports, you must run the Enform program in the interactive mode, specify the output device with the ?OUT command, and specify the reports you want with the ?SOURCE command; for example: 16> VOLUME $data.sales Establish $DATA.SALES as the default subvolume 17>...
  • Page 526: Figure E-2. Running Ddquerys To Produce Reports

    Dictionary Reports Requesting Reports Figure E-2. Running DDQUERYS to Produce Reports DDSCHEMA 21> DDL / IN $system.system. DDQUERYS ddschema / DICT $system.ddl $SYSTEM.SYSTEM ENFORM Run dictionary queries against dictionary on $DATA.SALES DICTOBL ..DICTALT $SYSTEM.DDL DICTDDF...
  • Page 527 Dictionary Reports Requesting Reports In the case of the sample database, the file name in the Enform OPEN statement in DDQUERYS is fully qualified by the current default volume and subvolume. For example: OPEN DICTOBL; Statement in DDQUERYS OPEN $data.sales.DICTOBL; Statement as executed VSTE05.vsd The same default volume and subvolume insertion takes place for every OPEN...
  • Page 528 Dictionary Reports Requesting Reports Data Definition Language (DDL) Reference Manual—426798-002 E- 8...
  • Page 529 Syntax Summary This appendix presents a summary of the syntax of the statements, statement clauses, and compiler commands that are used in DDL, as well as the TACL implied RUN command that launches DDL. DDL Run Command DDL [ / run-option [ , run-option ] ... / ] [ compiler-command [ , compiler-command ] ...
  • Page 530: Group Definition

    Syntax Summary Group Definition [ EXTERNAL clause ] [ HEADING clause ] [ HELP clause ] [ JUSTIFIED clause ] [ LN clause ] [ MUST BE clause ] [ NULL clause ] [ SPI-NULL clause ] [ [NOT] SQLNULLABLE clause ] [ TACL clause ] [ UPSHIFT clause ] [ USAGE clause ]...
  • Page 531: Reference Definition

    Syntax Summary Reference Definition [ MUST BE clause ] [ NULL clause ] [ { OCCURS clause [ { OCCURS DEPENDING ON clause } ] [ REDEFINES clause ] [ SPI-NULL clause ] [ [NOT] SQLNULLABLE clause ] [ TACL clause ] [ USAGE clause ] [ VALUE clause ] .
  • Page 532 Syntax Summary OUTPUT Statement OUTPUT Statement { CONSTANT { constant-name ... } } { DEF[INITION { def-name ... } { RECORD { record-name ... } OUTPUT { TOKEN-CODE { token-name ... } { TOKEN-MAP { map-name ... } { TOKEN-TYPE { type-name ... OUTPUT UPDATE Statement { CONSTANT constant-name ...
  • Page 533 Syntax Summary File-Creation Syntax File-Creation Syntax { [“] file-name [“] } FILE IS { TEMPORARY } [ creation-attribute ] ..{ ASSIGNED creation-attribute is: { KEY-SEQUENCED { RELATIVE { ENTRY-SEQUENCED } { UNSTRUCTURED [ AUDIT ] [ AUDITCOMPRESS ] [ BLOCK { block-length { constant-name } ] [ [ NO ] BUFFERED ]...
  • Page 534: Record Structure Syntax Summary

    Syntax Summary Record Structure Syntax Summary Record Structure Syntax Summary line-item specification ... [ 66 RENAMES clause . ] ... line-item specification is: { field-name } level-number { group-name } { FILLER { PICTURE clause } { TYPE clause [ AS clause ] [ DISPLAY clause ] [ EDIT-PIC clause ] [ HEADING clause ]...
  • Page 535 Syntax Summary SHOW USE OF Statement SHOW USE OF Statement { CONSTANT constant-name [,] ... SHOW USE [ OF ] { [ DEF[INITION] ] def-name [,] ... } { TOKEN-TYPE type-name [,] ... TOKEN-CODE Statement TOKEN-CODE token-name VALUE [ IS ] { token-number { constant-name } TOKEN-TYPE [ IS ] type-name [ SSID { “subsystem-id”...
  • Page 536: Definition And Record Statement Clauses

    Syntax Summary TOKEN-TYPE Statement TOKEN-TYPE Statement TOKEN-TYPE type-name VALUE [ IS ] { token-data-type } { constant-name { DEF [ IS ] def-name [ OCCURS { number } TIMES ] } { constant-name } { OCCURS VARYING [ DEF [IS ] def-name ] { OCCURS 0 TIMES DEFINITION and RECORD Statement Clauses AS Clause...
  • Page 537 Syntax Summary HELP Clause HELP Clause HELP { “help-text” } [ [ , ] “help-text” ] ... { constant-name } [ [ , ] constant-name ] JUSTIFIED Clause JUST[IFIED] RIGHT KEYTAG Clause KEYTAG { key-specifier } [ DUPLICATES [ NOT ] ALLOWED ] { constant-name } LN Clause { LN locale-name...
  • Page 538 Syntax Summary OCCURS DEPENDING ON Clause OCCURS DEPENDING ON Clause OCCURS min TO max TIMES DEPENDING ON field-name [ INDEXED BY index-name ] PICTURE Clause PIC[TURE] [“] {picture-string } [“] { national-picture-string } picture-string is: { X...[(length)] { A...[(length)] { 9...[(length)] { N...[(length)] { [S]9...[(length)[V[9...[(length)]]]] } { T[9...[(length)[V[9...[(length)]]]]...
  • Page 539 Syntax Summary TACL Clause TACL Clause { CRTPID { DEVICE { ENUM { FNAME { FNAME32 TACL { PHANDLE { SSID { SUBVOL { TRANSID { TSTAMP { USERNAME } TYPE Clause { data-type } TYPE { def-name data type is : { CHARACTER length { BINARY 8 [ UNSIGNED ] { BINARY [ 16 [ , scale ] ] [ UNSIGNED ]...
  • Page 540 Syntax Summary UPSHIFT Clause UPSHIFT Clause UPSHIFT USAGE Clause [ USAGE [ IS ] ] { COMP[UTATIONAL] { INDEX { COMP[UTATIONAL]-3 } { PACKED-DECIMAL VALUE Clause { VALUE [ IS ] value } [ LN clause ] { NOVALUE value is: { “character-string”...
  • Page 541 Syntax Summary 88 Condition-Name Clause 88 Condition-Name Clause 88 condition-name { VALUE [ IS ] { VALUES [ ARE ] } { value [ LN clause ] } [ , value { value { THROUGH } value } [ , value { THROUGH } value ] ... { THRU { THRU value is:...
  • Page 542: Compiler Commands

    Syntax Summary Compiler Commands Compiler Commands { ?C [ c-source-file [ ! ] ] } { ?NOC ?[NO]C00CALIGN ?[NO]CCHECK ?[NO]CDEFINEUPPER ?CENDIF ?CFIELDALIGN_MATCHED2 { ?CIFDEF identifier_name { ?CIFNDEF identifier_name } ?[NO]CLISTIN { ?[NO]CLISTOUT { ?CLISTOUTDETAIL } ?[NO]COBCHECK ?COBLEVEL [ base [ , increment ] ] { ?COBOL [ cobol-source-file [ ! ] ] } { ?NOCOBOL ?COLUMNS num...
  • Page 543 Syntax Summary Compiler Commands ?[NO]CTOKENMAP_ASDEFINE ?CUNDEF identifier_name ?[NO]C_DECIMAL ?[NO]C_MATCH_HISTORIC_TAL { ?DDL [ ddl-source-file [ ! ] ] } { ?NODDL ?[NO]DEFLIST { ?DICT [ dict-subvol-name ] [ ! ] } { ?NODICT ?DICTN [ dict-subvol-name ] [ ! ] ?DICTR [ dict-subvol-name ] ?DO_PTAL_OFF ?DO_PTAL_ON ?EDIT [ edit-file-name [ ;...
  • Page 544 Syntax Summary Compiler Commands { ?FORTRAN [ fortran-source-file [ ! ] ] } { ?NOFORTRAN ?[NO]FORTRANUNDERSCORE { ?FUP [ fup-source-file [ ! ] ] } { ?NOFUP ?HELP [ command ] ?LINECOUNT number ?[NO]LIST ?[NO]CLCONSTANT ?NEWFUP_FILEFORMAT ?NOFILEFORMAT ?OLDFUP_FILEFORMAT ?OUT [ listing-destination ] ?[NO]OUTPUT_SENSITIVE ?PAGE [ "listing-title"...
  • Page 545 Syntax Summary Compiler Commands ?[NO]PASCALNAMEDVARIANT { ?REPORT [ report-destination [ ! ] ] } { ?NOREPORT ?RESET ?[NO]SAVE ?SECTION section-name ?SETLOCALENAME [ locale-name ] ?SETSECTION [ section-name ] ?SOURCE source-name [ ( section-name [, section-name]... ) ] ?SPACING number-of-lines { ?TACL [ tacl-source-file [ ! ] ] } { ?NOTACL Data Definition Language (DDL) Reference Manual—426798-002 F- 17...
  • Page 546 Syntax Summary Compiler Commands { ?TACLGEN { ?TAL [ tal-source-file [ ! ] ] } { ?NOTAL ?[NO]TALALLOCATE ?TALBOUND { 0 } { 1 } ?[NO]TALCHECK ?[NO]TALUNDERSCORE ?TEDIT [ edit-file-name [ ; edit-parameter ] ... ] ?[NO]TIMESTAMP ?[NO]VALUES ?[NO]WARN ?WARNINGS [ max-warnings ] Data Definition Language (DDL) Reference Manual—426798-002 F- 18...
  • Page 547 Pathmaker and DDL The Pathmaker product is a NonStop™ Transaction Services/MP (NonStop™ TS/MP) application systems generator. When you start a Pathmaker project, the Pathmaker program installs a DDL dictionary for you as part of the application catalog, which is an integrated system directory for the Pathmaker project.
  • Page 548 Pathmaker and DDL Table G-1. DDL Features in the Pathmaker Environment (page 2 of 2) DDL Operation Pathmaker Action Manual Reference ?DDL Command The Pathmaker product cannot use DDL DDL Command source code created by the ?DDL command to page 9-42 rebuild a Pathmaker dictionary;...
  • Page 549: Ddl Alignment Rules

    DDL Alignment Rules This section provides information about alignment rules used by the DDL compiler when generating C code. The DDL compiler supports four types of alignment rules: Default alignment rules for C00 and later versions of the C compiler. To use these rules, specify the C00CALIGN compiler command.
  • Page 550: Noc00Calign Alignment Rules

    DDL Alignment Rules NOC00CALIGN Alignment Rules char x[3]; } ss2; char y; } s1; When C00CALIGN is in effect, DDL does not generate C output for a structure that contains one of the following: A substructure that begins on an odd byte boundary. Note.
  • Page 551: C_Match_Historic_Tal Alignment Rules

    DDL Alignment Rules C_MATCH_HISTORIC_TAL Alignment Rules C_MATCH_HISTORIC_TAL Alignment Rules When you specify the CFIELDALIGN_MATCHED2 compiler command, DDL uses the following alignment rules: If a substructure starts on an odd byte boundary or has an odd length, and refers to a previously defined structure, DDL inserts one or more fillers to word-align the substructure and make its length even.
  • Page 552 DDL Alignment Rules FIELDALIGN_SHARED8 Alignment Rules Data Definition Language (DDL) Reference Manual—426798-002 H- 4...
  • Page 553 CONSTANT statement, and you can refer to a constant value by name in other DDL statements. DDL (Data Definition Language). An HP product for defining data objects in Enscribe files and translating object definitions into source code for programming languages and other products on HP NonStop systems.
  • Page 554 If the file is to be key sequenced, a record also contains the key attributes. simple token. A token that has a single field or a fixed data structure. source code. Input to a language compiler or other HP product. SPI (Subsystem Programmatic Interface). Part of the Distributed Systems Management (DSM) environment.
  • Page 555 Index Numbers Assigned file 5-14 ASSIGNED file attribute 5-14 66 RENAMES clause Asterisk DEFINITION statement OUTPUT statement RECORD statement 5-21 TYPE clause 6-50 syntax 6-85 Attributes 88 condition-name clause definition and SQL data types 6-83 file creation 5-14 and SQLNULLABLE clause 6-40 AUDIT file attribute 5-15...
  • Page 556 Index CFIELDALIGN_MATCHED2 command 9-13 C alignment rules Character data definition C command PICTURE clause 6-26 C data structure TYPE clause 6-47 token map 7-19 Characters, special token type CIFDEF command 9-17 C source code CIFNDEF command 9-17 88 condition-name clause 6-86 Clauses 89 enumeration clause...
  • Page 557 Index OCCURS clause subscripts 6-22 See also Compiler commands purging with COBOL ! command 9-25 REDEFINES clause 6-32 summary of sectioning with SETSECTION syntax summary of F-14 command 9-96 uses for SIGN LEADING 6-29 Comments SIGN LEADING SEPARATE 6-29 dictionary SIGN TRAILING 6-29 controlling with CLISTOUT...
  • Page 558 Index COBLEVEL 9-24 NOCTOKEN_ASDFEFINE 9-31 COBOL 9-25 NOC_DECIMAL 9-35 COLUMNS 9-27 NOC_MATCH_HISTORIC_TAL 9-38 COMMENTS 9-28 NODDL 9-42 CPRAGMA 9-30 NODEFLIST 9-44 CTOKEN_ASDEFINE 9-31 NODICT 9-47 CUNDEF 9-34 NOEXPANDC 9-56 C_DECIMAL 9-35 NOFILEFORMAT 9-76 C_MATCH_HISTORIC_TAL 9-38 NOFORCHECK 9-62 9-42 NOFORTRAN 9-63 DEFLIST 9-44 NOFORTRANUNDERSCORE...
  • Page 559 Index See also Commands C source code COBOL85 source code SETLOCALENAME 9-95 definition SETSECTION 9-96 deleting SOURCE 9-98 existing SPACING 9-99 guidelines TACL 9-100 specifying in CONSTANT statement TACLGEN 9-103 figurative 9-103 88 condition-name clause 6-87 TALALLOCATE 9-106 MUST BE clause 6-17 TALBOUND 9-107...
  • Page 560 Index C_MATCH_HISTORIC_TAL DDL compiler commands command 9-38, See Compiler commands DDL dictionary database DICTCDF fields DICTDDF fields Data compression 5-16 DICTMAP fields D-11 Data definition DICTOBL fields D-12 character DICTODF fields D-28 PICTURE clause 6-26 DICTOTF fields D-31 TYPE clause 6-47 DICTOUF fields D-33...
  • Page 561 Index OUTPUT UPDATE statement BEGIN purging with DDL ! command 9-42 DISPLAY clause suppressing with NODDL EDIT-PIC clause command 9-42 uses for 1-10 error handling by 5-11 DDL source schema examples of 5-10 editing with EDIT command 9-52 EXTERNAL clause editing with TEDIT command 9-110 field definition...
  • Page 562 Index Dictionary generating with ENFORM 1-12, clearing with NOSAVE command 9-93 summary of closing with NODICT command 9-47 restrictions on comments saving with SAVE command 9-93 adding to source code 2-10 security, changing 10-14 controlling with CLISTOUT 9-20 showing usage of 8-11 generated by DDL 2-10...
  • Page 563 Index DEFINITION statement size defaults for 5-23 RECORD statement 5-19 size of 5-16 syntax EXTERNAL clause DEFINITION statement Elements in DDL dictionary ENABLE screen headings 6-10 syntax DEFINITION statement requirements for use of Field Enforced values, PATHMAKER 6-16 definition ENFORM DEFINITION statement display format examples of...
  • Page 564 Index label refreshing 5-17 suppressing with NOFORTRAN command 9-63 name 2-2, 2-3, 5-14 syntax checking with FORCHECK type command 9-62 defaults 5-23 VALUE clause 6-79 RECORD statement 5-15 FORTRANUNDERSCORE command 9-66 FILE IS clause 5-14 FUP command 9-66 File Utility Program FUP source code See FUP command file creation...
  • Page 565 Index PATHMAKER 6-11 suppressing with NOVALUES command 9-113 requesting with HELP command 9-69 VALUE clause 6-79 High-level data types 6-44 Interactive mode HIGH-NUMBER DDL compilation MUST BE clause 6-18 terminating session VALUE clause 6-81 Interprocess communication messages HIGH-VALUE(S) INTERVAL data type 6-49 MUST BE clause 6-17...
  • Page 566 Index definition and SQL data types 6-83 DEFINITION statement and UPSHIFT clause 6-18, 6-73 guidelines for using 5-10 DEFINITION statement RECORD statement 5-18 RECORD statement 5-20 record structure 5-24 syntax 6-16 RENAMES clause 6-85 LINECOUNT command 9-69 LIST command 9-70 Names Listing comments, control of 9-19...
  • Page 567 Index NOFORCHECK command 9-62 effects of using 6-20 NOFORTRAN command 9-63 ENSCRIBE alternate key 6-20 NOFORTRANUNDERSCORE 6-35 command 9-66 Numbers NOFUP command 9-66 Numeric constant NOLIST command 9-70 C source code Nonaudited dictionary COBOL85 source code moving to another subvolume 10-15 guidelines for rebuilding...
  • Page 568 Index and bit maps 6-56 sectioning with SETSECTION command 9-96 and SQLNULLABLE clause 6-39 subscript bounds 6-22 DEFINITION statement suppressing with NOPASCAL nested 6-22 command 9-84 RECORD statement 5-20 syntax checking with syntax 6-21 NOPASCALCHECK command 9-88 TOKEN-TYPE statement 7-3, syntax checking with PASCALCHECK OCCURS DEPENDING ON clause command...
  • Page 569 Index TACL data translation C-10 BUFFERED file attribute 5-15 TAL data translation C-12 BUFFERSIZE file attribute 5-15 Primary key, defining with KEYTAG CODE file attribute 5-16 clause 5-19, 6-13 COMPRESS file attribute 5-16 Punctuation condition-name clause 5-18 in commands 2-13 creation attributes 5-14 in statements...
  • Page 570 Index SERIALWRITES file attribute 5-17 DEFINITION statement sort field in 5-22 RECORD statement 5-21 SPI-NULL clause 5-20 syntax 6-85 syntax Repeated fields 6-21 REPORT command 9-90 file creation 5-14 Reports key assignment 5-21 dictionary 1-12 record structure 5-18 heading reference record 5-17 schema 1-12...
  • Page 571 Index sample database schema messages, defining sample SPI user subsystem null value 6-35 definitions B-10 null value, token map 7-16 sample ZSPIDEF.ZSPIDDL sample schema definitions standard definitions SECTION command 9-94 in token map definitions 7-19 Section name token code 7-11 DDL schema 9-94 token type...
  • Page 572 Index TOKEN-CODE statement TOKEN-MAP statement 7-14 TACL clause Statements DEFINITION statement CONSTANT 4-1, RECORD statement 5-20 constant definition syntax 6-44 data structure definition TACL command 9-100 DEFINITION 5-1/5-11 TACL data structure dictionary manipulation token map 7-19 RECORD 5-12/5-27 token type record definition TACL source code rules for entering...
  • Page 573 Index TYPE clause ENUM data type 6-52 BINARY data type 6-51 VALUE clause 6-79 ENUM data type 6-52 TALALLOCATE command 9-106 TALBOUND command 9-107 VALUE clause 6-79 TALCHECK command 9-108 TACLGEN command 9-103 TALUNDERSCORE command 9-110 TAL command 9-103 TEDIT command 9-110 TAL data structure TEMPORARY attribute...
  • Page 574 Index host-language data structures 7-18 UNSTRUCTURED file attribute 5-15 Uppercase characters, forcing 6-73 naming conventions 7-19 UPSHIFT clause structure 7-16 and MUST BE clause 6-18 number and REDEFINES clause 6-32 TOKEN-CODE statement and VALUE clause 6-82 TOKEN-MAP statement 7-14 DEFINITION statement type RECORD statement 5-20...
  • Page 575 Index specifying in CONSTANT statement TACL source code TAL source code VERSION option, TOKEN-MAP statement 7-15 WARN command 9-115 WARNINGS command 9-115 ZERO(S) MUST BE clause 6-17 VALUE clause 6-80 ZSPIDEF.ZSPIDDL sample definitions SPI standard token codes 7-11 SPI standard token types Special Characters * (asterisk) OUTPUT statement...
  • Page 576 Index Special Characters Data Definition Language (DDL) Reference Manual—426798-002 Index -22...

Table of Contents