<<

BIREME - Centro Latino-Americano do Caribe de Informação em Ciências da Saúde

Organização Pan-Americana da Saúde Organização Mundial da Saúde ───────────────────────────────────────────────────────────────────

WWWISIS: a world-wide web server for ISIS-databases Version 3.0

São Paulo, October 1997 Contents

I. Introduction...... 3 1. WWWISIS: ISIS data base server for Internet/WWW...... 3 2. WWWISIS and the Common Gateway Interface (CGI) Scripts...... 3 2.1. The CGI-environment virtual record...... 6 2.1.1. CGI data collection and structuration...... 7 2.1.2. Dynamic generation of WWWISIS execution parameters...... 11 2.2. The output text from WWWISIS...... 12 2.2.1. Pre-defined output text...... 12 2.2.2. Output text generated via ISIS formatting language...... 12 3. WWWISIS and ISIS data bases...... 14 3.1. Retrieving data from ISIS data bases...... 14 3.2. Updating data on ISIS data bases...... 15 3.3. WWWISIS process information fields...... 15 4. WWWISIS log data base and the client-server stateless operation...... 16 5. LOADISO and FULLINV procedures/scripts...... 16 II. WWWISIS parameterization...... 18 1. WWWISIS version, general syntaxes, parameters overview...... 18 1.1. Menu of parameter options...... 18 1.2. WWWISIS version...... 18 1.3. General parameter syntax...... 19 1.4. Mandatory parameters...... 20 1.5. WWWISIS args parameter and error messages...... 20 1.6. Groups of parameters...... 21 2. General parameters...... 22 3. Boolean expression related parameters...... 23 4. Alphabetic range of keys related parameters...... 24 5. Range of master file records related parameters...... 25 6. CGI-environment virtual record related parameters...... 26 7. Data base update related parameters...... 27 8. Log record field tags...... 29 9. WWWISIS return codes...... 30 10. Reserved parameters...... 31 III. WWWISIS parameters reference manual...... 32

2 I. Introduction

1. WWWISIS: ISIS data base server for Internet/WWW

WWWISIS is a system developed and distributed by BIREME/PAHO/WHO, specially designed to act as a server for ISIS data bases in a WWW client/server environment. It provides functions for searching and data entry operations over ISIS data bases.

WWWISIS operates as a server through the WWW Common Gateway Interface (CGI). The actual operation is driven by parameters. Examples of parameters are: the input data base name, a boolean search and an output format. A key feature is its capability to dynamically generate its execution parameters, based on data sent to the CGI process from the WWW browser.

WWWISIS may be called directly or as a command line inside a CGI script. A CGI script may contain one or more calls to WWWISIS. In addition, it may recall itself several times.

ISIS searching, formatting and field updating languages are available. Search specifications can be gathered through WWW-forms, passed via CGI to WWWISIS and the results formatted and delivered to the client. Similarly, is possible to implement data base updating operations. By default, WWWISIS presupposes a multi-user environment.

WWWISIS output to the WWW browser is generated via ISIS formatting language. Taking into account the possibility to include HTML-codes in format specifications, using conditional and unconditional literals, it is possible the development of a fully graphical, client/server search interface for ISIS databases (in an Internet or Intranet environment).

WWWISIS source code uses the Cisis Interface Library, developed by BIREME. Running under DOS, the executable module is fully compatible with UNESCO CDS/ISIS 3.07 file structure. However, under UNIX operating systems, there are no guarantee of this compatibility.

WWWISIS is distributed with the procedure LOADISO to create master files from ISO files and the procedure FULLINV to create inverted files. It is highly recommended that under UNIX operating system, the data base master file be generated from an ISO file using the LOADISO procedure and the inverted file() fully generated using the procedure FULLINV.

2. WWWISIS and the Common Gateway Interface (CGI) Scripts

WWWISIS may be called directly by typing in an operating system command line, as for example: wwwisis db=cds "bool=water and plant" [email protected]

This method is particularly useful for learning and testing WWWISIS parameters.

However, it is through WWW CGI that WWWISIS acts as ISIS database server for Internet/WWW. 3 CGI is an integral part of WWW servers that provides a mechanism to call other programs. Thus, requests from a WWW browser to a WWW server may be sent to a program or a script, which in turn may retrieve data from a data base and send the output back to the WWW server, that transfers it to the WWW browser, usually in HTML format.

The CGI programs or scripts reside in one or more directories recognized by the WWW server as CGI paths. The CGI paths are configured by the WWW server administrator ( usually, the name of the CGI sub-directory is /cgi-bin/ under the server root directory, but it can be mapped to any other path). In consequence, all programs or scripts to be called via CGI should reside in the correspondent CGI paths.

The most common way to gather data in WWW browsers is through forms. FORM is an element of the HTML language, that allows the specification of Input elements, such as field text, list box, check box, radio box, etc. An Isis search, for example, may be typed into an Input element of the type text and search limits may be collected via elements type list , check or radio boxes .

Every FORM Input element has two basic attributes associated : the name that identifies the Input element instance and the value assigned to it.

A key attribute of the FORM element is ACTION, which allows the specification of the name of the program or script to be activated via CGI. The following is a specification of a form in HTML language:

. . Enter search:

. .

The first Input element used in the above example of form has attribute type equal to text, followed by attribute name equal to boolean and attribute value equal to null. Once a search formulation is typed into the form input field, it will be stored in the value attribute. The second Input element type is a submit button that when clicked sends the data entered in the field boolean to the WWW server.

The use of FORMs in the client side and CGI applications in the server side comprises the key mechanisms to collect search requests and/or data entry and submit them to a data base. The following diagram depicts the operation of these mechanisms:

4 Isis data bases

cgi For client application server

In brief, the WWW browser (client) collects the data through forms and sends the data to the WWW server, that calls the CGI application (script or program) specified in the ACTION attribute of the FORM element. The CGI application sends its output to the WWW server, that transfers it to the WWW browser. This client-server interchange of data usually repeats several times allowing interactivity between a user and a data base. For example: (a) a search may be refined via successives interactions; () the results of a search may be presented in successive subsets; or () a data entry operation may go through several steps when required by consistency rules. The use of text hidden in HTML FORMS is a common way to carry data from one step to the next.

There are two basic methods WWW uses to transfer data from the client to the CGI application: GET and POST. The method to be used is specified in the attribute METHOD of the HTML FORM element. GET is the default method.

With the GET method, the browser sends to the server a string which includes the client address in Uniform Resource Locator (URL) format, followed by the character "?" and by a string containing all data collected in the form (input element names and values); when the server receives this string, it separates the sub-string after the "?" character and assigns it to an environment variable called QUERY_STRING, which may be used by the CGI application.

With the POST method, the server sends the data string to the CGI via the operating system Standard Input, which is then read by the CGI application. The POST method is preferable for process involving large amount of data.

WWWISIS may be activated in a CGI process through five ways: a. Calling the executable module directly from the WWW browser URL open dialog box, as for example: http://www.xxx.xx/cgi-bin/wwwisis.exe/[hello]/

This call presupposes that WWWISIS is stored in the cgi-bin directory. This call is the standard call to check if WWWISIS is correctly installed and able to respond. b. Calling the executable module directly from a HTML anchor element specification, as argument of the href attribute , as for example:

WWWISIS error codes list

5 WWWISIS via parameter file c. Calling the executable module directly from a HTML form element specification, as argument of the action attribute , as for example:

…….

….
. As a command line of a script specified via the HTML anchor element , as argument of the href attribute , as for example:

WWWISIS error codes list

WWWISIS via parameter file e. As a command line of a script specified via the HTML form element , as argument of the action attribute , as for example:

…….

….

The methods b and c above are generally the preferable way to call WWWISIS under Windows NT, when operating with the Microsoft Internet Server. All methods are used under UNIX operating system.

Note that only the following parameters may be entered after the execution module: args, ctttype, hello, in and menu.

2.1. The CGI-environment virtual record

When WWWISIS starts, it first creates in memory an ISIS master file record called CGI- environment virtual record. This record is used by WWWISIS to store data sent by the WWW server to the CGI process.

WWWISIS process the data transferred by the WWW server on both GET and POST methods through the parameter cgi. In consequence, it is not necessary to worry about the manipulation of the data sent by the server to the CGI application. In general, simple and complex WWWISIS applications does not require additional programs or operating systems commands; this feature permits that a WWWISIS application may be easily transferred from one platform to another; in particular, it is possible to develop an entire application in a stand alone PC and then transfer it to any networked server.

The CGI-environment virtual record may be accessed and formatted via the parameters cgi, cmd, stop and prolog .

6 2.1.1. CGI data collection and structuration

When the c gi p arameter is present, WWWISIS collects the data sent by the server, if any, and store them into the CGI-environment virtual record. WWWISIS expects that the data sent by the server is structured in pairs of data elements: the name of the input field and the correspondent value. These pairs correspond to the attributes name and value of the HTML FORM Input element, as in the following example:

….

….

The input element data pairs are stored by WWWISIS into the CGI-environment virtual record, according to a powerful and flexible tagging schema, which offer different methods to establish a correspondence between the attribute name and the tag number. The use of a given method depends on how the data will be treated in the CGI process.

The methods WWWISIS to collect and tag the data sent to the server from the client are described below: a. tcg=

The parameter tcg permits the specification of the tag number where the data will be stored in the CGI-environment and virtual record. The input element name component is stored in subfield ^ and the input element value in subfield ^ . For example: wwwisis tcg=2001 [email protected]

The tag specified in parameter tcg is by default repeatable.

If the parameter tcg is not specified, the pairs name and value are structured and stored into data field tag 100, subfields ^n and ^v . Each pair is stored in a different occurrence of field 100. Thus, in example,

….

…. the field 100 of the CGI-environment virtual record will contain two occurrences:

Tag Content

100 ^nmfn^v50 100 ^nbutton^vGet mfn 50

7 The same data collection and action could be coded via the href attribute of the anchor element, as for example:

…. Get mfn 50 …. b. pfxtag=

The use of the pfxtag parameter permits the assignment of individual tags to the data received, according to the correspondence between pfxtag argument and the content of the name attribute of the Input element: if name contains the same prefix specified in pfxtag parameter, followed by a number, this will be the data field tag number in which value will be stored in the CGI-environment virtual record. The following is an example of HTML code using FORM element, using tag identifications as prefix in name attributes:

….

Nombre:
Direccion:
….

In this example, supposing the user fills in the input fields with the following contents:

