Annotation of 43BSD/ingres/doc/quel/monitor.nr, revision 1.1.1.1

1.1       root        1: .th MONITOR QUEL 2/23/79
                      2: .sh NAME
                      3: monitor \- interactive terminal monitor
                      4: .sh DESCRIPTION
                      5: The interactive terminal monitor
                      6: is the primary front end
                      7: to \*(II.
                      8: It provides the ability
                      9: to formulate a query
                     10: and review it
                     11: before issuing it
                     12: to \*(II.
                     13: If changes must be made,
                     14: one of the \*(UU text editors
                     15: may be called
                     16: to edit the
                     17: .it "query buffer."
                     18: .s1
                     19: .bd "Messages and Prompts."
                     20: .s2
                     21: The terminal monitor
                     22: gives a variety of messages
                     23: to keep the user informed
                     24: of the status
                     25: of the monitor
                     26: and the query buffer.
                     27: .s3
                     28: As the user logs in,
                     29: a login message is printed.
                     30: This typically tells the version
                     31: number
                     32: and the login time.
                     33: It is followed by the dayfile,
                     34: which gives information
                     35: pertinant to users.
                     36: .s3
                     37: When \*(II is ready to accept input,
                     38: the message
                     39: ``go''
                     40: is printed.
                     41: This means that the query buffer
                     42: is empty.
                     43: The message
                     44: ``continue''
                     45: means that there is information
                     46: in the query buffer.
                     47: After a \ego command
                     48: the query buffer
                     49: is automatically cleared
                     50: if another query is typed in,
                     51: unless a command which affects the query buffer
                     52: is typed first.
                     53: These commands are
                     54: \eappend,
                     55: \eedit,
                     56: \eprint,
                     57: \elist,
                     58: \eeval,
                     59: and
                     60: \ego.
                     61: For example, typing
                     62: .br
                     63:        help parts
                     64: .br
                     65:        \ego
                     66: .br
                     67:        print parts
                     68: .br
                     69: results in the query buffer containing
                     70: .br
                     71: print parts
                     72: .br
                     73: whereas
                     74: .br
                     75:        help parts
                     76: .br
                     77:        \ego
                     78: .br
                     79:        \eprint
                     80: .br
                     81:        print parts
                     82: .br
                     83: results in the query buffer containing
                     84: .br
                     85:        help parts
                     86: .br
                     87:        print parts
                     88: .br
                     89: An asterisk is printed at the beginning
                     90: of each line
                     91: when the monitor
                     92: is waiting for the user
                     93: to type input.
                     94: .s1
                     95: .bd Commands
                     96: .s2
                     97: There are a number of commands
                     98: which may be entered by the user
                     99: to affect the query buffer
                    100: or the user's environment.
                    101: They are all preceeded
                    102: by a backslash
                    103: (`\e'),
                    104: and all are executed immediately
                    105: (rather than at execution time
                    106: like queries).
                    107: .s3
                    108: Some commands may take a filename,
                    109: which is defined
                    110: as the first significant character
                    111: after the end of the command
                    112: until the end of the line.
                    113: These commands may have no other commands
                    114: on the line
                    115: with them.
                    116: Commands which do not take a filename
                    117: may be stacked
                    118: on the line;
                    119: for example
                    120: .br
                    121:        \edate\ego\edate
                    122: .br
                    123: will give the time
                    124: before and after
                    125: execution of the current query buffer.
                    126: .de xx
                    127: .lp +10 10
                    128: ..
                    129: .s3
                    130: .xx
                    131: \er
                    132: .xx
                    133: \ereset        Erase the entire query (reset the query buffer).
                    134: The former contents of the buffer are irretrieveably lost.
                    135: .s3
                    136: .xx
                    137: \ep
                    138: .xx
                    139: \eprint        Print the current query.
                    140: The contents of the buffer are printed on the user's terminal.
                    141: .s3
                    142: .xx
                    143: \el
                    144: .xx
                    145: \elist Print the current query as it will appear
                    146: after macro processing.
                    147: Any side effects of macro processing,
                    148: such as macro definition,
                    149: will occur.
                    150: .s3
                    151: .xx
                    152: \eeval Macro process the query buffer
                    153: and replace the query buffer with the result.
                    154: This is just like \elist
                    155: except that the output is put into the query buffer
                    156: instead of to the terminal.
                    157: .s3
                    158: .xx
                    159: \ee
                    160: .xx
                    161: \eed
                    162: .xx
                    163: \eedit
                    164: .xx
                    165: \eeditor       Enter the \*(UU text editor
                    166: (see ED in the \*(UU Programmer's Manual); use
                    167: the ED command 'w' followed by 'q' to return to the
                    168: \*(II monitor.
                    169: If a filename is given,
                    170: the editor is called with that file instead of the query buffer.
                    171: If the macro ``{editor}'' is defined,
                    172: that macro is used as the pathname of an editor,
                    173: otherwise ``/bin/ed'' is used.
                    174: It is important that you do not use the ``e'' command
                    175: inside the editor;
                    176: if you do the
                    177: (obscure) name of the query buffer
                    178: will be forgotten.
                    179: .s3
                    180: .xx
                    181: \eg
                    182: .xx
                    183: \ego   Process the current query.
                    184: The contents of the buffer are
                    185: macro processed,
                    186: transmitted to \*(II, and run.
                    187: .s3
                    188: .xx
                    189: \ea
                    190: .xx
                    191: \eappend       Append to the query buffer.
                    192: Typing \ea after completion of a query will override the
                    193: auto-clear feature and guarantees that the query buffer
                    194: will not be reset.
                    195: .s3
                    196: .xx
                    197: \etime
                    198: .xx
                    199: \edate Print out the current time of day.
                    200: .s3
                    201: .xx
                    202: \es
                    203: .xx
                    204: \esh
                    205: .xx
                    206: \eshell        Escape to the \*(UU shell.
                    207: Typing a control-d will cause
                    208: you to exit the shell and return to the \*(II monitor.
                    209: If there is a filename specified,
                    210: that filename is taken as a shell file which is run
                    211: with the query buffer
                    212: as the parameter ``$1''.
                    213: If no filename is given,
                    214: an interactive shell is forked.
                    215: If the macro ``{shell}'' is defined,
                    216: it is used as the pathname of a shell;
                    217: otherwise,
                    218: ``/bin/sh'' is used.
                    219: .s3
                    220: .xx
                    221: \eq
                    222: .xx
                    223: \equit Exit from \*(II.
                    224: .s3
                    225: .xx
                    226: \ecd
                    227: .xx
                    228: \echdir        Change the working directory of the monitor
                    229: to the named directory.
                    230: .s3
                    231: .xx
                    232: \ei
                    233: .xx
                    234: \einclude
                    235: .xx
                    236: \eread Switch input to the named file.
                    237: Backslash characters in the file will be processed as read.
                    238: .s3
                    239: .xx
                    240: \ew
                    241: .xx
                    242: \ewrite        Write the contents of the query buffer
                    243: to the named file.
                    244: .s3
                    245: .xx
                    246: \ebranch       Transfer control within a \einclude
                    247: file.
                    248: See the section on branching below.
                    249: .s3
                    250: .xx
                    251: \emark Set a label for \ebranch.
                    252: .s3
                    253: .xx
                    254: \e<any other character>
                    255: .br
                    256: Ignore any possible special meaning of character following '\e'.
                    257: This allows the '\e'
                    258: to be input as a literal character.
                    259: (See also quel(quel) - strings).
                    260: It is important to note that backslash escapes
                    261: are sometimes eaten up
                    262: by the macro processor also;
                    263: in general,
                    264: send two backslashes
                    265: if you want a backslash sent
                    266: (even this is too simplistic [sigh] \-
                    267: try to avoid using backslashes at all).
                    268: .i0
                    269: .s1
                    270: .bd Macros
                    271: .s2
                    272: For simplicity,
                    273: the macros are described in the section macros(quel).
                    274: .s1
                    275: .bd "Branching"
                    276: .s2
                    277: The \ebranch and \emark commands
                    278: permit arbitrary branching within a \einclude
                    279: file
                    280: (similar to the ``goto'' and ``:'' commands
                    281: in the shell).
                    282: \emark should be followed with a label.
                    283: \ebranch should be followed with either a label,
                    284: indicating unconditional branch,
                    285: or an expression preceeded by a question mark,
                    286: followed by a label,
                    287: indicating a conditional branch.
                    288: The branch is taken if the expression
                    289: is greater than zero.
                    290: For example,
                    291: .br
                    292:        \ebranch ?{tuplecount}<=0 notups
                    293: .br
                    294: branches to label ``notups'' if the ``{tuplecount}'' macro
                    295: is less than or equal to zero.
                    296: .s3
                    297: The expressions usable in \ebranch statements
                    298: are somewhat restricted.
                    299: The operators +, \-, \*(**,
                    300: .if t \(sl,
                    301: .if n /,
                    302: <=, >=, <, >, =, and !=
                    303: are all defined in the expected way.
                    304: The left unary operator ``!'' can be used
                    305: as to indicate logical negation.
                    306: There may be no spaces in the expression,
                    307: since a space terminates the expression.
                    308: .s1
                    309: .bd "Initialization"
                    310: .s2
                    311: At initialization (login) time
                    312: a number of initializations take place.
                    313: First,
                    314: a macro called ``{pathname}''
                    315: is defined
                    316: which expands to the pathname
                    317: of the \*(II subtree
                    318: (normally ``/mnt/ingres'');
                    319: it is used by system routines
                    320: such as demodb.
                    321: Second,
                    322: the initialization file
                    323: \&.../files/startup
                    324: is read.
                    325: This file is intended to define
                    326: system-dependent parameters,
                    327: such as the default editor and shell.
                    328: Third,
                    329: a user dependent initialization file,
                    330: specified by a field in the users file,
                    331: is read and executed.
                    332: This is normally set to the file ``.ingres'' in the
                    333: user's home directory.
                    334: The startup file might be used
                    335: to define certain macros,
                    336: execute common range statements,
                    337: and soforth.
                    338: Finally,
                    339: control is turned over
                    340: to the user's terminal.
                    341: .s3
                    342: An interrupt while executing either of the initialization files
                    343: restarts execution of that step.
                    344: .s1
                    345: .bd Flags
                    346: .s2
                    347: Certain flags
                    348: may be included
                    349: on the command line
                    350: to \*(II
                    351: which affect the operation
                    352: of the terminal monitor.
                    353: The \-a flag
                    354: disables the autoclear function.
                    355: This means that the query buffer will never
                    356: be automatically cleared;
                    357: equivalently,
                    358: it is as though a \eappend command
                    359: were inserted after every \ego.
                    360: Note that this means that the user
                    361: must explicitly clear the query buffer
                    362: using \ereset
                    363: after every query.
                    364: The \-d flag
                    365: turns off the printing of the dayfile.
                    366: The \-s flag
                    367: turns off printing of all messages
                    368: (except errors)
                    369: from the monitor,
                    370: including the login and logout messages,
                    371: the dayfile,
                    372: and prompts.
                    373: It is used for executing
                    374: ``canned queries'',
                    375: that is,
                    376: queries redirected from files.
                    377: .sh "SEE ALSO"
                    378: ingres(unix),
                    379: quel(quel),
                    380: macros(quel)
                    381: .sh DIAGNOSTICS
                    382: .de xx
                    383: .lp +20 20
                    384: ..
                    385: .xx
                    386: go     You may begin a fresh query.
                    387: .s3
                    388: .xx
                    389: continue       The previous query is finished and you
                    390: are back in the monitor.
                    391: .s3
                    392: .xx
                    393: Executing . . .        The query is being processed by \*(II.
                    394: .s3
                    395: .xx
                    396: >>ed   You have entered the \*(UU text editor.
                    397: .s3
                    398: .xx
                    399: >>sh   You have escaped to the \*(UU shell.
                    400: .s3
                    401: .xx
                    402: Funny character nnn converted to blank
                    403: .br
                    404: \*(II maps non-printing ASCII characters into blanks; this message
                    405: indicates that one such conversion has just been made.
                    406: .i0
                    407: .sh INCOMPATIBILITIES
                    408: Note that the construct
                    409: .br
                    410:        \erprint parts
                    411: .br
                    412: (intended to reset the query buffer
                    413: and then enter ``print parts'')
                    414: no longer works,
                    415: since ``rprint'' appears to be one word.
                    416: .sh BUGS

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.