Edit
Use the Edit Script option to create or edit Database Conditions (.dcf
) or Database Generation Language (.dbg
) script files using a normal text editor. A script file is an ASCII file containing a list of conditions and expressions. When the file is run (executed) the conditions and expressions are applied to the database.
The format for a .dcf
script file is:
<comment> if <condition> then <statement> elseif <condition> then <statement> else <statement> <field> = <expression> endif
For Database Conditions scripts (.dcf
), a list of available operators/functions is provided in Appendix B of the Vulcan Core documentation. Appendix E gives you information on the format of a script file plus any commands that can be used in the file.
For Database Generation Language (.dbgl
), refer to the user documentation.
The script must finish with a carriage return. Scripts are not case sensitive. You can use either upper or lower case characters, or a combination of characters.
Instructions
On the Utilities menu, point to Script, and then click Edit to display the Select Database Script panel.
Use this panel to select the script that you want to edit.
Script File
Select the script file that you want to edit. The drop-down list contains all .dcf
and .dbg
files found in your current working directory. Click Browse to select a file from another location.
To create a new file, enter the file name and file extension.
Click OK.
A text editor will be opened. The text editor displayed depends upon both your operating system and whether you have set the EDITOR
environment variable. The default editor for Windows is Notepad. You can use the EDITOR
environment variable to reference a different text editor.
Edit and save your script. Use the Run option to run scripts.
Below is an example of a .dcf
script.
If (lith eqs "tq1") then sg = 1.86 elseif (lith eqs "tqla") then sg = 2.93 elseif (lith eqs "tq2") then sg = 2.86 elseif (lith eqs "tq3") then sg = 1.96 elseif (lith eqs "tq7") then sg = 2.45 Endif