Nombre: Joao da Silva Direccion: Rua John Smith, 300 when it clicks the button labeled Envia , the input data are sent to the WWW server, which will transfer it to the Standard Input of the CGI script frmproc . If this script includes a WWWISIS call with pfxtag and cgi parameters, as for example,

wwwisis pfxtag=tag [email protected] the data sent will be stored into the CGI-environment virtual record according to the following structure:

Tag Content

1 Joao da Silva 2 . John Smith, 300 100 ^nbuton^vEnvia

Note that when a name substring matches the pfxtag argument, only the actual contents of value is stored in the corresponding data field tag.

If the prefix does not matches the pfxtag argument, the data are stored in field tag 100 or the tcg argument, if present. 8 c. Subfields ^ and ^r

If name contains the sub-field identifier ^t followed by a number, this will be the data field tag number in which value will be stored in the CGI-environment virtual record. In order to separate different occurrences during data entry, it is possible to specify in the name the subfield identifier ^r followed by a number that represents an ASCII code of the repeatable separator. The following is an example of HTML code using Form element, using tag identification ^t and repeatable indicator ^r in name attributes:

….

Nombres:
Direccion:
….

In this example, supposing the user fills the input fields with the following contents:

Nombres: Joao da Silva Antonio Padova Direccion: Rua John Smith, 300 when it clicks the button labeled Envia , the input data are sent to the WWW server, which will transfer it to the standard input of the CGI script frmproc.sh which includes a WWWISIS call, as for example:

wwwisis [email protected] the data sent will be stored into the CGI-environment virtual record according to the following structure:

Tag Content

1 Joao da Silva 1 Antonio Padova 2 R. John Smith, 300 100 ^nbuton^vEnvia

Note that in the above example, the repeatable separator is the new line . d. Subfield ^ and ^r

This method is specially oriented for data entry purposes, i.e., creating a new record or modifying an old record. (Note that the other methods may also be used for data entry when combined with the proc parameter.)

When only the subfield ^w indicator is present in the argument of the name attribute, the data collected is not stored into the CGI-environment virtual record but directly into the data base record being processed. When the prefixed schema or subfield ^t shame is also used, the data collected is stored in both CGI-environment virtual record and the data base record being 9 processed. The ^r may be used to specify the repeatable separator. The ^w indicator is used in three ways:

(i) it may be followed by a tag number specifying the tag where the data will be stored in the data base record, as for example:

….

Author:
…. In the above example, the authors' names will be stored directly into the field tag 10 of the data base record being created or modified.

(ii) it may be coded together with a prefixed tag number, as for example:

….

Author:
….

In the above example, the authors' names will be stored into the field tag 10 of both CGI- environment virtual record and the data base record being created or modified.

(iii) it may be coded together with the subfield indicator ^t , as for example:

….

Author:
….

In the above example, the authors' names will be stored into the field tag 10 of CGI- environment virtual record and into the field tag 500 of the data base record being created or modified.

Summarizing, the difference between ^t and ^w is only the target record where the data collected is stored. Using ^t , the data is stored in the CGI-environment and virtual record. Using ^w, the data is stored into the data base retrieved record or into the new record being entered. Using both, the data is stored in both records. e. Adding CGI environment variables

Another way to add data into the CGI-environment virtual record is via the env parameter, which permits to add the value of environment variables available during the CGI script

10 processing. The following example will add the variables SERVER_NAME and HTTP_USR_AGENT, which identifies respectively the server name and the client browser into the CGI-environment virtual record: wwwisis env=SERVER_NAME=51,HTTP_USR_AGENT=52 [email protected]

The CGI-environment virtual record is available for formatting via cgi, cmd, prolog and stop parameters . These parameters are activated only at the beginning of a WWWISIS execution.

2.1.2. Dynamic generation of WWWISIS execution parameters

WWWISIS operation is driven by parameters. A key feature of WWWISIS is its capability of auto generation of the contents of the execution parameters.

The cgi parameter is used to generate WWWISIS execution parameters. Its argument contains a format specification which is executed over the CGI-environment virtual record, being each output line interpreted by WWWISIS as an execution parameter. In other words, WWWISIS parameters may be generated dynamically ( "on the fly" ) or we may consider that the presence and arguments of the execution parameter may be "programmed".

The following is a call to WWWISIS using the cgi parameter: wwwisis [email protected]

The cgi parameter specifies the file genparm.cgi which contains a format specification that will generate the actual execution parameters, one per line. An example of this format could be the following:

'db=cds',/ 'bool=plant and water'/, '[email protected]'

In the following example, the file genparm.cgi formats field 100 to get the boolean expression entered via a WWW FORM Input element named boolean:

'db=cds',/ 'bool=',(if v100^n = 'boolean' then v100^v fi)/, '[email protected]'

Note that the format presupposes that field 100 is repeatable, each occurrence with subfields name (^n ) and value (^v ).

The cmd parameter is similar to cgi , except that it does not add data into the CGI- environment record. It cannot be used together with cgi in the same run of WWWISIS.

11 2.2. The output text from WWWISIS

WWWISIS outputs data that are pre-defined internally but in most cases ISIS Formatting Language is used to generate output texts “on the fly”.

2.2.1. Pre-defined output text

WWWISIS provides parameters to output internal pre-defined texts, including menus of the available parameters, a hello message for testing and the different http file headers. The following shows example of these parameters: wwwisis hello wwwisis cttype=text/plain menu=6

2.2.2. Output text generated via ISIS formatting language

WWWISIS outputs data to the WWW server via the stop, prolog , pft and epilog parameters. All these parameters contain ISIS format specifications.

In a WWWISIS call, the stop parameter formats the CGI-environment virtual record. It acts as a semaphore. If the stop format generates any output, this is sent directly to the standard output and WWWISIS stops the execution. It is particularly useful for the processing of several preambles, such as user login name and passwords, availability of the system, data entry consistency, etc.

The prolog formats the CGI-environment virtual record and it is generally used to produce the header of the output text, as for example: wwwisis db=cds [email protected] from=1 [email protected] [email protected] where header.pft contains the following format specification:

' '

The pft parameter formats the records retrieved from the input data base and is generally used to produce the body of the output text.

The epilog formats the WWWISIS log record and may be used to produce the tail of the output text. In the previous example, tail.pft could contain:

''

12 The following table describes for each parameter that expects a format specification, the source record and the meaning of the output :

Parameter Source record Output stop CGI-environment virtual record Standard output. If any output is produced, WWWISIS stops the execution. prolog CGI-environment virtual record Standard output cgi CGI-environment virtual record with default WWWISIS execution parameters. One field tag 100 parameter per line cmd CGI-environment virtual record without WWWISIS execution parameters. One default field tag 100 parameter per line proc Retrieved record from data base specified in Cisis Field Update specification parameter db pft Retrieved record from data base specified in Standard output parameter db pfttag, Retrieved record from data base specified in Actual pft argument pftgen parameter db epilog LOG virtual record Standard output next LOG virtual record WWWISIS execution parameters for the next recursive call. One parameter per line.

Since the format specification may use the ref (reference) and (lookup) commands, it is possible, in any of the above parameters, to access different data bases than the one specified in the db parameter. The parameters cmd, cgi, pft, prolog and epilog may be set to ALL to dump all record data fields, as for example: wwwisis db=cds bool=plant [email protected] epilog=ALL

To force a format to output nothing, use a as the format specification, as for example: wwwisis db=cds from=1 count=1 pft=, log= Cisis Interface Library used by WWWISIS introduces several extensions to the standard ISIS Format Language, which may be used in any of the above parameters ( see Annex 1). The output text sent to the server is usually coded in HTML in order to make use of all its graphic and hypertext features. The output is preceded by a header that usually contains a content type specification ended by a blank line. The content types commonly used in WWWISIS applications are text/html and text/plain, the first indicating that a HTML text follows, and the second that a text without marks follows. An example of an output from a CGI is:

Content-type: text/html Example of cgi-output>

WWWISIS: the way to Internet Isis

. .

13 The above CGI output example could be produced by format specifications using literals: the first 6 lines could be output via the prolog parameter and the last two lines via the epilog parameter. The following script implements this example:

#!/bin/ksh echo Content-type:text/html echo wwwisis [email protected]

The file genparm.cgi could contain the following format specification:

'db=cds'/ 'prolog= @header.pro'/ '[email protected]'/ 'from=1'/ 'count=10'/ '[email protected]' where header.pro contains:

'', 'Example of cgi -output>', '', '

WWWISIS: the way to Internet Isis

', and tail.epi contains:

'', '',

3. WWWISIS and ISIS data bases

WWWISIS retrieves data from an ISIS data base and may update it.

3.1. Retrieving data from ISIS data bases

There are three basic ways to retrieve data from a data base:

(a) a boolean expression (parameter bool ), which is applied on keys of an inverted file and produces, as a result, a set of master file records that complies with the boolean expression; the following example shows the use of a boolean expression to retrieve records: wwwisis db=cds "bool=plant and water" [email protected]

(b) an alphabetic range of inverted file keys (parameters k1 and k2 ); the following example shows the retrieval keys with root equal to pla : wwwisis db=cds k1=pla k2=plazzzzzzz "pft=v1,c31,v2/"

14 (c) a sequential range of master file records (parameters from and to ); the following example shows the retrieval of the first 10 records: wwwisis db=cds from=1 to=10 [email protected]

WWWISIS operates on a set of ISIS records retrieved using one or a combination of these methods. The operation consists in looping over the set of retrieved records, applying on each record the different process specified via parameters. The final process on each record is always the formatting of the record on the standard output via pft , pfttag or pftgen parameters.

3.2. Updating data on ISIS data bases

WWWISIS allows also the updating of a data base. It is possible to create new records (parameter new ), update old records ( parameters read and write ) and update the inverted file (parameter fst ).

WWWISIS offers two basic parameters to manipulate the contents of ISIS master file records: the proc parameter to add and delete fields and the gizmo parameter to make string replacements. Update an inverted file to reflect new and changed records contents is activated via the fst parameter. The update process is assumed to run always in multi-user and stateless client-server environment. WWWISIS incorporates mechanisms to lock and unlock records and data bases to assure integrity of the update process.

The following example shows a call to WWWISIS to create a new record: wwwisis db=cds new [email protected] [email protected]

The new record data fields are added via the field update specification in proc parameter.

3.3. WWWISIS process information fields

