Introducing IQUERY© v1.0.2 Engine
Description
| IQUERY is a software designed to run under three plataforms, Linux, SCO and DOS. The system was designed to act as an interactive search engine for Mini Micro CDS/ISIS DataBases, it was developed taking the directives showed in the ISIS 3.0 version. The software can run in three different modes, as an interactive command shell, as a CGI to run under WWW servers, and as an interpreter taking the statements from a file. |
How it Works
|
When you start up IQUERY, the fisrt thing, is search for the SYSPAR.PAR file
in the default ISIS install path defined by IQUERY ( '/usr/local/isis-3.0/'
for Linux and SCO or 'C:\ISIS\' for DOS) or the path that you can pass to
the program with the '-conf absolute_path' parameter, in that file is
searched for the DataPath that is where your databases files resides in
( IQUERY also recognizes that you can have your files redirected by the
dbn.PAR file where dbn is the Data Base Name), from there, it changes to
one of the three modalities: shell, html or file. In any of the modalities
IQUERY reads and process one line at a time showing the results in the
standard output terminal. Keep in mind that when you pass an 'absolute_path' with the '-conf' parameter this path must have the final slash, this is, if your 'SYSPAR.PAR' is located in the 'isis' directory under '/usr' your parameter would be '/usr/isis/' and NOT '/usr/isis'. The Search Engine have two special parameters to play with, there are '-nocase' permitting you the search of KeyWords case insensitive, and '-nostrict' that consider all the blank spaces on the beginig and end of the KeyWord to find for, case sensitive searchs and strict delete of blank spaces is the default for IQUERY. The line below describes all the parameters to IQUERY, refer to the Specification for HTML for a complete explanation on how IQUERY works for httpd CGI interfaces. iquery [ -conf isis_path ][ -html | -file absolute_path_to_file ] [ -nocase ] [ -nostrict ]
|
Statements recognized in v1.0.2
|
|
Each field in each register have two identifers, Field Tag and
Field Name, and also you may have more than one open Alias
corresponding to different Data Base Files, thus, we need to set a
convention on naming each field in each Alias in some part of the
output string or in a query condition of a SELECT statement.
When you are constructing the 'QueryCondition' you have to put your query like: DBAlias, folowed by a '.', the Tag Number, the match separator '=', and finally the string that you have to match. The matches will be reached by default when the string is part of the field in the record, if you would like to change this type of match be sure to check the Match String Modifiers below. For example, i have to select in the alias CORPORATION those records that have in the Tag number 40 ( that is identified also by the Field Name 'Section') the string 'Sales', then my 'QueryCondition' must be 'CORPORATION.40=Sales'. The format of the 'OutputFormat' is so similar, you can put anything you want that will be printed when a match were found, and when you would like to replace a Field Value in the string, you have to put there a '%' Field Replacement Character folowed by the DBAlias, a '.' and finally the Tag Number of the field. Continuing with the example in the previous paragraph, now i would like to output the Tag numer 20 ( that is identified also by the Field Name 'Employer's Name'), so, my 'OutputFormat' must be '%CORPORATION.20', if you also would like to output the real character '%' then you have to put a '%%' to say IQUERY that ignore the Field Replacement function. Of course this is not the format used in CDS/ISIS program, this is because the software is oriented to WWW Clients that have its own Format Macro Language, unless you can use it in text only format. Also in this IQUERY version there isn't a way to extract a Sub Field nor defining a block of repeatable extraction, i'm working now in this features for a newer version...
|
|||||
|
In shell mode or file mode, there are no mystery, the statement you
enter is the order that IQUERY will process and the iquery program
could be installed in any directory; in html mode there are three
things that you have to keep in mind when you pass data to the
IQUERY CGI. First, you have to link or copy your iquery program to your CGI execute path and rename it to iquery.cgi or do anything you want that permits to the httpd server to execute iquery. Also, you have to learn the HTML code to build FORMS (maybe you are a doctor in that), and the convention to pass data to a CGI, the prefered method of passing data to IQUERY is POST, in any case GET is also covered by IQUERY. Second, if you would like to pass more than one command line parameter to a CGI, the HTML interface only can pass the first, that's why I added a variable that you must call 'HTMLPARAMS' to pass there the other parameters like '-nocase' and '-nostrict', and you have to pass only '-html' parameter to the CGI. Third, IQUERY takes the statements from the 'QUERY' variable, so when you are writing an IQUERY code you must have to put it in a variable called 'QUERY', inside this variable IQUERY takes its order statements ignoring spaces and CR's/LF's (like HTML code), and translate the ';' character as a CR/LF, so the line 'strprint hi world; strprint bye', will be translated inside IQUERY as strprint hi world strprint bye prosessing 'strprint hi world' and then 'strprint bye', if you forget to put the ';' in the end of each statement in your code, IQUERY understands nothing.
|
|||||
| Employers Corporation Database. This is a simple example putting all the information in this document together. I make a separate html page for the real form & query code explanation so you can view or save in a simple action of 'View -> Document Source'. | |
Spanish Web Servers This is a real IQUERY example of a search in a CDS/ISIS DataBase that have information for all the Spanish Web Hosts maintained here by Marcelo Kruk. |