home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
- MONITOR(QUEL) 2/23/79 MONITOR(QUEL)
-
-
-
- NAME
- monitor - interactive terminal monitor
-
- DESCRIPTION
- The interactive terminal monitor is the primary front end to
- INGRES. It provides the ability to formulate a query and
- review it before issuing it to INGRES. If changes must be
- made, one of the UNIX text editors may be called to edit the
- _q_u_e_r_y _b_u_f_f_e_r.
-
- _M_e_s_s_a_g_e_s _a_n_d _P_r_o_m_p_t_s.
-
- The terminal monitor gives a variety of messages to keep the
- user informed of the status of the monitor and the query
- buffer.
-
- As the user logs in, a login message is printed. This typi-
- cally tells the version number and the login time. It is
- followed by the dayfile, which gives information pertinant
- to users.
-
- When INGRES is ready to accept input, the message ``go'' is
- printed. This means that the query buffer is empty. The
- message ``continue'' means that there is information in the
- query buffer. After a \go command the query buffer is au-
- tomatically cleared if another query is typed in, unless a
- command which affects the query buffer is typed first.
- These commands are \append, \edit, \print, \list, \eval, and
- \go. For example, typing
- help parts
- \go
- print parts
- results in the query buffer containing
- print parts
- whereas
- help parts
- \go
- \print
- print parts
- results in the query buffer containing
- help parts
- print parts
- An asterisk is printed at the beginning of each line when
- the monitor is waiting for the user to type input.
-
- _C_o_m_m_a_n_d_s
-
- There are a number of commands which may be entered by the
- user to affect the query buffer or the user's environment.
- They are all preceeded by a backslash (`\'), and all are ex-
- ecuted immediately (rather than at execution time like
- queries).
-
- Some commands may take a filename, which is defined as the
- first significant character after the end of the command un-
- til the end of the line. These commands may have no other
- commands on the line with them. Commands which do not take
- a filename may be stacked on the line; for example
- \date\go\date
- will give the time before and after execution of the current
- query buffer.
-
- \r
- \reset Erase the entire query (reset the query buffer).
- The former contents of the buffer are irretrieve-
- ably lost.
-
- \p
- \print Print the current query. The contents of the
- buffer are printed on the user's terminal.
-
- \l
- \list Print the current query as it will appear after
- macro processing. Any side effects of macro pro-
- cessing, such as macro definition, will occur.
-
- \eval Macro process the query buffer and replace the
- query buffer with the result. This is just like
- \list except that the output is put into the query
- buffer instead of to the terminal.
-
- \e
- \ed
- \edit
- \editor Enter the UNIX text editor (see ED in the UNIX
- Programmer's Manual); use the ED command 'w' fol-
- lowed by 'q' to return to the INGRES monitor. If
- a filename is given, the editor is called with
- that file instead of the query buffer. If the
- macro ``{editor}'' is defined, that macro is used
- as the pathname of an editor, otherwise
- ``/bin/ed'' is used. It is important that you do
- not use the ``e'' command inside the editor; if
- you do the (obscure) name of the query buffer will
- be forgotten.
-
- \g
- \go Process the current query. The contents of the
- buffer are macro processed, transmitted to INGRES,
- and run.
-
- \a
- \append Append to the query buffer. Typing \a after com-
- pletion of a query will override the auto-clear
- feature and guarantees that the query buffer will
- not be reset.
-
- \time
- \date Print out the current time of day.
-
- \s
- \sh
- \shell Escape to the UNIX shell. Typing a control-d will
- cause you to exit the shell and return to the
- INGRES monitor. If there is a filename specified,
- that filename is taken as a shell file which is
- run with the query buffer as the parameter ``$1''.
- If no filename is given, an interactive shell is
- forked. If the macro ``{shell}'' is defined, it
- is used as the pathname of a shell; otherwise,
- ``/bin/sh'' is used.
-
- \q
- \quit Exit from INGRES.
-
- \cd
- \chdir Change the working directory of the monitor to the
- named directory.
-
- \i
- \include
- \read Switch input to the named file. Backslash charac-
- ters in the file will be processed as read.
-
- \w
- \write Write the contents of the query buffer to the
- named file.
-
- \branch Transfer control within a \include file. See the
- section on branching below.
-
- \mark Set a label for \branch.
-
- \<any other character>
- Ignore any possible special meaning of character
- following '\'. This allows the '\' to be input as
- a literal character. (See also quel(quel) -
- strings). It is important to note that backslash
- escapes are sometimes eaten up by the macro pro-
- cessor also; in general, send two backslashes if
- you want a backslash sent (even this is too
- simplistic [sigh] - try to avoid using backslashes
- at all).
-
- _M_a_c_r_o_s
-
- For simplicity, the macros are described in the section
- macros(quel).
-
- _B_r_a_n_c_h_i_n_g
-
- The \branch and \mark commands permit arbitrary branching
- within a \include file (similar to the ``goto'' and ``:''
- commands in the shell). \mark should be followed with a la-
- bel. \branch should be followed with either a label, indi-
- cating unconditional branch, or an expression preceeded by a
- question mark, followed by a label, indicating a conditional
- branch. The branch is taken if the expression is greater
- than zero. For example,
- \branch ?{tuplecount}<=0 notups
- branches to label ``notups'' if the ``{tuplecount}'' macro
- is less than or equal to zero.
-
- The expressions usable in \branch statements are somewhat
- restricted. The operators +, -, *, /, <=, >=, <, >, =, and
- != are all defined in the expected way. The left unary
- operator ``!'' can be used as to indicate logical negation.
- There may be no spaces in the expression, since a space ter-
- minates the expression.
-
- _I_n_i_t_i_a_l_i_z_a_t_i_o_n
-
- At initialization (login) time a number of initializations
- take place. First, a macro called ``{pathname}'' is defined
- which expands to the pathname of the INGRES subtree (normal-
- ly ``/mnt/ingres''); it is used by system routines such as
- demodb. Second, the initialization file .../files/startup
- is read. This file is intended to define system-dependent
- parameters, such as the default editor and shell. Third, a
- user dependent initialization file, specified by a field in
- the users file, is read and executed. This is normally set
- to the file ``.ingres'' in the user's home directory. The
- startup file might be used to define certain macros, execute
- common range statements, and soforth. Finally, control is
- turned over to the user's terminal.
-
- An interrupt while executing either of the initialization
- files restarts execution of that step.
-
- _F_l_a_g_s
-
- Certain flags may be included on the command line to INGRES
- which affect the operation of the terminal monitor. The -a
- flag disables the autoclear function. This means that the
- query buffer will never be automatically cleared;
- equivalently, it is as though a \append command were insert-
- ed after every \go. Note that this means that the user must
- explicitly clear the query buffer using \reset after every
- query. The -d flag turns off the printing of the dayfile.
- The -s flag turns off printing of all messages (except er-
- rors) from the monitor, including the login and logout mes-
- sages, the dayfile, and prompts. It is used for executing
- ``canned queries'', that is, queries redirected from files.
-
- SEE ALSO
- ingres(unix), quel(quel), macros(quel)
-
- DIAGNOSTICS
- go You may begin a fresh query.
-
- continue The previous query is finished and you
- are back in the monitor.
-
- Executing . . . The query is being processed by INGRES.
-
- >>ed You have entered the UNIX text editor.
-
- >>sh You have escaped to the UNIX shell.
-
- Funny character nnn converted to blank
- INGRES maps non-printing ASCII charac-
- ters into blanks; this message indicates
- that one such conversion has just been
- made.
-
- INCOMPATIBILITIES
- Note that the construct
- \rprint parts
- (intended to reset the query buffer and then enter ``print
- parts'') no longer works, since ``rprint'' appears to be one
- word.
-
- BUGS
-
-
-