In order to facilitate the generation of the formatted output via pft , pfttag or pftgen parameters , WWWISIS adds to every record being processed several data fields with the contents of the parameters used in the WWWISIS call as well as the results of the process on the record. These fields are called process information fields.

By default, these data fields have tags numbered from 1000 on, as for example, field tag 1021 contains the boolean expression, field 1002 contains the total number of retrieved records, field, etc. It is possible, however, to change these tags in case they are present in the input data base records. Parameters t-- , as for example, tbo , ttt, etc. are used for this purpose.

Example: wwwisis tcg=2001 cgi=@genparm in this case the CGI data will be stored in field tag 2001, i.e., the format specification stored in file genparm should refers to field tag 2001 instead of field tag 100.

15 To investigate which process information fields are available in a WWWISIS call, use the keyword ALL in the parameter pft, as for example: wwwisis db=cds bool=water pft=ALL

Note that the process information fields are available only for formatting purposes. Thus, when a record is created via the new or updated via the write parameter, these information fields are not recorded in the data base.

4. WWWISIS log data base and the client-server stateless operation

At the end of every run, WWWISIS creates in memory a log record containing data related to the process.

By default, these data are stored in field tags numbered from 1000 on. They contain all parameters used in the execution as well as the result of the process. For example, the field 1091 contains the return code.

The log record may be formatted via the parameter epilog and/or saved in a data base via the parameter log.

To investigate which log fields are available at the end of a WWWISIS call, use the keyword ALL in the parameter epilog, as for example: wwwisis db=cds bool=water pft=, epilog=ALL

WWW client-server operation follows the stateless mode , that is, a WWW server does not store any data regarding a CGI application when it finishes. WWWISIS also does not record automatically any information about a process. However, WWWISIS allows via the parameter log the creation of an ISIS output data base having only one record - the WWWISIS log record. Example: wwwisis db=cds bool=water pft=, epilog=ALL log=cdslog

Besides the WWWISIS log data base, it is responsibility of the CGI application to deal with intermediate states if necessary, which can be done by transferring state data to the client, usually via HTML FORM hidden fields, or store it in the server computer, which will demand some mechanisms to recover work storage.

5. LOADISO and FULLINV procedures/scripts

The LOADISO and FULLINV procedures/scripts are distributed together with WWWISIS. These procedures are built using the utilities mx and ifload , which are part of the CISIS Utilities package developed and distributed by BIREME. For DOS operating systems, these procedures have extension bat and for UNIX, the extension sh.

16 LOADISO may be used to load an ISIS ISO file into a master file. It is called as a command line with two parameters: the iso file name and extension and the name of the ISIS master file, as for example: loadiso.sh /bases/cds/cds.iso cds

FULLINV may be used to full generate an inverted file from a master file. It is called as a command line with four parameters, the first three mandatory: the master file name, the Field

Select Table (fst), the inverted file name and a keyword flag ( -reset ) whose presence retains the master file inverted file pending indicators. Example: fullinv.sh /bases/cds/cds /bases/cds/cds.fst /bases/cds/cds

These procedures should be customized according the local configuration.

17 II. WWWISIS parameterization

WWWISIS operation is driven by parameters. Thus, the development of any WWWISIS application consists in "parameterize" or "program" its operation parameters. This section discusses the organization and usage of WWWISIS parameters. A detailed description of each individual parameter is given in Section III.

When invoked at the command line without any parameter, WWWISIS issues a sequence of text screens listing all possible parameters. These screens act as a built-in system help, reflecting the functions, parameters and options.

This documentation section will deal with each of the WWWISIS groups of options and parameters, following the general structure listed in built-in help screens.

1. WWWISIS version, general syntaxes, parameters overview

1.1. Menu of parameter options

Screen 0:

CISIS Interface v3.33/PC/M/30000/10/30/I - WWWIsis 3.0 CISIS Interface v3.33/4GB/GIZ/DEC/FAT/CIP Copyright (c) BIREME/PAHO 1997. All rights reserved.

Program : Function: WWWIsis Syntax : db= [options] Where : dbname ; data base name

Option 1: bool= ; search expression Option 2: k1= ; first inverted file key k2= ; last inverted file key Option 3: from= ; first MFN to= ; last MFN Option 4: cgi= ; CGI format specification Option 5: ; updating records Others : args ; show next parameters hello ; hello message menu= ; display group options

1.2. WWWISIS version

The first screen presents the copyright notice, the version and setup parameters of the CISIS Interface Library with which WWWISIS was compiled and the WWWISIS version. It is important to check this notice in order to identify the current WWWISIS version.

It presents also a menu of group of parameters options.

18 1.3. General parameter syntax

WWWISIS process a database according to the parameters passed from the command line and/or from a file, specified as argument of the in parameter. In the following command line, wwwisis db=cds bool=water$ pft=v70/

WWWISIS will open the database cds, perform the boolean search water$ and display field 70 from the retrieved records. The same result will be obtained by issuing the following command: wwwisis in=example.fil

where example.fil is an ASCII-file containing the following lines: db=cds bool=water$ pft=v70/

A parameter specification in a command line call should be enclosed within quotes when its argument contains any character that may be interpreted as end of a parameter content specification, as space or ' or | . This does not apply when the parameter is specified in an input file. Example: wwwisis db=cds "bool=water and plant" from=1 "pft=v70|; |/"

This example may be coded using an input file as follow: wwwisis in=param.in wheren param.in may contain: db=cds bool=water and plant from=1 pft=v70|; |/

WWWISIS parameter names are case sensitive and all must be issued in lower case. Thus, the words BOOL or Bool are not recognized as parameters, since the correct syntax is bool.

The maximum number of parameters in a WWWISIS call is a compilation constant parameter, whose value is displayed in Screen 6 of the built-in help (return code 10).

The actual position of the parameters is irrelevant. Note however that, depending on the operating system used, the maximum length of a command line is limited; this is exactly the reason why the use in parameter instead of command line is recommended.

Use args parameter to verify the actual parameters received by WWWISIS.

19 When parameters are generated "on the fly" via the cgi or cmd format, each parameter should be formatted in a new line.

The description of the contents of each parameter is given in the WWWISIS parameter reference section.

1.4. Mandatory parameters

The WWWISIS execution loops over the set of retrieved records performing the actions specified by the parameters.

In principle, it is possible to enter any combination of WWWISIS parameters, provided that they make sense. The only mandatory parameters are:

db - the name of the data base;

pft - format specification; one or more parameters that retrieve data from the data base, which may be:

bool - boolean expression, or from to - range of sequential master file numbers, or k1 k2 - range of sequential inverted file keys.

When the new parameter is specified, the use of one of the above retrieval parameters is not mandatory.

1.5. WWWISIS args parameter and error messages

Excepted for the CISIS Interface Library low level errors (files not found, error in physical files, etc.), WWWISIS does not issue any error or warning message in the output. When an error occurs, WWWISIS issues an exit code different from zero. It is responsibility of the CGI application to handle the exit code. The exit code is stored in field tag 1091 of the WWWISIS log record, which can be formatted via the parameter epilog .

During the development phase of a WWWISIS CGI application, it is recommended to use the positional parameter args that instructs WWWISIS to list the actual execution parameters. This is particularly useful when the parameters are generated dynamically by the cgi or cmd parameters. Example: wwwisis args [email protected]

20 In addition, the format keyword ALL may be used as a development tool to dump the contents of the CGI environment virtual record, the retrieved records and the log record. Example wwwisis db=cds cgi=ALL pft=, to=1

1.6. Groups of parameters

The parameters that drive the execution of WWWISIS are divided into different groups. These groups correspond to the different ways WWWISIS operates the input data base. In addition, there is a group of general parameters, which may apply in any case.

WWWISIS operates on one or more master file records or inverted file keys of the input data base. The operation loops over one record or one key at a time. The set of master file records may be obtained by defining a range of master file numbers or as the result of a boolean expression or as a combination of both methods. The set of inverted file keys is obtained by defining an alphabetic range of keys. In the late case it is possible to loop over the inverted keys postings.

Depending on the way the set of input records is obtained, there are different groups of parameters that can be used. Each group corresponds to a screen of the built-in help. Each help screen has a number, according to the following list:

8,9 - general parameters, may be used with any retrieval method 1 - boolean expression related parameters 2 - alphabetic range of inverted file keys related parameters 3 - sequential range of master file number records related parameters 4 - cgi and environment virtual record related parameters 5 - data base update related parameters

In addition, the following screens are available:

0 - menu of groups of parameters 6 - return codes 7 - log data base field tags

21 2. General parameters

Screen 8,9:

Options : proc= ; CISIS field update format specification prolog= ; prologue format specification pft= ; display format specification pfttag= ; tag with display format specification pftgen= ; generating display format specification epilog= ; epilogue format specification gizmo=[,] ; gizmo data base name decod= ; decode data base name cipar= ; CISIS parameter file reverse ; display on reverse sequence step= ; display every n count= ; display n user= ; user identification pass= ; user password log= ; log data base name

Options : stop= ; semaphore format specification uctab= ; upper case character translation table actab= ; alphabetic character table in= ; parameters input file name out= ; output file name outapp= ; append output file name hlbool= ; fst for search highlight hltags= ; fst for tagged text highlight hltext= ; fst for text highlight maxlk= ; maximum links (fst) create ; create data base createmst ; create master file createinv ; create inverted file callflag= ; customize exit code format specification next= ; recursive call format specification quitpft= ; quit pft format specification

General parameters may be used with any method to retrieve data from the data base (boolean search, range of mfns or range of inverted keys). They comprise the input parameters file name parameter ( in ), output data file name parameters ( out, outapp ),data field editing parameters (proc and gizmo), CGI-environment virtual record formatting parameters ( stop, prolog ), retrieved record formatting parameters (pft , pfttag and pftgen ), selection of subset of records to process (count, step, reverse and quitpft ), configuration and process control related parameters (cipar, files, user, pass) , WWWISIS log record related parameters ( log, epilog, callflag and next ) , character set manipulation ( uctab , actab ), output text highlight parameters ( hlbool, hltags and hltext ), limiting the number of links parameter ( maxlk ), data base files initialization ( create, createmst and createinv ).

When used, the selection parameters contents are added to the records being processed, as for example:

1081 - reverse parameter, if present contains the word reverse 1082 - step parameter 1083 - count parameter

22 The contents of the parameters user and pass are also added to the record in the fields 1041 and 1042 respectively, which makes possible to check the user identification and password against an existing data base for every record processed as well as to name specific temporary resources during a WWWISIS execution, such as the name of the update pending data base.

