The Schema DDL is compiled with the aid of the DDL compiler; it has to be assigned to the compiler as an input file.
On completing the compilation, the DDL compiler stores the schema description in the DBCOM (database compiler realm).
On the basis of this information, the subsequent BGSIA utility routine creates the SIA and stores it in the DBDIR (database directory).
Once an SSL description has been created, the compiled schema description in the DBCOM forms the basis for further processing by the SSL compiler and the BGSIA utility routine.
If no SSL description has been created, the schema description in the DBCOM is complete.
The DDL compiler also creates the COBOL subschema directory (COSSD), which stores information for the COBOL compiler. This information is needed for generation of the DB application programs. The actual contents of the COSSD are not generated until the Subschema DDL is compiled.
When required, the DDL compiler automatically extends the DBDIR and DBCOM of the database being processed or the DBTTs of the record types in the DBDIR and DBCOM. For details,
please refer to the "Database Operation" manual, Automatic realm extension by means of utility routines.
At startup the DDL compiler takes into account any assigned UDS/SQL pubset declaration (see the "Database Operation" manual, Pubset declaration job variable). Faulty assignment leads to the program aborting.
During execution the DDL compiler uses the linked-in DBH.
Figure 9: System environment for Schema DDL compilation
Compiler statements:
The DDL compiler is used to compile both the Schema DDL and the Subschema DDL; the SSL, on the other hand, is compiled by the SSL compiler.
The following table is a list of compiler statements for:
the Schema DDL, marked with DDL
the Subschema DDL, marked with SDDL
the SSL, marked with SSL.
Statement | Compiler | Default | Meaning |
| DDL | NO | optional; |
| DDL | YES | optional; |
| DDL | - | not required for inputs in interactive mode or if SYSDTA is assigned as the input file - in this case, it should be noted that all the statements, (at least END) must be entered first followed by the actual source. assigns the compiler the file containing the Schema DDL/Subschema DDL/SSL. lib: name of program library SYSDTA is switched to the input file. It is reset to SYSCMD upon completion of the compiler run. |
| SDDL | - | optional; The “SUBSCHEMA FORM IS OLD” statement causes the transformed subschema and the check table (CHECK-TABLE) to be entered in A subschema can be compiled to a format compatible with UDS/SQL V1.2 only if the following conditions are satisfied:
Otherwise, the DDL compiler aborts with syntax errors, and the subschema is not entered in the DBCOM and COSSD. |
| SDDL | NO | optional; In the IMPLICITLY-DEFINED-DATA-NAMES structure a field REC-REF PIC S9(4) BINARY is defined. For each record reference a condition name (level number 88) is assigned to this field, which matches the following pattern: NO This statement is effective only for the generating of subschemas. When generating schemas the statement is ignored. |
| DDL | - | optional; schema-name: name of schema The “SOURCE IS“ and “DELETE SCHEMA“ statements must not be used within the same DDL compiler run. |
| SDDL | - | optional; ONLY If the parameter is specified, any SOURCE statement is ignored. subschema-name: name of subschema Both names have to be given in single quotes |
| DDL | NO | optional; YES NO |
| DDL | - | Retroactive creation of COSSD. N.B.: |
| SDDL | - | admissible only after restructuring with BALTER. |
| SDDL | NO | only meaningful in conjunction with COMPARE |
| DDL | DOUBLE | either; |
| DDL | - | mandatory; |
Table 12: Compiler statements for the Schema DDL/Subschema DDL/SSL
Command sequence for compiling the Schema DDL
It is assumed for the command sequence described here that UDS/SQL was installed with IMON (see section "START commands for the UDS/SQL programs").
| |
01 | See section “Setting up COSSD” in chapter "Setting up the compiler database". |
03 | The version-dependent module of the linked-in DBH of the relevant version is loaded dynamically (see section "Compiling, linking and loading UDS/SQL-TIAM application programs" in the "Application Programming" manual). |
04 | The DBH requires the DB status files. If the database name contains more than 8 characters, only the first 8 characters of the database name may be specified for dbname. |
05 06 | The UDS/SQL utility routine can also be started with the alias DDL. The individual statements can be entered in one line if they are separated by commas or blanks. |
Example
/CREATE-FILE FILE-NAME=TRAVEL.COSSD,SUPPORT=PUBLIC-DISK(SPACE=RELATIVE - / (PRIMARY-ALLOCATION=30,SECONDARY-ALLOCATION=10)) /CREATE-FILE FILE-NAME=TRAVEL.DBSTAT,SUPPORT=PUBLIC-DISK(SPACE=RELATIVE - / (PRIMARY-ALLOCATION=24,SECONDARY-ALLOCATION=48)) /CREATE-FILE FILE-NAME=TRAVEL.DBSTAT.SAVE,SUPPORT=PUBLIC-DISK(SPACE=RELATIVE - / (PRIMARY-ALLOCATION=24,SECONDARY-ALLOCATION=48)) /ADD-FILE-LINK LINK-NAME=DATABASE,FILE-NAME=TRAVEL.DBDIR ***** START DDLCOMP (UDS/SQL V2.9 1801 ) 2019-01-29 09:26:53 * DDLCOMP: INPUT SYSTEMPARAMETERS SOURCE IS 'S.TRAVEL.DDL' END * DDLCOMP: READ SCHEMA/SUBSCHEMA % UDS0215 UDS STARTING UDS/SQL V2.9 (LINKED-IN), DATE=2019-01-29 (ILL2038,09:26:53/4TE7) % UDS0746 UDS PUBSET DECLARATION (CURRENT) FOLLOWS (ILL1746,09:26:53/4TE7) 4TE7: UDS-PUBSET-JV: :IUDS:$XXXXXXXX.PUBSDECL.PUBS 4TE7: PUBSETS: IUDS 4TE7: DEFAULT PUBSET: IUDS 4TE7: ------------------------------------------ * DDLCOMP: START SCHEMA-PHASE * DDLCOMP: CHECK SCHEMA RULES * DDLCOMP: CHECK DATA ALLOCATION * DDLCOMP: SEMANTIC TEST * DDLCOMP: CYCLUS TESTS * DDLCOMP: ERROR DIAGNOSTIC * DDLCOMP: NO ERRORS IN SCHEMA-PHASE * DDLCOMP: CREATE FILE COSSD * DDLCOMP: NO ERRORS DETECTED % UDS0758 NUMBER OF DML-STATEMENTS AND I/O COUNTERS PER DATABASE (ILL1758,09:26:54/4TE7) 4TE7: DATABASE NAME DMLS LOG READ PHYS READ LOG WRITE PHYS WRITE 4TE7: ----------------------------------------------------------------------- 4TE7: TRAVEL 1394 4046 67 1760 45 % UDS0213 UDS NORMAL SYSTEM TERMINATION WITH ************1394 DML-STATEMENTS 2019-01-29 (ILLY033,09:26:54/4TE7) ***** DIAGNOSTIC SUMMARY FOR DDL-SCHEMA TRAVEL-AGENCY NO ERRORS +++++ 8 WARNINGS ***** END OF DIAGNOSTIC SUMMARY ***** NORMAL END DDLCOMP (UDS/SQL V2.9 1801 ) 2019-01-29 09:26:54