Open topic with navigation
The Generate Repository Schema utility generates a Synergy Data Language description of your repository to a file. This description is referred to as a schema. See Synergy Data Language for more information about Synergy Data Language and possible uses for a repository schema file.
You can also run this utility from the command line. See rpsutl utility.
|1.||Select Utilities > Generate Repository Schema. The default repository filenames displayed are determined by the logic discussed in Determining the repository files used.|
|2.||Enter data in each field as instructed below.|
Repository main file
Enter or select the name of the repository main file from which a schema should be generated.
Repository text file
Enter or select the name of the repository text file from which a schema should be generated.
Enter the name of the file into which the repository schema should be generated. If you don’t specify an extension, it defaults to .ddf. By default, the file is created in the current working directory.
Indicate whether you want to generate a schema for all definitions in the repository or for specific (selected) definitions. Selecting Specific enables you to generate schema for a specific format, enumeration, template, structure, file, or any combination thereof.
If you select All, the generated schema file will be valid for use by the Load Repository Schema utility. The Specific option could result in a Synergy Data Language file that contains duplicate definitions or missing (referenced) definitions, and which therefore may not be valid for use by the Load Repository Schema utility. See General usage rules for a description of the allowed structure of a repository schema file.
When selecting specific definitions, you can enter a partial name combined with wildcard characters (* or ?) to specify a set of definitions.
For the Format, Enumeration, Template, Structure, and File fields, you can select from a list of definitions by selecting Utility Functions > List Selections.
Generate structure timestamps
Select this option to include the date and time that each structure definition was last modified. This option adds the MODIFIED keyword to each generated structure definition. If you manually edit the schema, you should update this value for any structures that you change. See STRUCTURE for more information.
If you selected Specific in the Option field, enter the name of a format definition to generate.
If you selected Specific in the Option field, enter the name of an enumeration definition to generate.
If you selected Specific in the Option field, enter the name of a template definition to generate.
If you selected Specific in the Option field, enter the name of a structure definition to generate. This can be the name of an alias structure, but you must type it in, rather than select it using the List Selections option.
Keys, Relations, Aliases
If you selected All in the Option field or selected Specific and specified a structure name, indicate whether you want to generate the keys, relations, and aliases. By default, all definitions associated with a structure are generated; clear the check boxes for those you do not want generated.
If you selected Specific in the Option field, enter the name of a file definition to generate.
Structures, Keys, Relations, Aliases
If you selected Specific in the Option field and specified a filename in the File field, indicate whether you want to generate the file’s assigned structures as well. If you select Structures, all definitions associated with each assigned structure are generated by default; clear the check boxes for Keys, Relations, and Aliases if you do not want to generate those definitions.
To set these options when you want to generate all files, select Specific in the Option field and enter “*” in the File field.
|3.||Exit the window to generate the repository schema.|
As the repository schema is being generated, status messages are displayed in the lower-left corner of the window. When processing is complete, a message that lists the number of each type of definition generated is displayed.
|4.||To return to the Utilities menu, press enter.|
The output file generated by this utility includes a header that lists the name and version of the repository being generated, the date and time the utility was run, and information about the export options that were chosen. Possible export options include the following:
Additionally, the [ALL], [STRUCTURE], and [FILE] options may include abbreviations relative to the generated output. Possible abbreviations include the following:
-K = Exclude keys
-R = Exclude relations
-A = Exclude aliases
+S = Include assigned structures
For example, if you select All in the Option field and clear the default Keys setting, the information in the export options line in the output file would look like this:
; EXPORT OPTIONS : [ALL-K]
If you select Specific in the Option field, specify the file definition name CUSTOMER, and choose to generate its assigned structures but not their aliases, the export options line would look like this:
; EXPORT OPTIONS : [FILE+S-A=CUSTOMER]
The file below is an example of the Synergy Data Language output generated by the Generate Repository Schema utility when the All option is selected.
; SYNERGY DATA LANGUAGE OUTPUT ; ; REPOSITORY : RPSDAT:rpsmain ; : RPSDAT:rpstext ; : Version 9.1 ; ; GENERATED : 06-AUG-2009, 13:23:30 ; : Version 9.1.5 ; EXPORT OPTIONS : [ALL] Format STD_ID Type NUMERIC "ZZ-Z" Template DIG8DATE Type DATE Size 8 Stored YYYYMMDD Description "8-digit date" Date Today Date Short Structure EMPLOYEE DBL ISAM Description "Employee master file" Field EMP_ID Type DECIMAL Size 3 Description "Employee ID" Report Just LEFT Format STD_ID Break Required Paint "*" Field EMP_NAME Type ALPHA Size 25 Description "Employee name" Info Line "Enter your full name." Field EMP_DEPT Type DECIMAL Size 2 Description "Department ID" Report Just LEFT Field EMP_MNGR Type DECIMAL Size 3 Description "Manager ID" Report Just LEFT Field EMP_TITLE Type ALPHA Size 25 Description "Title" Uppercase Field EMP_DATE Template DIG8DATE Description "Starting date" Field EMP_STATUS Type ALPHA Size 1 Description "Employee status" Selection List 2 2 3 Entries "A", "I", "V" Key EMPLOYEE_ID ACCESS Order ASCENDING Dups NO Segment FIELD EMP_ID Structure ORDER DBL ISAM Description "Sales order management" Field ORD_ID Type DECIMAL Size 6 Description "Order ID" Report Just LEFT Break Noterm Blankifzero Field ORD_ITEM Type DECIMAL Size 3 Description "Order item (product ID)" Report Just LEFT Range 1 100 Field ORD_DATE Template DIG8DATE Description "Order initiated date" Field ORD_SUB Type DECIMAL Size 2 Dimension 2:2 Overlay ORD_DATE:0 Description "Order date subscripted" Report Just LEFT Field ORD_STATUS Type ALPHA Size 1 Description "Status" Allow "O", "S", "B" Field ORD_DESC Type ALPHA Size 40 Description "Status description" Key ORDER_ID ACCESS Order ASCENDING Dups NO Segment FIELD ORD_ID Key PRODUCT_ID ACCESS Order ASCENDING Dups YES Segment FIELD ORD_ITEM Structure PRODUCT DBL ISAM Description "Product management" Format MONEY Type NUMERIC "$######.##" Justify RIGHT Field PRDT_ID Type DECIMAL Size 3 Description "Product ID" Report Just LEFT Format STD_ID Prompt "ID: " Break Required Field PRDT_NAME Type ALPHA Size 25 Description "Product name" Prompt "Name: " Uppercase Field PRDT_PRICE Type DECIMAL Size 8 Precision 2 Description "Product price" Report Just LEFT Format MONEY Prompt "Price: " Nodecimal Blankifzero Field PRDT_MNGER Type DECIMAL Size 3 Description "Product manager ID" Report Just LEFT Field PRDT_DATE Template DIG8DATE Description "Product available date" Field PRDT_STATUS Type ALPHA Size 1 Description "Prdt portability status" Prompt "Status: " Allow "A", "D", "O", "I" Field PRDT_DESC Type ALPHA Size 40 Description "Status description" Prompt "Description: " Key PRODUCT_ID ACCESS Order ASCENDING Dups NO Segment FIELD PRDT_ID Key PRDT_MANAGER_ID ACCESS Order ASCENDING Dups YES Segment FIELD PRDT_MNGER Relation 1 PRODUCT PRODUCT_ID ORDER PRODUCT_ID Relation 2 PRODUCT PRODUCT_ID EMPLOYEE EMPLOYEE_ID File EMPLOYEE DBL ISAM "DAT:employee.ism" Description "Employee master file" Assign EMPLOYEE File ORDER DBL ISAM "DAT:order.ism" Description "Sales order management file" Assign ORDER File PRODUCT DBL ISAM "DAT:product.ism" Description "Product management file" Assign PRODUCT