3. Boolean expression related parameters

Screen 1:

Option 1: bool= ; search expression h1= ; first hit h2= ; last hit tpo= ; current hit position tag (1001) ttt= ; total records tag (1002) trp= ; reverse current hit position tag (1003) tt1= ; first hit tag (1031) tt2= ; last hit tag (1032) tpm= ; previous hit MFN tag (1011) tbo= ; search expression tag (1021) tui= ; user identification tag (1041) tpa= ; password tag (1042) tdb= ; data base name tag (1051)

Searching records via boolean expression is one of the methods WWWISIS offers to retrieve data from ISIS data bases. The boolean expression accepts any ISIS search operator ( * , + , ^ , () , () , . , $ ). A Cisis Interface extension allows also the use of the words "and" , "or" , "and not". The following expression: water * ( plant + plants) ^ transpiration may also be written as: water and ( plant or plants) and not transpiration

( Note that the use of the English words to represent the boolean operators in search expressions is very useful not only to make it easier for users but also to avoid confusion with symbols already used in the http protocol, such as the + to represent a space. )

It is possible to display only a set of the retrieved records by using the parameters h1 and h2. These are important parameters in a client server environment in order to establish a limit on the amount of data transferred from the data base to the client. If h1 and h2 are not specified, WWWISIS will try to format all retrieved records. The general parameters count, from, to, step and reverse may also be applied to limit the set of retrieved records to be displayed. Unless the reverse parameter is specified, the display will follow the ascending order of Mfns.

23 WWWISIS adds to every retrieved record the following information processing data fields, as for example:

1001 - current hit position in non reverse display mode 1002 - total records retrieved 1003 - current hit position in reverse display mode 1011 - the Mfn of the previous hit 1031 - first hit displayed, i.e., the value of the h1 parameter 1032 - last hit displayed, i.e., the value of the h2 parameter 1021 - the boolean expression

If the data base records have already the above data field tags, it is possible to change the tags through t-- parameters, such as tpo, tpp, etc of WWWISIS.

With the above data added to every record, it is possible to format in the output not only the actual record data fields but also data related to the search process. In addition, this feature permits to transfer or to amplify these data in new HTML pages, via hidden FORM Input elements.

The following format exemplifies the use of the search related process data fields:

...... if val(v1001) = 1 then '

'/ '',/ '',/ '',/ '',/ '
Data Base:', v1051,'
Search expression:', v1021,'
Total Hits:', v1002,'
Displaying:', v1031, ' to ', v1032,'
', fi, .....

It is highly recommended to check the return code related to the execution of a boolean expression. The return code is stored in the field tag 1091 of the log record at the end of the process. The return code may be checked by the script or via the epilog parameter.

4. Alphabetic range of keys related parameters

Screen 2:

Option 2: k1= ; first inverted file key k2= ; last inverted file key posting[=] ; posting list notermtail ; no summary record generation nomaster ; no master file tck= ; current key tag (1) tpt= ; current key total postings tag (2) tps= ; current posting structure tag (3) tpo= ; current key position (1001) tt1= ; first key tag (1031) tt2= ; last key tag (1032) tui= ; user identification tag (1041) tpa= ; password tag (1042)

24 tdb= ; data base name tag (1051)

Searching a range of inverted files keys is one of the methods WWWISIS offer to retrieve data from ISIS data bases. Every key and the correspondent number of postings are stored respectively in data fields 1 and 2 of an ISIS record, which is maintained only in memory. This record has always Mfn equal to 1.

The general count parameter may also be applied to limit the set of keys to be displayed. This parameter is important because it provides a more precise control over the number of keys to be retrieved in addition to the parameters k1 and k2. Note that it is not necessary to specify both k1 and k2. If only k1 is specified, all keys from k1 until the end of the inverted file are retrieved, unless count is specified. If only k2 is specified, all keys from the beginning of the inverted file dictionary up to k2 are retrieved, unless count is specified. It is possible to apply the step and reverse parameter to the set of retrieved inverted keys.

When the last key is retrieved, WWWISIS creates an additional instance of the record in memory - the summary record, that contains the following data fields, as for example:

1002 - total of keys displayed 1031 - the first key retrieved, nearest to k1 1032 - the last key retrieved, nearest to k2

To recognize this record, the format may verify the presence of data field 1032 or the absence of data field 1.

The following is an example of a format specification of inverted file keys records: if val(v1001) = 1 then '# Key',c35,'Postings' / fi, v1001,x1,v1,c37,v2/ if a(v1) then 'first key =',v1031/ 'last key =',v1032/ 'total kyes=',v1002/ fi/

5. Range of master file records related parameters

Screen 3:

Option 3: from= ; first MFN to= ; last MFN tpo= ; current MFN tag (1001) ttt= ; total records tag (1002) trp= ; reverse current MFN tag (1003) tt1= ; first MFN tag (1031) tt2= ; last MFN tag (1032) tpm= ; previous MFN tag (1011) tui= ; user identification tag (1041) tpa= ; password tag (1042)

25 tdb= ; data base name tag (1051)

Searching a sequential range of master file records is one of the methods WWWISIS offers to retrieve data from ISIS data bases. This option is particularly useful for displaying a specific record whose Mfn is known. The general parameters count, step and reverse may also be used to control the set of retrieved records.

The following fields related to the range of records retrieved are added to the record with information on the retrieval process, as for example:

1001 - current record position in non reverse display mode 1002 - total records retrieved 1003 - current record position in reverse display mode 1011 - the MFN of the previous record 1031 - first MFN displayed, i.e., the value of the from parameter 1032 - last MFN displayed, i.e., the value of the to parameter

The following is an example of a format specification of retrieved records via sequential range of master file numbers, using data fields added automatically by WWWISIS: if a(v1081) and val(v1001) = 1 or p(v1081) and val(v1003) = 1 then ' mfn 1001 1002 1003 1011 1031 1032 reverse'/ fi, mfn(5),f(val(v1001),5,0),f(val(v1002),5,0),f(val(v1003),5,0), f(val(v1011),5,0),f(val(v1031),5,0),f(val(v1032),5,0), if p(v1081) then ' yes' else ' no' fi/

6. CGI-environment virtual record related parameters

Screen 4:

Option 4: cgi= ; CGI format specification env==[, ...]; environment variables cmd= ; command format specification tcg= ; CGI transfer tag (100) pfxtag= ; tag prefix to transfer values ctttype= ; CGI content type get= ; CGI QUERY_STRING simulation

These are optional parameters related to the CGI-environment virtual record WWWISIS builds when it starts the execution.

The virtual record is accessible via the parameters cgi or cmd, which contain format specifications to dynamically generate the WWWISIS execution parameters. The parameters cgi and cmd are exclusives. When cgi parameter is present, WWWISIS adds into the CGI- environment virtual record the data transferred by the WWW server via GET or POST method. In POST method, when several call is issued to WWWISIS in a script file, the cgi processing is valid only for the first call to WWWISIS; for the next calls, no data is available in the standard input.

26 The command env is used to add environment variables into the CGI-environment virtual record. An example of variable commonly added, in an UNIX environment, is the process identification, which provides a random number that can be used, for example, to generate unique temporary file names in an multi-user environment.

The cgi parameter works only inside a CGI environment. It tells WWWISIS to process the data the WWW server transfers to the CGI environment. As already stated, these data are expected to be organized in pairs of data elements corresponding to the attributes of any HTML FORM INPUT element, the first identifying the name and the second identifying its value.

7. Data base update related parameters

Screen 5:

Option 5: read= ; read record lock id write= ; write record lock id new ; new record fst= ; fst for inverted update pend= ; pending update data base name reread ; allow same lock_id read again unlock= ; elapse seconds for unlock tul= ; lock identification tag (1101) tus= ; read/write lock status tag (1102) tum= ; MFN tag (1103)

read/write lock status possible values: 0 - successful 4 - Record not locked 1 - Data Entry Lock denied 5 - Lock id does not match 2 - Record Lock denied 6 - Inverted Update denied 3 - Record Update denied 7 - Lock expiration time not reached

The update parameters allow the creation of new records in the data base as well as the modification of existing records.

New records are appended at the end of the master file and receive the next sequential master file number; thus, if the last master file number is 155, a new record will have a Mfn equal to 156. When the parameter new is used, the use of other retrieval parameters is optional, as in the following example: wwwisis db=cds new "proc='a10{campo 10{'" pft=mfn,x1,v10/ which creates a new record with the field 10 containing campo 10. But, when the parameter new is used and a set of records is retrieved in the same WWWISIS call, a new record is created from each retrieved record, as for example: wwwisis db=cds new from=1 to=10 pft=v70/ will copy the first 10 records to the end of the data base. The parameters proc and gizmo may be used to modify the record contents.

27 Changes in existing records are done via the read and write parameters which expect a lock id as argument. The read parameter tries to lock each of the retrieved record(s) to be modified and if it succeeds, the record(s) are locked and the lock id are added into the data field 1101 ( this tag can be changed, if necessary through the parameter tul ). The write parameter asks WWWISIS to update a retrieved record if it is currently locked and the lock id specified in the write parameter matches the lock id stored in the record. This update mechanism allows the updating of records in the same or different WWWISIS calls, which is very useful in a stateless client-server and multi-user environment such as the WWW.

In the following example, the ten first records of the CDS data base are retrieved, the field 24 is deleted in every record and the records are rewritten in the same WWWISIS call; wwwisis db=cds from=1 count=10 proc='d24' read=EME write=EME pft=v24/

The same example, can be executed in two steps. In the first step, WWWISIS is called to retrieve the 10 first records and assign every record with a lock identification: wwwisis db=cds from=1 count=10 read=EME [email protected]/ where updform.pft may contain a HTML form specification to be displayed by the browser.

In the second step, WWWISIS is called to write the same 10 retrieved records with the contents generated by the parameter proc : wwwisis db=cds [email protected] from=1 count=10 write=EME [email protected]/ where updat.prc contains an update procedure and report.pft contains a report of the updating process, taking into account the return code of the update process (field tag 1102).

Sometimes, the same CGI script may be called more than once, as for example when the user clicks the reload button on the browser window. Note that after a record is read and locked, it is not possible to read it again unless the reread parameter is specified, indicating that WWWISIS is allowed to read again a locked record, assuming that the lock id matches. For example: wwwisis db=cds [email protected] from=1 count=10 write=EME reread [email protected]/

