The program is used for interactive editing of the arbitrary tables of the local database. The following possibilities are provided:
The program can be used for changing of the contents of the LDB tables and headers of traces obtained as a result of operation of any programs of the packet. The tables and modifications created by the program are suitable for usage in applications and system programs of the packet.
The program allows to delete the LDB tables, modifications and lockings created by any program of the packet.
As the program allows to solve the various problems on managing the local database, below is given the description of standard operations which are most important.
Main objects of interactive operation are the main window of the LDB editor and the windows of the graphics and table editors.
The main window is the controlling center. The main full-table operations are accessible via it. It is used also for selection of the operative project.
The table and graphics editors can be used both separately and together. In the second case their contents will automatically be synchronized. The program allows to run only one window of the table and one window of the graphics editor. In all cases the same LDB table is edited.
Attention! All operations of editing of the current table are carried out in the RAM. For saving results of editing to disk it is necessary to make appropriate operations (see item 3.1.1.5). Only already created tables are automatically saved (see item 3.1.1.1). If the contents of the opened table have changed (as a result of operation of other program), and the user wants to edit a new variant, it is necessary to close the table (menu item of the main window File - > Close dbt), having lost the made changes, and then to open it repeatedly.
At operations on disk (creation, opening, deleting, junction, saving with other name, export), it is necessary to take into account, in what project the operation will be made. At the moment of opening (or creation) of the LDB table it is linked to the current project. Later it is possible to change the current project. That gives the following possibilities to the user:
Further the last selected project is called current. The project is considered operative, if it includes the currently opened LDB table.
All full-table operations are defined for the project, therefore it is necessary to define the current project before any of them. It is done by selection of the menu item of the main window File - > Project.
It is carried out by selection of the menu item of the main window File - > Create dbt. The user is offered to select the type of the created table from the list, and then to set a name of the table. Thus it is necessary to take into account the distinctions in names of the data tables and the list tables.
If any table is already opened in the editor, it should previously be closed (menu item of the main window File - > Close dbt), with saving the results of editing if it is necessary.
The data table has a name of a type VSP.wellname.sp. TABLETYPE.mod, where wellname is a name of the well, which concerns the created table (character name consisting of latin characters, digits, underline and minus signs), sp - number of the shot point which concerns the created table (non-zero positive number not greater than 9999) relates, TABLETYPE - the type of the table (is forbidden to change), mod - number of the table used to distinguish one table of the given type from another (non-zero positive number not greater than 9999).
The list tables have a name of a type VSP.TABLETYPE, and as a rule TABLETYPE is finished with LIST (for example, FBLIST). Thus, there can not be two different list tables of one type in the project.
It is carried out by selection of the menu item of the main window File - > Open dbt. Further in a submenu suggests the way of selection of the table and mode of opening (only to view view only or to change modify). There are several ways of selection of the table:
It is the most preferable way of loading data, because the user sees the additional descriptive information describing table during selection of the table from the list. The name of the list table usually starts by the same characters, as the name of the data table, and is ended by a word LIST. For example, the list table of hodographs has a name VSP.FBLIST, and the data tables, references to which are stored in the list have the names VSP.*.*.FBINFO.*.
If any table is already opened in the editor, it should previously be closed (menu item of the main window File - > Close dbt), the results of editing can be previously saved.
It is carried out by selection of the menu item of the main window File - > Delete dbt. Further in a submenu the way of selection of the object of the data which is to be deleted is offered to the user. Available ways:
In the first case the user first selects the list table from among accessible in the project, and then selects the line in this table. First the line selected from the table list is deleted, and then the table, to which this line refers to (value of the pointer in column DTBSPTR).
In the second case the user simply selects a name of the table, which he wants to delete.
It is carried out by selection of the menu item in the window of the table editor File - > Merge dbt. Further in a submenu the path of selection of the table from the list table (item from list) or from all tables of the current project (item as file) is offered to the user. Contents of the selected table line by line is added in the end of the table which is edited. It is not taken into account what columns were selected for editing.
Two variants of saving of contents of the table are possible:
If the opened LDB table is modification, number of traces and their order in modification after saving will not vary despite of the changes, done by the user.
It is necessary to point out, that the name and operative project of the current table will not vary. But to change the current project, the changes will be saved to it. So it is possible to copy the LDB tables and modifications in other project.
Besides, if the opened table is the headers of modification, during copying the traces in new modification will go in the same order, in which they were arranged by the user. If the user has deleted or created lines during editing, this will change the number of lines in new modification in comparison with initial. The bodies of traces will correspond to traces in the initial modification taken according to indexes INDEX (see the description of a special field INDEX).
After the table is opened or created, to make changes to it, it is necessary to select columns for editing. It is done for localization of attention of the user, because there can be many columns in the applied tables and simultaneous work with them all can be inconvenient.
In a working area of the main window of the program there are two lists designated Unselected columns and Selected columns accordingly. Immediately after opening the table the left list contains names and types of all columns of the opened table, and the right list is empty. With the help of the controlling buttons, located between lists, the user can move columns from the left column in right and back. The columns which have appeared in the right column are considered selected for editing. With the help of the button Arg- > the user should select a column of argument among them. The column of argument is marked in the right list with the Arg symbol. This column is considered argument, while all other columns are considered the functions of this argument. For example, in the case of loading the table of a first break hodograph it will be logical to choose ZOP (depth of a point of reception) as an argument.
For saving contents of the table in a text file it is necessary to select the menu item of the window of the table editor File - > Export - > ASCII file. In the appeared dialog box it is necessary to set a name of an output file (button Select or text field to the left of it). Depending on designation of a target text file it is possible to customize with the help of the resources, represented in the dialog box.
Two variants of customization are most typical:
If the target text file is supposed to be used in MS DOS, MS Windows or MS Windows NT, it is possible to switch an option DOS text file convensions. In this case text file will be correctly read by all programs in indicated operating systems.
In the case when some programs were terminated incorrectly and have not released the data objects locked for operation and the objects, disabled for operation, it is necessary to remove lockings further operation with them. It can be made with the help of the dialogue panel called by the menu item File - > Delete dbt - > lock.
The lockings can be exclusive Exclusive (eliminating any access to the object) and sharable Sharable (permitting to have reading access for several programs).
The exclusive lockings are very short during normal operation of the programs - their time of life, as a rule, is less than second. If such locking lives longer, most likely it is the hung up locking and it will prevent access to the object of the data. It should be deleted manually.
The sharable lockings exist as long as the program carries out access to the data. Attention! If to delete the sharable locking while the program continues to use the object of the data, it can result in loss of the data.
In the table editor (it is called by selection of the menu item Edit - > Table editor of the main window of the program) it is possible to edit arbitrary columns of the LDB tables (according to the common limitations stated in item 4.2). The table editor is more powerful from the point of view of valid operations and their generality in comparison with graphics editor.
From the window of the table editor the export of the data to a text file and association of the one-type LDB tables data is carried out.
In the table editor (in contrast to the graphics editor) it is possible to change the number of lines in the table and contents of each cell.
The most left column of the table editor is the column of column - argument (see item 3.1.1.6), and other columns go in the order of the list Selected columns.
If in the the text and graphics editors are simultaneously started in the program, in a text editor the operations changing number of lines and a column of argument are prohibited. Besides at the moment of start of the graphics editor the LDB table is sorted by increase of value in column of argument.
Is outlined by a frame and in it contains a text cursor. It is possible to replace cell by pointing the new cell by the mouse and pressing the 1-st mouse button, or with the help of the keyboard, moving frame from cell to cell. Moving of a frame of the current cell up and down is carried out by appropriate arrows on the keyboard. Moving to the right - Tab key, to the left - simultaneous pressing of Shift and Tab.
If the new value, entered into cell, was entered with mistake and the user had no time to press Enter or to leave cell, it is possible to return to the previous value by pressing the key Esc.
If the value is too big for the cell and its part is visible only, the user can expand this column. For this purpose it is necessary to press the Shift key on the keyboard and 2-nd (average) mouse button while the mouse pointer should be on a vertical line of the right boundary of a column. At the moment of pressing the mouse pointer will change and user can change width of a column. After that the mouse button can be released and the column will accept desirable width.
The last line of the table editor in the mode of changing of number of lines (when the graphics editor is not started) has a special index New and is used for input of new line. As soon as even one cell in this line receives the syntactically correct value (number - in numerical column, line - in character column), indicated name - in the column of pointer on the LDB table), the line is added to the table, receiving the next index, and the empty line with an index New appears below.
For realization of the group operations there is a possibility to select the necessary table line. For this purpose it is necessary to press simultaneously the Ctrl key and the 1-st (left) mouse button. Thus the mouse pointer should be on selected line. The repeated operation cancels selection.
The pressing of 3-rd (right) mouse button in a field of the table editor calls the pop-up menu of basic operations named ROWS, because the operations are done with the table lines.
The insert is carried out before the line of the current edited cell. The operation Insert inserts one line, and Insert # inserts a set number of lines. The cells of inserted lines are filled with the default values. For numerical columns it is zero, for character it is empty line, for the pointers it is empty pointer " VSP.... ".
Attention! The cells in the table columns which were not selected for editing, get the default values too.
The operation Delete is used for deleting of lines from the table. If there are selected lines in the table, they are deleted. If such lines are not present, the line from current edited cell is deleted. The new line New cannot be deleted.
The operation Duplicate # is used for reproduction of line from current edited cell the indicated number of times. The ordered number of copies of current line is inserted into the table.
Attention! The values only in the cells of columns selected for editing are duplicated! Other columns of the multiplied lines will contain the default values.
For convenient selection of lines the following operations are used:
For execution of group arithmetic operations on values in the numerical columns of the table there is a specialized calculator called by selection of the menu item Tools - > Calculator in the window of the table editor.
The calculator allows to apply the formula y=x*A+B to the set table lines. There are following options for selection of lines:
Depending on the requirements the formula y=x*A+B can change. In this formula y designates a target table column, x - the argument of the operation (it is not necessary a column of argument!), A, B - constants.
The variants of the formula are set by selection of argument.
The values of a target column y are obtained by linear conversion of the (A, B) values of the initial column x.
The values of a target column y vary according to the linear law (A, B).
The number B is assigned to the values of a target column y.
The values of a target column y are generated under the linear law from the number of selected or chosen by value of argument line i from above downwards. In the mode All rows the number is the index of line i It is counted from 1.
During usage of the calculator there is a possibility to undo changes made by the last operation. The given option is called by the button Undo of the dialog box of the calculator.
For the convenient input of values in cells with the double click of 1-st (left) mouse button the dialog box permitting to select value from the list is called. The given possibility is present for character columns and columns of the pointers.
If it is required to sort the table lines by values in the columns, it is possible to use an available resource, which is called by selection of the menu item Edit - > Sort lines in the window of the table editor. The dialog box appears on screen.
In the dialog box the user can set from one to three rules of sorting. For selection of a rule it is necessary to select a column, in which the sorting will be made and to specify, how the values will be sorted: on increase or on decrease.
The rules of sorting are ordered according to the priorities: the greatest weight has the first rule (table lines are sorted according to it). Inside the groups of lines with identical values in the column of first priority the sorting is made according to a rule of the second priority. For a rule of the third priority a way of ordering by analogy to a rule of the second priority.
If it is required to arrange lines according to one criterion only, the second and third priority buttons should be released. This mode is used as default.
The graphics editor is intended for visualization and visual editing of numerical columns of the LDB table columns. It is called by selection of the menu item Edit - > Graphics editor of the main window of the program.
The graphics editor has a number of the requirements and limitations described here. Because of these limitations it can not be used for editing of the arbitrary columns.
The working area of the graphics editor represents a field with the scales on which the curves are visualized. The vertical axis is the axis of the argument. Each curve is painted with colour and has its own scale. A scale of argument is in black colour.
In the graphics editor the concept of an active curve is present. This curve is thicker than the others and the nodes are shown on it.
The mouse pointer in a working area is accompanied with the cross-hairs, permitting to watch a current location of the cursor on scales of the argument and the active function. In the three fields in the bottom of the window of the graphics editor the current location of the cursor is shown in numbers. In these fields is shown:
To replace an active curve it is enough to press the left mouse button while its cursor is on a scale of the newly selected curve.
The setting of a visualization range by argument (Page: top/bottom) is carried out in the dialog box called at selection of the menu item Options - > Pane's tuner.
The setting of a visualization range by the function (Page: top/bottom) is carried out in the dialog box called at selection of the menu item Options - > Curve's tuner.
The curves (the dependencies of columns of functions on a column of argument) can be represented with linear interpolation between nodal points or without interpolation - stepwise. The visualization with interpolation is used by default. It is possible to change a way of drawing (Linear curve or Stairs curve) in the dialog box displayed at selection of the menu item Options - > Curve's tuner.
For changing the direction of axes it is necessary to use a submenu View - > Flip, which has such options:
If it is necessary to return quickly to a normal range of changing of argument or function after changing of limits of visualization, it is possible to use a submenu View - > Fit, which has such options:
For changing of the step of graduation of scale (it is also step of a grid) of argument and functions, it is necessary to enter the new value of step into a field Grid step of the dialog box Pane's tuner and Curve's tuner accordingly.
To switch to the edit mode it is necessary to select the menu item View - > Edit mode and to set a new location of nodes with the help of the left mouse button.
For increasing / reducing of the working area of the graphics editor, the modes of increasing and reducing magnifier are used. These modes are activated by menu item View - > Zoom in mode and View - > Zoom out mode correspondingly. In the zoom mode the user selects the rectangular area by the mouse, by pressing the left button for fixing of one angle and releasing it in the other corner of the selected area. After release the size of area of visualization will change accordingly.
If the user at the moment of area selection by a rubber rectangle has decided to cancel operation, for this purpose he should press the 3rd (right) mouse button, and after that to release the 1-st. In this case the changing of the visualization area will not take place.
The program gives possibility to load headers of traces of the indicated modification for browsing and editing. The headers are loaded in the same order, in which they are listed in the file of traces. Attention! During visualization of traces in other programs of the packet the very first trace is visualized in the bottom, and last in order under - at the top of a field of traces.
It is necessary to edit headers cautiously, as the unsuccessful corrections can strongly affect the operation of the programs with this modification and with the data obtained on it.
At changing the order of lines in the loaded table of headers (for example, as a result of sorting) the order of traces in this modification does not change really. If to swap values in the cells of a column INDEX, during saving the modification (File - > Save dbt) these traces will exchange not places, but headers.
During copying changes (File - > Copy dbt to) the interpretation of headers is a little bit other. During copying, the traces are written in the same order and number, in which the headers are listed. The trace body is taken from the initial modification with the number specified in INDEX. If trace with such number is not present in the initial modification, the empty (zero) trace body is written.
The program allows to edit the LDB tables with some limitations on the types of columns. The following types of columns are admitted:
The program allows to edit both data tables, and the list tables.
As the passport data are stored in the LDB tables, the user can carry out their editing with the help of the given program both in the table and graphics modes. Not to break integrity of data structures of the passport, it is necessary to read their description attentively before editing (see the document " the Description of the passport of the VSP data").
The program does not allow to change the structure of the tables (to add or to delete columns, to change their types). At the same time the contents of the table during editing can vary arbitrary. It concerns the number of lines and the contents of the cells.
It is necessary to take into account, that during the graphics editing the table lines are sorted by increase of the value of selected column of an argument. Even if the user has not changed the value explicitly, the order of lines can be another. Therefore if any application requires the defined order of lines in the input LDB table, the user should take it into account, if he has decided to edit this table beforehand.
See item .
The program allows to make a text file, which can be used outside the UNIVERS packet. The way obtaining of such file is stated in item 3.1.1.7
For operation with the program it is necessary to define a variable of the environment VSPHOME. It can be defined in the file setup or in the initial profile of the user. The definition of this variable in the file setup should look like (the spaces in the line are not admitted!):
VSPHOME =/home/vspWhere /home/vsp - the root directory of the UNIVERS packet. During installation of the packet the root directory can be set in the other way.
For operation of the program at the home directory of the user should contain the following files: setup, .sdscolor or $VSPHOME/etc/univers.zcp.
The resource file DBEDIT, which should be located in the home directory of the user or in the search paths of search in a variable of environment XFILESEARCHPATH or XAPPLRESDIR, is necessary for the correct operation of the user interface of the program. A usual location of the file DBEDIT is the directory $VSPHOME/app-defaults. In this case variable XFILESEARCHPATH should contain the following search element,
...: $ VSPHOME/app-defaults / of % N:...or the XAPPLRESDIR variable should be defined as
XAPPLRESDIR = $ VSPHOME/app-defaults