Getting Data - Ultramarine.com Getting Data

The final command in this menu is used to extract information from the database and place it in a "variable" where it is available to the advanced user. Its form is:


     SET_VARIABLE, VAR_NAME,  -OPTIONS

and the available options are:



     -RECORD, BEG_RNUM, END_RNUM


     -VALUES, CV, VAL_MIN, VAL_MAX

     -NUM_COLUMNS

     -NUM_ROWS

     -NAMES, CS(1), CS(2), .....

     -COLUMN CS(1), CS(2), ....

     -STATISTICS, CS(1), CS(2)

     -MINIMUM, CS_PUT, CS_GET

     -MAXIMUM, CS_PUT, CS_GET

     -SELECT, CS_PUT, CS_GET, VAL(1), VAL(2), ........

The results of this command are stored as a string in the variable VAR_NAME. The first of theses options is different from the others in that it simply changes the records that will be searched by any following option. All of these others actually produce results. The simplest of the remainder of the options are -NUM_COLUMNS and -NUM_ROWS which simply writes a string defining the number of columns or rows of data which exist. The -NAMES option will write the variable names for the columns CS(1), CS(2), etc into the variable. The -COLUMN option simply copies the values of the columns CS(i) into the string. Here, the values of each column are copies for each record.

The -STATISTICS option operates in the same manner as the STATISTICS command. Here CS(1) is the column number of the independent variable, and CS(2) is the column number of the data for which statistics will be returned. This will result is numerous tokens being defined in VAR_NAME, one for each row obtained when the STATISTICS command is issued. Also the order of the tokens is the same as the order of the row.

The remainder of the options deal with two columns of data, and write numbers into the global variable based on the values of the two columns. The first column specified is called the "put" column and the second the "get" column. The -MINIMUM and -MAXIMUM options will write the values of the "put" column into the global variable for the record at which the "get" column is either a minimum or maximum.

The -SELECT option operates in a similar manner, except that here the values written into the global variable will be the values of the "put" column which correspond to specified values of the "get" column. For example, suppose that the "get" column had values of 1 2 3 4 5 and 6, and the "put" column had values of 10 11 12 13 14 15 and 16. If one now used the -SELECT option with values of 1.5 and 5.5, then the strings stored in the global variable would be 10.5 and 15.5.