WWWISIS updating parameters are conceived to operate always in a multi-user environment as well as to facilitate the updating process in a stateless client-server context. A return code of the update operation is stored into field tag 1102. It is always recommended to check the update return code. Note that this return code is different from the WWWISIS execution exit code which is stored into data field 1091.

When WWWISIS cannot write a record in the data base, it can write it in an alternate data base specified via the pend parameter . The updating pending data base(s) should be processed later. In the following example, the pending data bases are assigned to the user name: wwwisis [email protected] 28 where the update.cgi file may contain:

‘db=cds’/ ‘[email protected]’/ ‘bool=’, (if v100^n = ‘bool’ then v100^v fi),/ ‘pend=’,(if v100^n = ‘user’ then v100^v fi),/ ‘[email protected]’/ 'read=x'/ 'write=x'/

Since in a client-server stateless environment it is very common that records remain locked, WWWISIS provides the unlock parameter to unlock records that remain locked after a given elapsed amount of time, independently of the lock identification. Only records locked by WWWISIS are unlocked. The following call unlocks records that are locked during two or more hours, or 7,200 seconds or more: wwwisis db=cds from=1 to=10 unlock=7200 pft=mfn/

The update of the inverted file is done when the fst parameter is specified with the correspondent field select table.

8. Log record field tags

Screen 7:

Log fields: cgi (1061) |step (1082) |maxlk (1121) |createinv (1244) tcg (1062) |count (1083) |stop (1201) |hltags (1251) env (1063) |posting (1084) |quit pft (1202) |hlbool (1251) pfxtag (1064) |post qtt (1085) |uctab (1211) |hltext (1252) pft (1071) |exit code(1091) |actab (1212) |freq (1271) pfttag (1072) |read (1111) |call flag (1221) |freqv (1272) pftgen (1072) |write (1112) |next (1222) |freqs (1273) proc (1073) |fst (1113) |format error (1231) gizmo (1074) |unlock (1114) |fmt err place(1232) decod (1075) |tul (1115) |proc err plac(1233) files (1076) |tus (1116) |srch err code(1234) cipar (1077) |new (1117) |srch err plac(1235) epilog (1078) |tum (1118) |notermtail (1241) prolog (1079) |pend (1119) |nomaster (1242) reverse(1081) |reread (1120) |createmst (1243) |program version(1301)

For every call, WWWISIS creates a log record just before its execution finishes. This record contains data fields that store the content of the execution parameters as well as the result of the process.

The log record may be formatted by the parameter epilog and/or stored in a data base using the parameter log . For example, the following WWWISIS call:

29 wwwisis db=cds "bool=water and plant" [email protected] log=xlog epilog=ALL will create the xlog data base with the record Mfn 1 containing the following data fields as formatted by the epilog parameter mfn=1 1071 «MFN(4),' - ',MDL,V12,V24,,(|(|V76^|: |,V76^*|) |),V70+|; |,V25,V26,V30,| (|V44|) |,V50,/|// |V71/|// |V72/|// |V74/"KEYWORDS: ",V69(10,10)/##»
1078 «ALL»
1082 «1»
1083 «2147483647»
1115 «1101»
1116 «1102»
1118 «1103»
1091 «0»
1002 «2»
1021 «water and plant»
1 «cds»

Use the epilog parameter with the keyword ALL to investigate the log record data fields present at the end of a WWWISIS run.

9. WWWISIS return codes

Screen 6:

Return codes: 0 - ok |18 - actab |36 - proc field update 1 - fatal |19 - format |37 - p101 2 - field update |20 - last MFN |38 - callflag format 3 - search syntax |21 - frequency alloc |39 - input file 4 - search run |22 - epilog |40 - FST file 5 - format syntax |23 - record update |41 - pft_gen file 6 - format run |24 - new record |42 - stop pft file 7 - 0 records retrieved|25 - update |43 - cgi/cmd proc file 8 - format is mandatory|26 - unlock |44 - format open 9 - CICGI error |27 - hits |45 - search log 10 - MAX_ARGV=80 |28 - gizmo tag |46 - HL parameter missing 11 - data base name |29 - output file |47 - HL fst generation 12 - pftgen |30 - output buffer size|48 - HL text change 13 - pending not saved |31 - cgi proc |49 - hit record 14 - couldn't start |32 - cgi format |50 - no parameters found 15 - gizmo quantity |33 - stop format |51 - next format 16 - cipar |34 - prolog format |52 - quit pft 17 - uctab |35 - proc format

The WWWISIS application does not issue any error message, excepted for low level error messages generated directly by the Cisis Interface Library (which includes for example, maximum number of opened files exceeded, out of RAM memory, data base files not found,

30 etc.). WWWISIS return codes may be processed via the epilog format or directly by the script after each call.

It is highly recommended to include the epilog parameter in each WWWISIS call in order to control its exit code, which is stored in field tag 1091 of the log record. The following is an example of an epilog format:

,If v1091 <> 0 then v1091 <> 7 then ,”
Error: código de retorno=”v1091”

” If v1091 = ‘1’ then ‘Error fatal’ else If v1091 = ‘2’ then ‘proc invalida!’ else If v1091 = ‘3’ then ‘pft invalido!’ else …. ,fi fi, fi, ,’
’ ,fi,

10. Reserved parameters

WWWISIS has several additional parameters which time reserved for BIREME internal use only. They are listed below for information only: cipchange= decod= gizad=[,] hits p101= searchlog= searchnumber= searchtagid= slogfu= tmpf= tw2mh=<1/0>

31 III. WWWISIS parameters reference manual

?

Since WWWISIS version 3.0, the ? has been replaced by args . actab= ; characters table

The represents a file name containing an ISIS alphabetical character table, i.e., a list of ascii character codes to be interpreted as part of a word for the purpose of word key extraction using inversion techniques 4 and 8. All characters not included in the table is interpreted as word separator. The actab parameter is activated by the fst parameter and used when a word extraction is present in the field select table.

Example: wwwisis db=dbx actab=/isis/menu/isisac.tab new proc='a10{xxx{' fst=cds.fst

The WWWISIS default alphabetic table is the same as the one distributed with MicroISIS.

When defining a new alphabetic table, use always three digit for each ascii character code entry. Each line, except the last, must contain 32 entries. Example:

065 066 067 068 069 070 071 072 073 074 075 076 077 078 079 080 081 082 083 084 085 086 087 088 089 090 097 098 099 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 160 161 162 163 164 165 args ; display parameters

The args parameter dumps the contents of WWWISIS parameters that follows it in the command line. The args parameter can be used in any position of the command line.

The use of args parameter is recommended for debugging purposes, particularly when the execution parameters are generated dynamically via parameters cgi or cmd.

Examples: wwwisis args [email protected] wwwisis db=cds args bool=water [email protected] bool= ; search expression

The represents either an in-line ISIS boolean search specification or a file name preceded by @ and containing an ISIS boolean search specification.

32 The bool parameter allows the retrieval of records based on a boolean expression that combines inverted file keys. According to ISIS inverted file structure, every occurrence of an inverted file keys is stored in the inverted file according to a data structure called posting, which includes four elements: Mfn ( Master file number where the key occurs ), Id ( the key identification number, as coded in the Field Selected Table ), Occ ( Occurrence of the key ) and Pos ( position of the key ).

Given two keys Considering A and B as terms, the ISIS Search Language accepts the following Boolean operators, (listed from lowest to highest priority in expression evaluation):

Operation Operator Example Posting elements (Mfn, Id, Occ, Pos) considered in the Boolean operation Or + A+B Mfn: result is the sum of all A and B postings And * A*B Mfn: result is A and B postings having same Mfn And Not ^ A^B Mfn: result is A postings with Mfn not present in B postings Group (G) A(G)B Mfn and Id: result is A and B postings having same Mfn and Id Field (F) A(F)B Mfn, Id and Occ: result is A and B postings having same Mfn, Id and Occ Adjacency . A . B Mfn, Id, Occ and Pos: result is A and B postings having same Mfn, Id, Occ and and a difference between the corresponding Pos not higher than the number of periodsproximity Adjacency $ A $ B Mfn, Id, Occ and Pos: result is A and B postings having same Mfn, Id, Occ and a difference between the corresponding Pos exactly equal to the number of dollar signsexact proximity

Cisis Interface allows the use of the words AND or and , OR or or , AND NOT or and not in place of *, + , ^ respectively. The character $ may be used to search for a root, as for example plant$. Parenthesis may be used to define the order of evaluation of the expression. See CDS/ISIS documentation for more information.

Examples: bool=water and (plant or plants) and not transpiration bool=water * (plant + plants) ^ transpiration [email protected] callflag= ; change exit code format

The represents either an in-line format specification or a file name preceded by the character @ containing a format specification. The output of the format must be a number that represents the exit code. It is generally used to customize WWWISIS exit codes.

33 Example: wwwisis db=cds "bool=water ++" [email protected] [email protected] [email protected]

Where the exit.flg contains: if val(v1091) = 7 then '0' else v1091 fi and cds.epi contains:

,select s(v1091) case '0': , case '3': 'Error: search syntax!'/, case '4': 'Error: search run-time exception!'/, case '5': 'Error: format syntax!'/, case '6': 'Error: format run-time exception!'/, elsecase "Error code "v1091, ,endsel, cgi= ; CGI format parameters

The represents either an in-line format specification or a file name preceded by the character @ containing a format specification. The output of the format is interpreted as new parameters to WWWISIS. Each new parameters should be formatted in a new line. The format specification acts over the CGI-environment ISIS virtual record that WWWISIS creates when it starts.

Examples: wwwisis [email protected] wwwisis "cgi='db=cds'/, 'from=1'/,'to=3'/,'pft=mfn/'" wwwisis db=cds "cgi='from=1'/,'to=3'/,'pft=mfn/'" cipar= ; CISIS parameter file

The represents the name of a Cisis parameter file.

A CISIS parameter file is an ASCII file used in WWWISIS to redefine file path and names. Each line of the parameter file represents an input logical name followed by = sign and the output physical name.

Example:

CDS.*=c:\isis\data\cds\cds.* will translate all logical file names CDS into the physical file names c:\isis\data\cds .

34 CISIS parameter file contents are case sensitive. Thus, in the above example, CDS.mst will be translated to c:\isis\data\cds, while cds.mst will not.

