Using the Script-to-Repository conversion utility (scridl)
The scridl utility helps you move field information from existing script files into a repository. Conversion is a two-step process:
1. | Run the scridl utility to generate a Synergy Data Language file. |
2. | Update an existing repository using Repository’s Load Repository Schema utility. |
Running scridl
Scridl creates a Synergy Data Language file containing input field information extracted from the script file. Non-input windows, such as .WINDOW and .COLUMN, are ignored.
If your .INPUT window scripts do not contain .STRUCTURE statements, you must add them so that scridl knows which structure to add/update in the repository. |
1. | Run scridl on your script file, using the syntax in the table below. |
On… |
Do this… |
---|---|
Windows and Unix |
At a command prompt, enter dbr WND:scridl |
OpenVMS |
At a command prompt, enter run WND:scridl |
An input window is displayed on the screen. (See figure 1.)
2. | Specify the names of the target repository main file and text file in the fields provided. |
3. | In the Script file field, specify the name of the existing script file. |
A new script file is generated with a .new extension. This file references the structures in the repository above. (Repository filenames are added only if they override the default filename.)
A Synergy Data Language file is generated with an .sdl extension. If errors occur during the conversion, an error log file is created with an .err extension. (See Errors during conversion.) All of these files inherit the name of the original script file but with different extensions.
4. | Specify whether you want to update the existing repository structures. |
Select Yes if you want scridl to update any existing repository structures that have the same names as structures in your script file. (This comparison is not case sensitive.) For each matching structure, scridl will do the following:
- Add appropriate .REPOSITORY_STRUCTURE statements to the output script file. (The contents of the repository file override the defaults.)
- Remove .STRUCTURE statements.
- Add .LOCAL statements for fields not contained in repository structures.
- Generate errors if fields within an existing structure are not found in the corresponding repository structure or if the type, size, dimension, or position in the structure of those fields do not match the repository specification.
If all of these tests pass, all the other script qualifiers for this field will be copied to the Synergy Data Language repository field specification and removed from the output script specification. (Exceptions to this rule are the formats for date- and time-type fields.)
Select No if you want scridl to ignore structure names that already exist in the repository. The output script remains unchanged for these structures.
5. | Specify whether you want to create new repository structures. |
Select Yes if you want scridl to do the following when it encounters structure names that are not in the repository:
- Create the structure names in the Synergy Data Language output file.
- Add the appropriate .REPOSITORY_STRUCTURE and .LOCAL statements to the output script file. (Repository filenames are added only if the contents of the file override the defaults.)
- Remove the .STRUCTURE statements.
- Use .FIELD statements for fields contained in those structures to create Synergy Data Language output in order to generate those fields.
- Remove output script qualifiers (except for date- and time-type fields, which remain in the script).
Select No if you want scridl to ignore any new structure names not already in the repository. The output script remains unchanged for these structures, even if it refers to these new names.
6. | Use the Synergy Data Language file (filename.sdl) to update an existing repository. See Load Repository Schema utility for complete instructions. |
When the Load Repository Schema utility prompts you to merge the schema, select Yes. You then will be prompted for how to handle new and existing definitions found in the file: Select Yes at the “Add new?” prompt, and select Overlay at the “Change existing?” prompt.
If any errors occur while running scridl, they are logged in the error log file (script_filename.err), and a message is displayed on the screen indicating the number of errors found.
The same message is also written to the end of the Synergy Data Language output file (script_filename.sdl) and the script output file (script_filename.new), to prevent compiling of these files from occurring without modification. We recommend that you review scripts before converting and review the output Synergy Data Language and script files before using them.