Logical entries can be used in the following WWWISIS parameters: bool, cgi, cmd , db, epilog, fst, gizmo, log, pft and proc parameters.

Example:

CISIS parameter file may be used to enable the access to physical master and inverted files with different names: wwwisis cipar=author.cip db=cds bool=magalhaes$ pft=mfn/ where the file author.cip contains: cds.mst=/bases/cds/cds.mst cds.xrf=/bases/cds/cds.xrf cds.cnt=/bases/cds/author.cnt cds.cnt=/bases/cds/author.cnt cds.n01=/bases/cds/author.n01 cds.n02=/bases/cds/author.n02 cds.l01=/bases/cds/author.l01 cds.l02=/bases/cds/author.l02 cds.ifp=/bases/cds/author.ifp cmd= ; environment format parameters

The represents either an in-line format specification or a file name preceded by the character @ containing a format specification. The output of the format is interpreted as new parameters to WWWISIS. Each new parameters should be formatted in a new line. The format specification acts over the CGI-environment ISIS virtual record that WWWISIS creates when it starts.

The parameters cmd and cgi are exclusives. Therefore, when the cmd parameter is present, WWWISIS will not add automatically the field tag 100 into the CGI-environment virtual record.

When the cmd parameter is specified, the only one way to add data into the virtual record is through the parameter env to add the value of environment variables. It is also possible to format records from different physical data bases via the ref (reference) and l (look-up) format commands.

Examples: wwwisis [email protected] wwwisis "cmd='db=cds'/, 'from=1'/,'to=3'/,'pft=mfn/' " wwwisis db=cds "cmd='from=1'/,'to=3'/,'pft=mfn/' "

35 count= ; display n

The represents the maximum number of retrieved records to be processed by WWWISIS. If the number of retrieved records is less than , all records will be processed.

Examples: wwwisis db=cds bool=a$ count=10 pft=mfn/ wwwisis db=cds k1=A k2=AZZZZ count=10 pft=v1/ create ; create data base createinv ; create inverted files createmst ; create master files

These parameters are used to create master and/or inverted files corresponding to the data base name specified in parameter db . Note that if the master and/or inverted file already exist, they are initialized.

Example: wwwisis db= create pft=, wwwisis db=z createmst pft=, wwwisis db=z createinv pft=, ctttype= ; CGI content type

The represents the content type of the text that WWWISIS outputs. When the parameter ctttype is present, WWWISIS automatically outputs two lines corresponding to the http document header. The second line is always a blank line.

Example: wwwisis ctttype=text/plain menu=6 db= ; data base name

The represents either a logical or physical data base name. If is a logical name, a Cisis parameter file needs to be set up.

The name of the database is a mandatory parameter in every WWWISIS call.

If the data base name and/or path is incorrect, CISIS issues the following message: dbxopen: 'cds.xrf' errno=2 fatal: dbxopen/open

36 Examples: wwwisis db=c:\bases\cds\cds bool=water$ [email protected] wwwisis cipar=files.par db=CDS bool=water$ [email protected]

In this case, one of the lines of the files.par is:

CDS.*= c:\bases\cds\cds.* env==[, ...] ; environment variables

The represents a name of an environment variable and a data field tag in the CGI- environment virtual record, where the value of the environment variable will be added. This virtual record is available when WWWISIS is started and can be formatted via cgi or cmd. It is possible to add one or more environment variables.

Example: export SYSTEM=test export PROCESS=$$ wwwisis env=PROCESS=201,SYSTEM=202 [email protected] where genpar.cgi could contain:

'db=',if v202 = 'test' then 'test' else 'cds' fi / 'bool=water$'/ '[email protected]'/ 'log=L', v201/ epilog= ; epilogue format

The represents either an in-line format specification or a file name, preceded by the character @ , and containing a format specification. The output of the format is sent to the standard output. The format specification is applied over the virtual log record that WWWISIS creates when it finishes the execution.

Example: wwwisis db=cds bool=water$ pft=mfn/ [email protected]

37 where rc.pft could contain: if val(v1091) = 7 then , ' No records retrieved.' /, else, if val(v1091) = 3 then , 'Search syntax error' /, else, if val(v1091) = 4 then 'Search execution error' / fi, fi, fi, files= ; maximum open files

The represents the maximum number of MS/DOS open files needed in a WWWISIS call. The MS/DOS default value is 20. Since WWWISIS can access several databases in one run, this parameter allows the modification of the default value. The corresponding CONFIG.SYS parameter FILES= must be set previously, with greater or equal to .

Example: wwwisis files=80 db=cds [email protected] bool=water$

The files parameter applies only for WWWISIS version for 16 bits. from= ; first MFN

The represents the lowest Master File Number to be processed.

Examples: wwwisis db=cds from=10 count=3 pft=mfn/ wwwisis db=cds from=10 count=3 pft=mfn/ reverse wwwisis db=cds from=10 to=13 pft=mfn/ wwwisis db=cds from=10 to=13 pft=mfn/ reverse wwwisis db=cds bool=w$ from=5 to=7 pft=mfn/

38 fst= ; fst for inverted update

The represents either an in-line Field Select Table specification or a file name, preceded by the character @ , and containing a Field Select Table.

The fst parameter inverts new records created via the parameter new or existent records updated via the parameter write .

It is recommended to check the return code from the inversion operation. Record update return codes are stored in field 1102 and may contain the following values:

0 - successful 1 - Data Entry Lock denied 2 - Record Lock denied 3 - Record Update denied 4 - Record not locked 5 - Lock id does not match 6 - Inverted Update denied 7 - Lock expire time not reached

Example of a new record creation: wwwisis in=newrec where the newrec file contains: db=cds new proc='a24{Magalhaes, Elisabeth{a24{A wwwisis advanced application{' [email protected] pft=@chkrc

Example of update of an existent record: wwwisis db=cds read=xxx proc='d*' from=156 [email protected] write=xxx pft=@chkrc where chkrc may contain: if val(v1102) <>6 then ' Inverted file NOT done! rc=', v1102/fi get= ;CGI QUERY_STRING simulation

The is set into the environment variable QUERY_STRING. If the cgi parameter is present the content of QUERY_STRING is added into the CGI-environment virtual record WWWISIS create when it starts. The purpose of the get parameter is simulate the CGI environment in a WWWISS command line call, so it can be used for debugging or testing purposes. The parameter get simulates http GET method of transferring data. 39 Example: wwwisis "get=db=cds&bool=plants and water" "cgi=(v100^n,|=|v100^v/)" [email protected] gizmo=[,] ; gizmo data base name

The represents the name of an ISIS master file containing a gizmo global change table and the represents an optional list of tags to be changed. The gizmo data base contains one record for each gizmo; a gizmo is coded in fields tag 1 and 2 and, optionally, fields tags 11 and 21, according to: tag contents 1 input value to be changed 2 output value if input value is found 11 value asc if characters in field 1 is represented by their ascii code value hex if characters in field 1 is represented by their hexadecimal code 21 value asc if characters in field 2 is represented by their ascii code value hex if characters in field 2 is represented by their hexadecimal code

Example: wwwisis db=cds gizmo=html bool=sedimentation pft=v24/ where html gizmo data base may contain the following records:

mfn= 1 1 «é» 2 «é» mfn= 2 1 «è» 2 «è» h1= ; first hit

The represents the lowest search hit number to be processed. If the number of hits retrieved is less than no record is processed.

Example: wwwisis db=cds bool=w$ h1=11 h2=20 [email protected]

40 h2= ; last hit

The represents the highest search hit number to be processed if it exists. Example: wwwisis db=cds bool=w$ h1=11 h2=20 [email protected] hello ; hello message

When this parameter is present, WWWISIS outputs a hello message. This parameter is generally used for testing purposes.

Example: http://cgi-bin/wwwisis.exe/[hello]/ hlbool= ; fst for search high light hltext= ; fst for text high light

The represents either an in-line Field Select Table (fst) specification or a file name, preceded by the character @ , and containing a Field Select Table. These parameters are used to identify in the retrieved records the search terms entered as argument in bool parameter. The identified search terms may be highlighted via HTML elements. hlbool fst is applied to every retrieved record to generate links that coincides with the inverted file key terms. The generated links ids must coincides with the actual data field tags from where the links are extracted. Note that the link ids in fsts used for generating inverted files do not necessarily coincide with the data field tags. For example, the CDS data base may be inverted using the following fst:

1 0 mpl,(|AU=|V70/) 2 4 mpl,V24,/,v69/ 3 2 mpl,V69/

The hlbool fst must use the actual data field tags to identify the links:

70 0 mpl,(|AU=|V70/) 24 4 mpl,V24,/ 69 4 mpl,v69/ 69 2 mpl,V69/

This fst generates a list of links for every retrieved record. These links should coincide with the actual terms in the inverted file. In most cases, hlbool fst is the same or very similar to the fst used to generate the inverted file, including prefixes that may be used to qualify inverted terms.

41 WWWISIS parses the search terms and try to identify every search term in the list of links produced by hlbool fst. When a search term is found in this list of links, WWWISIS tries to locate it in the corresponding data field. When a search term is located, WWWISIS attaches a prefix and a suffix according to the specification produced by the hltext fst. hltext fst is applied to every retrieved record to generate links that contains the specification of prefixes and suffixes strings to be attached to the search terms found in the corresponding data field tags of the retrieved records. The prefixes and suffixes are specified in the generated links through a structure of subfields, according to the following table:

Subfield Description

^1 prefix ^2 suffix ^3 data subfield identifier where search term is located, if applicable ^4 search term prefix, not present in the data, if applicable ^5 search term suffix, not present in the data , if applicable ^6 search term translation table, if applicable

The following hltext fst permits to display the search terms in blue:

70 0 '^1^2^4AU=' 24 0 '^1^2' 69 0 '^1^2' hltags= ; fst for tags high light

The represents either an in-line Field Select Table (fst) specification or a file name, preceded by the character @ , and containing a Field Select Table. This parameters is used to identify in the retrieved records strings generated by the fst. The identified strings may be highlighted via HTML elements. Note that hltags parameter does not require the bool parameter, i.e., it applies to all methods of retrieving records. hltags fst generates a list of links for every retrieved record. WWWISIS tries to locate each link string in the corresponding data field. When a string is located, WWWISIS attaches a prefix and a suffix according to the specification produced by the hltext fst.

Example: wwwisis db=cds to=5 pft=v24/ "hltags=24 0 mpl,V24" "hltext=24 0 '^1^2'" in=

The represents the name of a file containing WWWISIS execution parameters. Each line of the file represents a parameter. The technique of using in file to parameterize WWWISIS may be used in all methods of calling WWWISIS. It is particularly appropriated 42 when passed to the CGI environment via the CGI PATH_INFO environment variable, the recommended way to call WWWISIS in Windows NT IIS.

Examples: http:/cgi-bin/wwwisis.exe/[in=goparm.in]/ wwwisis in=param.in

Where param.in may contain: args db=cds bool=water$ pft=mfn/

The following example shows that input file parameter may be used together with parameters issued in command line and or generated via cgi parameter file: wwwisis db=cds in=param.in

Where param.in contains: [email protected] [email protected] [email protected] k1= ; first inverted file key

The represents the lowest inverted file key to be retrieved. If not present in the inverted file, the next key is returned. Every retrieved inverted file key is stored in the field tag 1 of an ISIS master file record and the correspondent number of postings in the field tag 2. This record is kept only in memory and has always Mfn equal 1. If the posting parameter is present, WWWISIS loops over the postings of each key and stores the posting elements in field tag 3.

If notermtail parameter is specified, WWWISIS creates an additional instance of record after the last key is processed - a summary record, which contains the following fields:

1002 - total number of keys displayed 1031 - the first key retrieved, nearest to k1 1032 - the last key retrieved, nearest to k2

Example: wwwisis db=cds k1=w pft=@showks

43 where the showks contains: if val(v1001) = 1 then 'Postings Key' fi /, if p(v1) then f(val(v2),5,0),x7,v1/, else , ' first key= ',v1031/ ' last key= ',v1032/ ' total keys= ',v1002/, fi

When no argument is supplied for k1 parameter, WWWISIS start at the first key of the inverted file. Example: wwwisis db=cds k1= step=100 pft=v1/ k2= ; last inverted file key

The represents the highest inverted file key to be retrieved. If not present in the inverted file, the nearest previous key is considered the highest key. Every retrieved inverted file key is stored in the field tag 1 of an ISIS master file record and the correspondent number of postings in the field tag 2. This record is kept only in memory and has always Mfn equal 1. If the posting parameter is present, WWWISIS loops over the postings of each key and stores the posting elements in field tag 3.

If notermtail parameter is specified, WWWISIS creates an additional instance of record after the last key is processed, which contains the following fields:

1002 - total number of keys displayed 1031 - the first key retrieved, nearest to k1 1032 - the last key retrieved, nearest to k2

Example: wwwisis db=cds k2=ZZZZZZZZZZZZ pft=@lowhigh where the lowhigh contains: if a(v1) then

' lowest key found was ',v1031/ ' highest key found was ',v1032/ fi

44 log= ; log data base name

The represents the name of an ISIS master file where WWWISIS will write the log record, created at the end of the process. The log record may contain the following data fields:

cgi (1061) tcg (1062) env (1063) pfxtag (1064) pft (1071) pfttag (1072) pftgen (1072) proc (1073) gizmo (1074) decod (1075) files (1076) cipar (1077) epilog (1078) prolog (1079) reverse (1081) step (1082) count (1083) posting (1084) post qtt (1085) exit code (1091) read (1111) write (1112) fst (1113) unlock (1114) tul (1115) tus (1116) new (1117) tum (1118) pend (1119) reread (1120) maxlk (1121) stop (1201) quit pft (1202) uctab (1211) actab (1212) call flag (1221) next (1222) format error (1231) fmt err place (1232) proc err plac (1233) srch err code (1234) srch err plac (1235) notermtail (1241) nomaster (1242) createmst (1243) createinv (1244) hltags (1251) hlbool (1251) hltext (1252) program version (1301)

45 Examples: wwwisis db=cds from=1 reverse pft=mfn,',' log=xlog wwwisis db=xlog from=1 pft=ALL maxlk= ; maximum link terms (fst)

The argument represents the maximum number of links WWWISIS should generate when applying a fst specification in a record. The default value is 500 links per record.

Example: wwwisis db=text from=1 to=5 read=x “fst=1 4 mpl,v1/” write=x pft=v1102/ maxlk=1000 menu= ; specific parameters menu

The represents the number of the internal menu to be displayed by WWWISIS.

Examples: wwwisis menu=6 new ; new record

The new parameter creates a new record in the data base defined in the parameter db . The Mfn of the new record is the next sequential number after the actual highest Mfn in the data base. WWWISIS requires data entry lock in order to successfully create a new record. Use fst parameter to invert the newly create record. The information field tag 1102 contains the return code of the operation, which may be:

0 - successful 1 - Data Entry Lock denied 2 - Record Lock denied 3 - Record Update denied 4 - Record not locked 5 - Lock id does not match 6 - Inverted Update denied 7 - Lock expire time not reached

Examples: wwwisis db=cds new pft=@checkrc where checkrc may contain:

46 if val(v1102) <> 0 then 'Record not created: rc=',v1102,'!', fi next= ; wwwisis loop

The represents either an in-line format specification or a file name, preceded by the character @ , and containing a format specification. This format is applied on the LOG record and behaves like the cgi parameter format since its output is interpreted as recursive call to WWWISIS.

Example: wwwisis db=cds to=10 pft=mfn/ "next='db=thes'/,'to=10',/,'pft=mfn/'/" nomaster ; no master files

This parameter is used to indicate that there is no master file for the data base name specified in db parameter. It is used together with k1 and/or k2 parameters for retrieving keys from inverted files with no corresponding master file.

Example: wwwisis db=author k1=a nomaster pft=v1/ notermtail ; no term tail generation

This parameter is used to disable the generation of the summary record at the end of the processing of inverted file keys via k1 and/or k2 parameters.

Example: wwwisis db=cds k1=a k2=azzzzz pft=v1/ notermtail out= ; output file name outapp= ; append output file name

The contains a file name where WWWISIS will write the output. When out or outapp parameter is specified, WWWISIS does not write the output into the system standard output and therefore nothing is send back to the browser. If does not exist, out and outapp are equivalents, but if exist, out will initialize it whereas outapp will append the output.

Example: wwwisis db=cds from=1 [email protected] out=cds.lst

47 pass= ; user password

The represents an user password that is added in the input record in the information field 1042. The format specification in the parameter pft may check the against a data base.

Example: wwwisis db=userdb from=1 count=1 user=ELISA pass=EVOLA pft=@chkuser where chkuser may contain the following format specification: if ref (l(mpu,v1041), mpu,v2) <> s(mpu,v1042) then 'User password invalid!'fi

(note that the userdb contains the user password in field tag 2 and the user identification inverted) pend= ; pending update data base name

The represents the name of an alternate ISIS master file where WWWISIS will write the new or updated record when the input data base specified in the parameter db is locked.

The return code of an update operation is stored in the information process field tag 1102. When the return code is 1 thru 5, WWWISIS writes the new or updated record in the pending data base. When writing to the pending data base also unsucceeds, WWWISIS exit code is set to 12 (stored in the log record, data field tag 1091 ).

Records are appended in the pending data base. A special process is expected to collect the pending data bases records and add them into the input data base. The data field tag 1103 contains the MFN of the record in the input data base (if the update record may contain the field tag 1103, use the parameter tum to assign a different tag number). wwwisis [email protected]

48 Where genparm.cgi may contain:

‘db=’, (if v100^n = ‘base’ then v100^v fi),/ ‘new’,/ ‘proc=’,”a{“v1”{“,”a{“v2”{“,”a{“v3”{“,/, ‘user=’,(if v100^n = ‘user’ then v100^v fi),/, ‘pend=’,(if v100^n = ‘user’ then v100^v fi),/, ‘[email protected]’,/ ‘[email protected]’,/ ‘[email protected]’,/

In this example, the pending data base name is identical to the user name which is transferred via the input field user . pfxtag= ; tag prefix to transfer values

The activates the WWWISIS tagging schema based on the content of the HTML name attribute of the input field. The presence of the pfxtag parameter only makes sense when the cgi parameter is present. Since pfxtag drives the way cgi parameter applies the tagging schema, it cannot be generated by the cgi format, i.e., pfxtag must be coded in the line command before the cgi parameter. Example: wwwisis pfxtag=tag [email protected]

When the parameter pfxtag is present, WWWISIS check the content of each input field name attribute in order to assign a specific tag. If name contains the same prefix specified in pfxtag parameter, followed by a number, this will be the data field tag number in which value will be stored in the CGI-environment virtual record; otherwise, if name contains the sub-field identifier ^t followed by a number, this will be the data field tag number in which value will be stored in the CGI-environment virtual record.

The ^r followed by an ASCII code may be added in the name attribute to indicate the ASCII character to separate occurrences of a repeatable field.

The ^w may be added in the name attribute to indicate that the field should be stored directly into the updated records and not into the CGI-environment virtual record. The ^w indicator may be used together with the ^t in which case it may or may not be followed by a tag number. pft= ; display format specification

The represents either an in-line format specification or a file name, preceded by the character @ , and containing a format specification.

The display format specification is mandatory in every WWWISIS call. It may be specified via the pft parameter ( or pfttag or pftgen parameters) . It accepts all CDS/ISIS 3.07 format specification commands, except format exits. In addition, several CISIS Library format

49 extensions may be used (See Annex 1). When is equal to ALL , WWWISIS dumps all record contents.

The result of the format is sent to the standard output. In a CGI environment, the output is read by the WWW server, which in turn sends it to the client browser. This mechanism permits the generation of HTML compliant texts in a dynamic way. In general, the HTML elements and attributes are defined via conditional and unconditional literals. But it may be also embedded in the contents of the data fields as in the cases of full text data bases. In particular, interactive search applications may be developed by using the format to generate HTML forms; when the interaction involves several different states, it is necessary to use FORM hidden input fields in order to transfer or amplify data between states.

Example: wwwisis db=cds from=1 pft=ALL wwwisis db=cds to=8 [email protected] where cdsx.pft contains: v24*0.20,c26,v70[1](25,25),if nocc(v70)>1 then ' et all' fi/ wwwisis db=cds to=8 pft=@html epilog='' where html contains: if val(v1001) = 1 then ''/ ''/ '

'/, fi, ''/ pftgen=

The represents either an in-line format specification or a file name, preceded by the character @ , and containing a format specification. The result of the format is the actual format specification to format the retrieved records. The pfttag , pft and pftgen parameters are exclusives.

50 Example: wwwisis db=cds [email protected] from=1 where onfly.pft may contain:

‘f(mfn,1,0),’, if v10 : ‘1’ then ‘@format1.pft,’ else ‘@formatx.pft,’ fi, pfttag= ; tag with display format specification

The represents a field tag of the current record that contains a format specification. The pfttag , pft and pftgen parameters are exclusives. The pfttag parameter allows the use of specific format for individual records.

Example: wwwisis db=cds from=1 proc='a750{v24/{' pfttag=750 posting posting=

The presence of the posting parameter when retrieving records via k1 and/or k2 parameters, allows the access to the posting of each inverted file key retrieved. If argument is present, it indicates the maximum number of postings to be processed per retrieved key.

Every retrieved inverted file key is stored in the field tag 1 of an ISIS master file record and the correspondent number of postings in the field tag 2. WWWISIS loops over the postings of each key and stores the posting elements in field tag 3 as subfields. This record is kept only in memory and has always Mfn equal 1.

The posting elements are described in the table below:

Subfield Description ^i Posting sequence number ^m Master file number ^t FST line ID ^ Occurrence ^c Position

51 Example: wwwi32 db=cds k1=w k2=wzzz pft=v1,x1,v2,c40,v3(40,40)/ posting=3 proc= ; CISIS field update specification

The represents either an in-line format specification or a file name, preceded by the character @ , and containing a format specification. The output of the format is interpreted as a CISIS field update specification.

A CISIS field update specification is a string of d (delete) and a (add) field commands to be applied in the current record. WWWISIS carry out the changes in memory. In order to save them in the data base, use the update parameters. The following commands are available:

D* deletes all present fields Dtt deletes all occurrences of tag tt Dtt/occ deletes occurrence occ of tag tt Att#str# adds string str as a new occurrence of tt Htt n str adds string str, n bytes long, as a new occurrence of tt

Examples: wwwisis db=cds "proc='d70',|a10#|v70|#|" pft=(v70/) will delete field 70 and add the contents of it into field 10, i.e. renumber field 70 into field 10. The # delimiter may be any non numeric character. wwwisis db=cds "proc=if v24*0.4 = 'Tech' then 'D*' fi" pft=v24/ will delete all fields if the first 4 characters of field 24 equal to 'Tech' . prolog= ; cgi and environment format

The represents either an in-line format specification or a file name preceded by the character @ containing a format specification. The output of the format is sent directly to the standard output. The format specification acts over the CGI-environment virtual record that WWWISIS creates when it starts. It is also possible to format records from different physical data bases via the ref (reference) and l (look-up) format commands ( see Annex 1).

The prolog parameter is commonly used to generate the head of the text in the standard output.

Examples: wwwisis [email protected] db=cds from=1 pft=mfn/

52 where head.pft contains the following format specification:

'

Example of WWWISIS output
' quitpft= ; quit pft loop

The represents either an in-line format specification or a file name preceded by the character @ containing a format specification. If any output is produced, WWWISIS interrupts the execution.

Example: wwwisis db=cds from=1 [email protected] “quitpft=if mfn>10 then ‘x’ fi“ read= ; read record lock id

The represents a lock identification which is stored in the information field tag 1101 when a record is read and successfully locked for updating in the current or in a later run of WWWISIS. The is used in the write parameter when updating the record in the data base. WWWISIS supposes that all update is performed in a multi-user environment.

It is recommended to check the return code from the read operation. Record update return codes are stored in field 1102 and may contain the following values:

0 - successful 1 - Data Entry Lock denied 2 - Record Lock denied 3 - Record Update denied 4 - Record not locked 5 - Lock id does not match 6 - Inverted Update denied 7 - Lock expire time not reached

Example: wwwisis db=cds from=1 read=X pft=@chkrc where chkrc may contain: if val(v1102) > 0 then 'Record was not read! return code=', v1102 fi reread ; allow same lock_id read again

The presence of the reread parameter allows WWWISIS read again a record that is already locked, provided that the read lock id argument matches the WWWISIS update lock id stored previously in the record. The reread parameter is useful when updating of a record is requested to be start all over again.

53 Example: wwwisis db=cds read=sz reread from=10 count=1 [email protected] reverse ; display on reverse sequence

The presence of the reverse parameter drives WWWISIS to process records starting from the highest Mfn or inverted file key retrieved.

Example: wwwisis db=cds from=1 pft=mfn(3),'-' reverse wwwisis db=cds from=150 pft=mfn(3),'-' reverse wwwisis db=cds from=1 count=10 pft=mfn(3),'-' reverse wwwisis db=cds from=1 to=10 pft=mfn(3),'-' reverse wwwisis db=cds k1=w k2=n step=100 reverse pft=v1/ step= ; display every n

The represents a sample rate of the retrieved master file records or inverted file keys to be processed. The default value is 1.

Example: wwwisis db=cds from=1 step=10 pft=mfn/ wwwisis db=cds k1= step=10 pft=v1/ stop= ; semaphore format

The represents either an in-line format specification or a file name preceded by the character @ containing a format specification. The output of the format is sent directly to the standard output. The format specification acts over the CGI-environment virtual record that WWWISIS creates when it starts. It is also possible to format records from different physical data bases via the ref (reference) and l (look-up) format commands ( see Annex 1).

If the format produces any output, WWWISIS interrupts the execution. The stop parameter is used as a semaphore function. Thus, it may check for different conditions before the actual execution, as for example, user name and password, system availability, data entry consistency, etc. Example: wwwisis [email protected] [email protected]

54 The keyfmt.stp may contain:

,If s(ref([‘user’]l([‘user’],mpu,v1041),v2)) <> s(V1042) then , ‘User login or password incorrect!. Execution interrupted!’ , else, ,if s(ref([‘semaph’]1,v1)) = ‘red’ then , ‘System not available! Try later!’ ,fi, ,fi, t..= ; reassign information field tag

The represents a new tag to be assigned to a WWWISIS process information data field identified by the parameter t.. The following table identify the information fields, the default tags and the correspondent parameters to reassign the tags:

Information field Parameter Default tag

Current hit position tag tpo 1001 Total records tag ttt 1002 Reverse current hit position tag trp 1003 First hit tag tt1 1031 Last hit tag tt2 1032 Previous hit MFN tag tpm 1011 Search expression tag tbo 1021 User identification tag tui 1041 Password tag tpa 1042 Data base name tag tdb 1051 First term tag tt1 1031 Last term tag tt2 1032 User identification tag tui 1041 Password tag tpa 1042 Data base name tag tdb 1051 Current key tag tck 1 Current key postings tag tpt 2 Current posting data tps 3 Current MFN tag tpo 1001 Total records tag ttt 1002 Reverse current MFN tag trp 1003 First MFN tag tt1 1031 Last MFN tag tt2 1032 Previous MFN tag tpm 1011 User identification tag tui 1041 Password tag tpa 1042 Data base name tag tdb 1051 CGI transfer tag tcg 100 Lock identification tag tul 1101 Read/write lock status tus 1102 Pending MFN tag tum 1103

55 Example: wwwisis tcg=2001 cgi=@genparm to= ; last MFN

The represents the highest Master File Number to be processed.

Examples: wwwisis db=cds from=10 to=13 pft=mfn/ wwwisis db=cds from=10 to=13 pft=mfn/ reverse wwwisis db=cds bool=w$ from=5 to=7 pft=mfn/ uctab= ; upper case table

The represents a file name containing an ISIS upper case conversion character table, i.e., 256-character codes table representing for each ASCII character code the corresponding upper case character. The upper case table is activated when one of the format upper case mode command ( mpu, mhu, mdu ) is present, and to convert inverted file keys to upper case, during the updating of the inverted file as well as during searching.

Example: wwwisis db=cds uctab=/isis/menu/isisuc.tab new fst=cds.fst

The WWWISIS default alphabetic table is the same as the one distributed with MicroISIS.

When defining a new upper case table, always use three digit for each ascii character code entry. Each line has 32 entries. The following table applies to ANSI character set:

000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 069 070 071 072 073 074 075 076 077 078 079 080 081 082 083 084 085 086 087 088 089 090 091 092 093 094 095 096 065 066 067 068 069 070 071 072 073 074 075 076 077 078 079 080 081 082 083 084 085 086 087 088 089 090 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 138 155 140 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 065 065 065 065 065 065 065 067 069 069 069 069 073 073 073 073 068 078 079 079 079 079 079 215 216 085 085 085 085 089 222 223 065 065 065 065 065 065 065 067 069 069 069 069 073 073 073 073 208 078 079 079 079 079 079 247 216 085 085 085 085 221 222 221 unlock= ; elapse seconds for unlock

The represents the number of seconds after which locked records and having a WWWISIS lock id will be unlocked. The record lock id is stored by WWWISIS in the information field tag 1101 when a record is successfully locked via the parameter read. 56 It is recommended to check the return code from the unlock operation. Record update return codes are stored in field 1102 and may contain the following values:

0 - successful 1 - Data Entry Lock denied 2 - Record Lock denied 3 - Record Update denied 4 - Record not locked 5 - Lock id does not match 6 - Inverted Update denied 7 - Lock expire time not reached

Example: wwwisis db=cds from=1 unlock=3600 pft=@chkrc where chkrc contains: if val(v1102) = 0 then mfn,' unlocked! '/ fi user= ; user identification

The represents an user identification that is added in the input record in the information field 1041. The format specification in the parameter pft may check the against a data base.

Example: wwwisis db=cds from=1 count=1 pft=@chkuser user=ELISA where chkuser may contain the following format specification: if val(v1001) = 1 then if ref(['userdb']l(['userdb']v1041), 'ok' ) <> 'ok' then 'User login invalid! ', fi, fi write= ; write record lock id

The represents an identification that will be checked against the lock identification stored in the information field tag 1101 of the current record. If they match, WWWISIS will try a data entry lock and if it succeeds the record will be updated. The lock identification is added by the parameter read in the same or in a previous run of WWWISIS.

57 It is recommended to check the return code from the write operation. Record update return codes are stored in field 1102 and may contain the following values:

0 - successful 1 - Data Entry Lock denied 2 - Record Lock denied 3 - Record Update denied 4 - Record not locked 5 - Lock id does not match 6 - Inverted Update denied 7 - Lock expire time not reached

Example: wwwisis db=cds from=1 write=X pft=@chkrc where chkrc may contain: if val(v1102) > 0 then 'Record was not updated! return code=', v1102 fi

58

',v24, '',|
|+v70 '