INSPEKT User's Guide |
Table of ContentsINSPEKT User's Guide Abstract About INSPEKT's Built-in Help System Related Topics Autoadjust Collecting Commands In Files Related Topics Column Related Topics Column and Table Abbreviations Related Topics Columns Related Topics Combining Tables Equi-joins Ambiguous Columns Joining a Table to Itself Using Aliases Combining More than Two Tables Conditional Operators Related Topics Current Settings --- SHOW Custom Formats Related Topics Default Floating Format Related Topics Default Integer Format Related Topics Default Time Format Related Topics Deluge Warning Related Topics Display Area Related Topics Echoing Translated Commands Editing Commands Related Topics Environment Variables Errors Related Topics Example Time Formats Related Topics Example Where Clause Flagged Format From Clause Getting Too Much Data Related Topics Headers Kernels --- LOAD Limits Looking at Data --- SELECT Related Topics Making Help Wait Related Topics Numeric Formats Order By Related Topics Pattern Matching Patterns Query Reports Related Topics Sampling Data Saving Work --- SAVE TO Select Clause Related Topics SET COLUMN ... SET FORMAT ... Related Topics SET FORMAT MARK ... SET HEADER ... Related Topics SET PAGE ... Related Topics SET TIME ... Related Topics SET TITLE ... Related Topics Setting The Editor Setting up Inspekt --- SET Short Cut to Topics SHOW COLUMN ... Related Topics SHOW COMMENTS ... SHOW ENVIRONMENT ... Related Topics SHOW FORMAT ... Related Topics SHOW INDEXED ... SHOW KERNELS ... Related Topics SHOW PAGE ... SHOW SUMMARY ... Special Symbols --- Queries Specifying Strings Related Topics Specifying Times Spacecraft Clock ISO Formats Generic Related Topics Symbol Syntax Description Language Keywords Class Templates number int word name calendar Template Quantifiers Numeric Qualifiers Character Qualifiers Combining Quantifiers with Qualifiers Switches Nesting Switches Examples Syntax Summaries Related Topics Table Tabular Format TABULAR MARKED TABULAR SPACED TABULAR Related Topics Tabular Format Mark Related Topics Time Formats Titles Typing Commands Using Symbols An Example Creating Symbols Removing Symbols Symbols Used in Other Symbols Suppressing Symbols Substitution Examining Symbols Verbatim Format Related Topics Where Clause Related Topics Problems, Suggestions INSPEKT User's Guide
Abstract
About INSPEKT's Built-in Help System
(Q) Quit Help (1) About Help ... Option: _At the prompt (Option: ) type the number or letter shown in parentheses to the left of the topic of interest and hit RETURN. You will be presented with a screen of text that describes the topic. After a full screen of text has been displayed, a left justified short vertical line will be displayed. Just to the right of this line will be the cursor. This indicates there is more text or related topics associated with the current topic. Hit a carriage return to display the additional information. If there is more text on the topic, you will see another screen of text followed by the same short line and prompt. If there is no more text for the current topic, another menu of options will be displayed allowing you to exit the help system; return to the main menu; or move on to topics related to the current topic. Related Topics
Autoadjust
SET AUTOADJUST (1:1){ OFF | ASK | ON }To see the current status of AUTOADJUST type the command
SHOW FORMATNote: AUTOADJUST does not affect the widths of numeric or time columns. Only character columns are affected by AUTOADJUST. Collecting Commands In Files
To create a procedure file, simply type in a sequence of commands as you would type them when entering them in Inspekt. End each command with a semi-colon. Start every new command on a new line. You can insert a "comment" line in the procedure file by starting the line with a semi-colon (;). To start a procedure file enter the command:
START filename;where "filename" above is replaced by the name of your procedure file. Procedure files may start other procedure files. Procedure commands may not use any of the following commands:
EDIT DO RECALLor a command that evaluates to one of these commands as a result of symbol substitution. If there is information that a procedure needs, you can pass that information to the procedure by creating one or more symbols that evaluate to the needed information. Related Topics
Column
Related Topics
Column and Table Abbreviations
Inspekt helps you deal with the problem of minimizing the amount of text you have to type to specify a table or column by allowing you to use a pattern instead of the full name. For example suppose that a column has the name EMPLOYEE_SALARY. If there are no other columns that start with "EMP", you can specify this column by typing "EMP*". If there are several column names that start with "EMPLOYEE_" but only one column name ends with "SALARY" you can specify the column by typing "*_SAL*". As long as only one name matches the pattern, Inspekt will recognize the name and treat the pattern as if you had typed the full name. For example suppose that you have loaded an E-kernel that contains two tables "EMPLOYEE_DATA" and "DEPARTMENT_DATA". Moreover suppose that the first table contains the following columns: "EMPLOYEE_NAME", "SUPERVISOR", "HIRE_DATE", "SALARY", "DEPARTMENT". Suppose the second table has the following columns: "DEPARTMENT_NAME", "OPERATING_EXPENSES", "MANAGER", "LOCATION". Then the following query
SELECT EMP*, SAL*, DEP* FROM EMP* WHERE SAL* > 30000;is equivalent to the much longer command
SELECT EMPLOYEE_NAME, SALARY, DEPARTMENT FROM EMPLOYEE_DATA WHERE SALARY > 30000;You can patterns only for column and table names. You may not use them to abbreviate other words of the Inspekt command language. If some language words or phrases seem to be a bit long to type you should consider creating a symbol for those words or phrases. Related Topics
Columns
SHOW SUMMARYYou will be presented with a list of column names in the form "table_name.column_name" where "table_name" is the name of the table to which the column belongs and "column_name" is the name of the column. To see attributes for a particular column, type
SHOW COLUMN column_name or SHOW COLUMN table_name.column_nameThe second form is required only if there are two or more loaded tables that have the same column. To see a list of indexed columns type:
SHOW INDEXED Related Topics
Combining Tables
The "join" of two tables is the cartesian product of the two tables. For example suppose that the tables MUSIC and PEOPLE have been loaded into Inspekt. Table MUSIC has two columns SONG and COMPOSER, Table PEOPLE has columns NAME and COUNTRY. Below is a sample of the data in these two tables.
Table MUSIC SONG COMPOSER -------------------------- YESTERDAY MCCARTNEY LIVE AND LET DIE MCCARTNEY BLOODY SUNDAY HEUSSEN ONE TREE HILL HEUSSEN SATISFACTION JAGGER BOYS OF SUMMER HENLEY Table PEOPLE NAME COUNTRY -------------------------- MCCARTNEY ENGLAND HEUSSEN IRELAND JAGGER ENGLAND HENLEY USAThe two tables have sufficient information to tell us the names of all the songs written by Irish composers. But, how do we get Inspekt to tell us this information. We "join" the two tables so that everything is in one large table. Below is the join of the tables MUSIC and PEOPLE. (We've included blank lines to help illustrate how rows are combined to make the join table. Also for purpose of illustration only, we've presented the data from the second table in lower case. In the actual join the case of data does not change.)
Join of tables MUSIC, PEOPLE SONG COMPOSER NAME COUNTRY ----------------------------------------------- YESTERDAY MCCARTNEY mccartney england YESTERDAY MCCARTNEY heussen ireland YESTERDAY MCCARTNEY jagger england YESTERDAY MCCARTNEY henley usa LIVE AND LET DIE MCCARTNEY mccartney england LIVE AND LET DIE MCCARTNEY heussen ireland LIVE AND LET DIE MCCARTNEY jagger england LIVE AND LET DIE MCCARTNEY henley usa BLOODY SUNDAY HEUSSEN mccartney england BLOODY SUNDAY HEUSSEN heussen ireland BLOODY SUNDAY HEUSSEN jagger england BLOODY SUNDAY HEUSSEN henley usa ONE TREE HILL HEUSSEN mccartney england ONE TREE HILL HEUSSEN heussen ireland ONE TREE HILL HEUSSEN jagger england ONE TREE HILL HEUSSEN HENLEY USA SATISFACTION JAGGER mccartney england SATISFACTION JAGGER heussen ireland SATISFACTION JAGGER jagger england SATISFACTION JAGGER henley usa BOYS OF SUMMER HENLEY mccartney england BOYS OF SUMMER HENLEY heussen ireland BOYS OF SUMMER HENLEY jagger england BOYS OF SUMMER HENLEY henley usaTo select something from this join of two tables you construct your SELECT command as shown here:
select item, ... , item FROM MUSIC, PEOPLE where ...The tables we want to join are specified in the FROM clause of the select command. They must be separated by commas. Notice that every row of the first table, MUSIC, has every row of the second table, PEOPLE appended to it to produce a new row. This table becomes useful when we apply constraints to it. In our case we want to find out which songs were written by Irish song writers. The country of origin of the composer is present in a row of the join table if the NAME and COMPOSER columns have the same value. The SELECT command
select song, composer, name, country from music, people WHERE COMPOSER = NAMEgives us the following rows.
SONG COMPOSER NAME COUNTRY ----------------------------------------------- YESTERDAY MCCARTNEY MCCARTNEY ENGLAND LIVE AND LET DIE MCCARTNEY MCCARTNEY ENGLAND BLOODY SUNDAY HEUSSEN HEUSSEN IRELAND ONE TREE HILL HEUSSEN HEUSSEN IRELAND SATISFACTION JAGGER JAGGER ENGLAND BOYS OF SUMMER HENLEY HENLEY USAThis report is a lot closer to what we want. To see just the titles of songs written by Irish song writers we add modify the SELECT command as shown below.
select SONG from music, people where composer = name AND COUNTRY = 'IRELAND'This results in the following report.
SONG -------------- BLOODY SUNDAY ONE TREE HILL Equi-joins
WHERE COMPOSER = NAMEThis is a common condition when selecting data from a join of two tables. The general situation looks something like this.
SELECT ... FROM table_1, table_2 WHERE column_from_table_1 = column_from_table_2When you join two or more tables and add an equality a condition to the rows from different tables, the join is called an "equi-join". You will almost always create equi-joins when joining tables. Ambiguous Columns
SONG COMPOSER COMPOSER COUNTRY ----------------------------------------------- YESTERDAY MCCARTNEY MCCARTNEY ENGLAND YESTERDAY MCCARTNEY HEUSSEN IRELAND YESTERDAY MCCARTNEY JAGGER ENGLAND YESTERDAY MCCARTNEY HENLEY USA LIVE AND LET DIE MCCARTNEY MCCARTNEY ENGLAND . . . . . . . . . . . .If I want to talk about the column first column COMPOSER how do I distinguish it from the second column COMPOSER? The first column comes from the table MUSIC the second comes from the table PEOPLE. To unambiguously specify either prefix the column name by the name of its parent table as in MUSIC.COMPOSER or PEOPLE.COMPOSER. The select command would then be issued as:
select song from music, people where MUSIC.COMPOSER = PEOPLE.COMPOSER and country = 'IRELAND' Joining a Table to Itself
Table RELATIONS CHILD FATHER MOTHER ------------------------ CINDY GEORGE ALICE SALLY GEORGE MARTHA GEORGE WILLIAM MARGARET ALICE JOHN KATHERINE MARTHA ROBERT CONSTANCEThe grandparents in this table are parents of parents. We can join the table to itself to get a list of all the grandfathers. The join is simple enough. Here it is.
Join of RELATIONS, RELATIONS CHILD FATHER MOTHER CHILD FATHER MOTHER --------------------------------------------------------- CINDY GEORGE ALICE CINDY GEORGE ALICE CINDY GEORGE ALICE SALLY GEORGE MARTHA CINDY GEORGE ALICE GEORGE WILLIAM MARGARET CINDY GEORGE ALICE ALICE JOHN KATHERINE CINDY GEORGE ALICE MARTHA ROBERT CONSTANCE SALLY GEORGE MARTHA CINDY GEORGE ALICE SALLY GEORGE MARTHA SALLY GEORGE MARTHA SALLY GEORGE MARTHA GEORGE WILLIAM MARGARET SALLY GEORGE MARTHA ALICE JOHN KATHERINE SALLY GEORGE MARTHA MARTHA ROBERT CONSTANCE GEORGE WILLIAM MARGARET CINDY GEORGE ALICE GEORGE WILLIAM MARGARET SALLY GEORGE MARTHA GEORGE WILLIAM MARGARET GEORGE WILLIAM MARGARET GEORGE WILLIAM MARGARET ALICE JOHN KATHERINE GEORGE WILLIAM MARGARET MARTHA ROBERT CONSTANCE ALICE JOHN KATHERINE CINDY GEORGE ALICE ALICE JOHN KATHERINE SALLY GEORGE MARTHA ALICE JOHN KATHERINE GEORGE WILLIAM MARGARET ALICE JOHN KATHERINE ALICE JOHN KATHERINE ALICE JOHN KATHERINE MARTHA ROBERT CONSTANCE MARTHA ROBERT CONSTANCE CINDY GEORGE ALICE MARTHA ROBERT CONSTANCE SALLY GEORGE MARTHA MARTHA ROBERT CONSTANCE GEORGE WILLIAM MARGARET MARTHA ROBERT CONSTANCE ALICE JOHN KATHERINE MARTHA ROBERT CONSTANCE MARTHA ROBERT CONSTANCEBut this table has a clear problem. If I want to select a CHILD from this table how do I specify which CHILD column I'm talking about? It clearly is not enough to simply type RELATIONS.CHILD because both CHILD columns come from the same table. We handle the problem of ambiguous columns names by creating a unique alias for the table when you specify the join. Thus if I want to be able to select a column from this table I specify the join in the from clause as shown below.
select ... FROM RELATIONS X, RELATIONS Y where ...This join creates the following table.
Join of RELATIONS X, RELATIONS Y X.CHILD X.FATHER X.MOTHER Y.CHILD Y.FATHER Y.MOTHER --------------------------------------------------------- CINDY GEORGE ALICE CINDY GEORGE ALICE CINDY GEORGE ALICE SALLY GEORGE MARTHA CINDY GEORGE ALICE GEORGE WILLIAM MARGARET CINDY GEORGE ALICE ALICE JOHN KATHERINE CINDY GEORGE ALICE MARTHA ROBERT CONSTANCE SALLY GEORGE MARTHA CINDY GEORGE ALICE . . . . . . . . . . . . . . . . . .As you can see in the example FROM clause above, an alias is specified by following the name of a table by a second word and a comma. The second word is the alias for the table. Thus the alias for the first copy of RELATIONS is X, the alias for the second copy of RELATIONS is Y. There is nothing special about the aliases X and Y. We could just as easily have used EGG and SPAM respectively. The letters X and Y are just easier to type. Aliases are case insensitive. The names X.FATHER and x.FATHER refer to the same column. To select columns you simply use the aliased names as presented in the table above. Thus to find all of the grandfathers in our original table RELATIONS we would issue the following command
SELECT Y.FATHER FROM RELATIONS X, RELATIONS Y WHERE X.FATHER = Y.CHILD OR X.MOTHER = Y.CHILDHere is how the conditions narrow down the join.
Join of RELATIONS X, RELATIONS Y WHERE X.FATHER = Y.CHILD OR X.MOTHER = Y.CHILD X.CHILD X.FATHER X.MOTHER Y.CHILD Y.FATHER Y.MOTHER --------------------------------------------------------- CINDY GEORGE ALICE GEORGE WILLIAM MARGARET CINDY GEORGE ALICE ALICE JOHN KATHERINE SALLY GEORGE MARTHA GEORGE WILLIAM MARGARET SALLY GEORGE MARTHA MARTHA ROBERT CONSTANCEWe get all the names in the Y.FATHER column where the CHILD appearing in the Y copy of RELATIONS appears as a parent in the X copy of RELATIONS. To find every child that is a grandchild, we can simply pick out the children whose mothers are listed as children in the second copy of RELATIONS.
SELECT X.CHILD FROM RELATIONS X, RELATION Y WHERE X.MOTHER = Y.CHILD Using Aliases
Original Select Command Without Aliases select song from music, people where MUSIC.COMPOSER = PEOPLE.COMPOSER and country = 'IRELAND' Same Select Command but with Aliases for the Tables select song from music M, people P where M.COMPOSER = P.COMPOSER and country = 'IRELAND' Combining More than Two Tables
The syntax for specifying such a join is:
FROM TABLE_1 [alias_1], TABLE_2 [alias_2], ..., TABLE_N [alias_N]Inspekt and the E-kernel system require that N be no more than 10. As you might imagine, the join of many tables has the potential for creating an enormous table from which data will be selected. As a result Inspekt's speed may degrade significantly if you join many tables. \subsection Related Topics From Clause, Looking at Data --- SELECT Conditional Operators
The following conditionals are supported by the E-kernel system.
Operator Usage in a condition -------- --------------------------- LT column LT expression LE column LE expression EQ column EQ expression GE column GE expression GT column GT expression NE column NE expression < column < expression <= column <= expression = column = expression >= column >= expression > column > expression != column <> expression <> column != expression LIKE column LIKE expression NOT LIKE column NOT LIKE expression BETWEEN column BETWEEN expression AND expression NOT BETWEEN column NOT BETWEEN expression AND expressionwhere "column" is the name of some column and "expression" is the name of a column or a literal value such as 1 or "A Literal String". Conditions listed above are true if:
Related Topics
Current Settings --- SHOW
SHOW itemSee the help topics below for more specific descriptions. \subsection Related Topics SHOW COLUMN, SHOW COMMENTS, SHOW ENVIRONMENT, SHOW FORMAT, SHOW INDEXED, SHOW KERNELS, SHOW PAGE, SHOW SUMMARY, Columns, Deluge Warning, Headers, Time Formats, Titles, Other Settings, Setting up Inspekt --- SET Custom Formats
SET COLUMN <column_name> FORMAT <format>;where <column_name> is the name of the column and <format> is the custom format you desire. Custom formats work as follows. Given a time, there are associated with it the current year, month, day, day of year, hour, minutes, seconds, current julian date, current number of seconds past the epoch of J2000, etc. When a time is to be displayed, the custom format you have provided is used as a recipe for constructing the time string. Reading from left to right the string formatter looks for special substrings (listed below). Unrecognized substrings are simply copied into the output string. (This allows you to add any label you might like to the output times.) However, when a recognized substring is found, the time formatter determines the corresponding component of time and appends this to the output time string that is under construction. NOTE THAT TIME FORMATS ARE CASE SENSITIVE. To get a particular component of the time into the output string you must use exactly the substring given in the list below. For example, if you wish have the 3 letter abbreviation for the month appear in your output times, you must use "MON"; the string "mon" will simply be copied as is into any of your time strings. (Substrings beginning with "::" do not affect the appearance of the format only the time system or rounding)
###
'SC.###'
Related Topics
Default Floating Format
SET DEFAULT FLOATING FORMAT format;where "format" is the format you'd like Inspekt to use when you have not specified a particular format for a column. If you've specified a format for a double precision column, and would like to return to using the default floating format issue the command
SET COLUMN column_name FORMAT DEFAULT;Until you change the format for the specified column again, the format used when presenting its values in a report will be the default floating format. Related Topics
Default Integer Format
SET DEFAULT INTEGER FORMAT format;where "format" is the format you'd like Inspekt to use when you have not specified a particular format for an integer column. If you've specified a format for an integer column, and would like to return to using the default integer format issue the command
SET COLUMN column_name FORMAT DEFAULT;Until you change the format for the specified column again, the format used when presenting its values in a report will be the default integer format. Related Topics
Default Time Format
SET DEFAULT TIME FORMAT format;where "format" is the format you'd like Inspekt to use when you have not specified a particular format for a column. If you've specified a format for a time column, and would like to return to using the default time format issue the command
SET COLUMN column_name FORMAT DEFAULT;Until you change the format for the specified column again, the format used when presenting its values in a report will be the default time format. Related Topics
Deluge Warning
SHOW FORMATTo set the deluge warning level, type the command.
SET DELUGE WARNING integerIf you take no action the warning level has value 100. Related Topics
Display Area
SET PAGE WIDTH number SET PAGE HEIGHT number SET PAGE TITLE title SET TITLE JUSTIFICATION justification SET TITLE FREQUENCY frequency SET HEADER FREQUENCY frequencyThe output page is described in terms of printable fixed size characters. By default it is 80 characters wide and 24 characters tall. The output page is a subset of a page region that is between 40 and 132 characters wide and at least 22 characters tall. (The maximum page height allowed is the maximum positive integer that your computer supports) The page width is used to determine how much text can fit across your terminal window. The page height is used to determine how many lines of text can be written before displaying a page title or report header. Related Topics
|endliteral Echoing Translated Commands
You may want to see how Inspekt translated what you typed before it gets around to acting on the command. To do this you can "turn on" command echoing. Do this by typing
ECHOHaving issued this command, when a new command is issued that contains symbols, Inspekt will "echo" the translated command so that you can see how Inspekt has interpreted your command. To disable the echoing of commands type:
NO ECHOYou can see the current status of command echoing by issuing a show environment command.
SHOW ENVIRONMENT Editing Commands
Commands in the stack are numbered from 1 to 20. The most recently issued command (the one on top) is number 1. The command issued just prior to number 1, is number 2, and so on. You can manipulate this stack with the commands below. Most "stack" manipulation commands require that you specify a particular command. You can do this by specifying the number of the command (the number provide by RECALL) or by specifying a pattern. If you specify a command via a number, the number must be between 1 and 20. If you specify the command via a pattern, you are specifying the last command whose first line matches the pattern. As a convenience, the wild card '*' is automatically appended to the specification pattern. You can not suppress the appended wild card.
Related Topics
Environment Variables
If you should decide to use these environment variables make sure that they evaluate to the full path name of the kernels. You may set these variables with C-shell command "setenv"
setenv LEAPSECONDS (full path of leapseconds kernel) setenv SCLK (full path of spacecraft clock kernel)In DCL you use logical variables instead of environment variables. You set the logical variables using the define command.
DEFIND LEAPSECONDS DISK:[DIR.ECT.ORY]leap_file.ker DEFINE SCLK DISK:[DIR.ECT.ORY]sclk_file.ker Errors
When an error is detected, Inspekt will display a message and then prompt for a new command. If the error message does not seem to explain what went wrong, you can get the second level of error diagnosis by entering the command "?;". If second level of error diagnosis is not available, you will get a message stating that there is no more information available. If a second level is available, the diagnosis will be displayed. This second level will usually list the chain of subroutine calls that led to the error diagnosis and other information. If you can't determine the cause of the error, send a description of what you were attempting to do along with the Inspekt.log file to:
btaber@spice.jpl.nasa.govand I will do what I can to help out.
-Bill Taber Related Topics
Example Time Formats
Format: YYYY-MON-DD WKD HR:MN:SC Result: 1993-FEB-15 MON 12:00:00 Format: Day of year DDD, MON-DD YYYY HR:MN:SC.#### Result: Day of year 046, FEB-15 1993 12:00:00.0000 Format: YYYY-DDD.### ::RND Result: 1993-046.500 Related Topics
Example Where Clause
select time event_type subsystem notes from events WHERE TIME GT "1 JAN 1993" AND TIME LT "1 MAR 1993" AND SUBSYSTEM LIKE "*PLATFORM*";Note that the times used in the TIME condition and the pattern used in the SUBSYSTEM condition must match is enclosed in double (") or single (') quotes. Flagged Format
First Column : Value of column for first event Second Column: Value of the second column with the output wrapped if it will not fit on a single line of text. Third Column : Value of the third column possibly wrapped in an uneven fashion due to the means of specifying an event. First Column : Value of this for second event ... ...There are two forms of flagged format. PRESERVED and un-PRESERVED (default). If a format is a preserved, each component of a column is begun on a new line of the report. Otherwise it is considered to be simply FLAGGED format. Note a blank line is inserted between consecutive events in the output. \subsection Related Topics Reports From Clause
select ... FROM TABLE_1 [alias_1] [, TABLE_2 [alias_2] ...] where ... oder by ...The simplest commands involve only one table. In such cases there is usually no need to supply an alias for the table specified in the FROM clause. \subsection Related Topics Combining Tables, Looking at Data --- SELECT Getting Too Much Data
To set the deluge warning level, type the command.
SET DELUGE WARNING integerIf you take no action the warning level has value 100. To see the current data-deluge warning level type the command
SHOW FORMAT Related Topics
Headers
SHOW PAGE; Kernels --- LOAD
E-kernels can be "unloaded." When an E-kernel is unloaded, Inspekt "forgets" about the existence of the kernel. Data in the kernel can not be retrieved or manipulated without first re-loading it. To load or unload an E-kernel, type
LOAD EK (filename of E-kernel) UNLOAD (filename of previously loaded E-kernel).The filename used in the UNLOAD command must be the same as the filename used to load it. Two other files may be loaded: a leapseconds kernel and an SCLK kernel. These are loaded using the commands:
LOAD LEAPSECONDS (filename of leapseconds kernel) LOAD SCLK KERNEL (filename of SCLK kernel)You can avoid having to load leapseconds or SCLK kernels by setting up the environment variables SCLK and LEAPSECONDS to point to the corresponding kernel prior to starting Inspekt. Leapsecond and SCLK kernels cannot be unloaded. However, you can load a different leapseconds or SCLK kernel. When a new SLCK or leapseconds kernel is loaded Inspekt behaves as if you had never loaded the previous SCLK or leapseconds kernel. Only the data in the freshly loaded kernel will be used by Inspekt. There are two commands for determining what kernels have been loaded.
SHOW KERNELS;displays which E-kernels have been loaded
SHOW ENVIRONMENTdisplays which leapseconds and SCLK kernels (if any) have been loaded along with other information about the current Inspekt settings. \subsection Related Topics Environment Variables Limits
Looking at Data --- SELECT
SELECT a comma delimited list of unambiguous column names FROM a comma delimited list of tables-alias pairs WHERE condition_1 AND/OR condition_2 ... AND/OR condition_n ORDER BY a comma delimited list of unambiguous column namesAll but one of the conditions in the "WHERE" clause have the form:
[NOT] column <relation> valueIf the column is a character or time column, the value must be enclosed in either single (') or double (") quotes. Allowed relations are EQ NE LT LE GT GE and LIKE (used for pattern matching). Related Topics
Making Help Wait
Inspekt> SET HELP WAIT;The Inspekt help system will now pause after each page of text it displays and wait for you to hit a carriage return before it displays the next page or related topics menu. To return to the original help system behaviour, type the command
Inspekt> SET HELP NO WAIT;Note that the size of a page is also under your control. You may set the number of lines that will fit on a page by using the command "SET PAGE HEIGHT". This command is described in the "SET PAGE ..." help topic. Related Topics
Numeric Formats
###.###If the first character of the picture is a minus sign, the first character in the output string will be a blank if the number is non-negative, a minus sign if the number is negative. If the first character of the picture is a plus sign, the first character of the output string will be a plus if the number is positive, a blank if the number is zero, and a minus sign if the number is negative. If the first character of the string is NOT a sign (plus or minus) the first character of the output string will be a minus sign if the number is negative and will be the first character of the integer part of the number otherwise. The integer portion of STRING will contain at least as many characters as appear before the decimal point (or last character if there is no decimal point) but after a leading + or -. There will ALWAYS be at least one digit output in integer portion of STRING. If the picture begins with a any of the following
'+0', '-0', or '0'it is said to have a leading zero. If a picture has a leading zero and the integer portion is not large enough to fill up the integer space specified by the picture, the output will be zero padded from the sign (if one is required) up to the first character of the integer part of the number. If picture does NOT have a leading zero and the integer portion is not large enough to fill up the space specified by the picture, output will be blank padded between the sign (if one is required and the first character of the integer part of the number. If a decimal point ( '.' ) is present in the picture it will be present following the integer portion of output. Moreover, the decimal portion of the output will contain the same number of digits as there are non-blank characters following the decimal point in the picture. However, if the picture contains more than 14 characters following the decimal point, the characters in output that follow the 14 position to the right of the decimal point will be zeros. Order By
ORDER BY column(s) of choiceas part of your command. Column names should be separated by commas (,). Note that the "ORDER BY" clause works faster with indexed columns. To see which columns are indexed you can use any of the commands:
SHOW INDEXES SHOW KERNELS SHOW SUMMARY Related Topics
Pattern Matching
column_name LIKE "pattern"where "pattern" is a pattern that the column must match for the LIKE-condition to be satisfied. Note that the pattern must be enclosed in quotes ("). There are two special characters that may appear in a pattern. The asterisk '*' matches any substring. The percent mark '%' matches any character. If a pattern does not begin/end with the asterisk, the column value must begin/end with the pattern character in order to match the pattern. pattern matching is case insensitive.
Examples: SPECIAL matches S*C%%L SPECIAL does not match S*C%%L% SPECIAL matches %PE%%AL SPECIAL matches S*L Patterns
There are two special characters that may appear in a pattern they are '*' the substring "wild card" and '%' the character "wild card". Patterns are useful only when they are used to select matching strings. Pattern matches in Inspekt are case insensitive: 'a' matches both 'a' and 'A'. Upper and lower case letters are said to be equivalent. If a pattern does not begin with a wild card, a matching string must begin with the a character that is equivalent to the beginning character of the pattern. If a pattern does not end with a wild card, a matching string must end with a character that is equivalent to the ending character of the pattern. Query
Inspekt> SHOW COLUMN NAME?;
Reports
A report has several attributes that are user adjustable. Reports are presented in a region that models a physical page as you find in a loose leaf binder. You may adjust the height and width of these pages. A report is presented in a particular format. There are three basic formats: tabular, flagged and verbatim. You may select the format you prefer for reports the program creates. Tabular formats are usually the easiest to read. However, if events have a large number of attributes and you want to see many of these attributes, you may find the flagged format better suited to your needs. Verbatim format allows you to see most directly the actual contents of an event without any of Inspekt's formatting tools modifying line breaks in the original data. However, this format is difficult to read and suitable only when you need to see directly how a particular event was stored in the E-kernel. Every report has a title. You can remove the title, change it and alter the frequency with which it is displayed (only at the beginning of the report, on every page, or every n'th page). You can also control whether the title is left justified, right justified or centered on the report page. Reports in tabular format, have a header as well as a title. The header names the various columns that appear in the report. As with the report title you can adjust the frequency with which the header is displayed in the report. Related Topics
Sampling Data
The SAMPLE clauses that can prefixed to a SELECT command are shown below:
SAMPLE number SAMPLE FIRST number SAMPLE LAST number SAMPLE number FROM percentile TO percentile SAMPLE number UP TO percentile [EVERY number] SAMPLE number STARTING AT percentile [EVERY number] SAMPLE number CENTER AT percentile [EVERY number]The first "number" in each clause is the number of samples to extract from a selection. Percentiles must be integers from 0 to 100. The 0th percentile corresponds to the first event of a selection; the 100th percentile to the last event. In those clauses with an optional "EVERY" subclause, the "EVERY-number" refers to how many events to skip between displayed events. If not supplied the "EVERY-number" value is assumed to be one (1). \subsection Related Topics Looking at Data --- SELECT Saving Work --- SAVE TO
SAVE TO filename;All subsequent screen output will be saved the file specified in the command. To stop saving to the SAVE file, issue the command
DISCARD;You may SAVE and DISCARD output as frequently as you wish. Moreover, a different file may be used with each SAVE command. However, to begin saving output to a new file you must first issue a DISCARD command. If you use the same filename you may (depending upon your system) overwrite the previous file. Regardless of whether you save any screen output, Inspekt automatically saves every command you type at the "Inspekt>" prompt. These commands are collected in the Inspekt Log File. It has a name of the form "nspXXXXX.log" where each 'X' is a decimal digit. In addition to commands you type, the text of any error message that Inspekt produces are recorded in the log file. The log file is a crucial aid in determining why Inspekt sometimes behaves in unexpected ways. Each log file is in fact an Inspekt procedure that you can execute to exactly the sequence of commands you entered in some previous Inspekt work session. If you have a problem with Inspekt, and need our assistance, be sure to save the log file so that we can duplicate your problems. Select Clause
SELECT col_1, col_2, ... , col_n FROM table ... WHERE condition ... ORDER BY ...Note that commas (,) are required between column names. If you select rows from a single table (i.e. the FROM clause lists a single table) you can just use the column names from that table. However, if you select columns from a "join" of two or more tables and two or more of the tables possess the column you want to see you need to make sure you tell Inspekt which table the column belongs to. To do this you attach the name of the table (or an alias for that table) to the front of the column name as in
table.column or alias.columnThe columns will be displayed in the report in the same order as you list them in the select clause. Related Topics
SET COLUMN ...
SET COLUMN @name (1:1){ WIDTH @int(8:80) | FORMAT (1:)@word | HEADING (1:)@word | JUSTIFICATION RIGHT | JUSTIFICATION LEFT }NOTE: If you modify the format of a numeric or time column, the width of the column is automatically adjusted to match the width of the new format. You must re-adjust the width if you want it to be something other than the width of the format. \subsection Related Topics Time Formats, Numeric Formats, SHOW COLUMN SET FORMAT ...
SET FORMAT (0:1){ MARKED | SPACED } TABULAR (0:1){ PRESERVED } SET FORMAT FLAGGED (0:1){ PRESERVED } SET FORMAT VERBATIMTABULAR reports show each event as a row of a table with the various event attributes appearing in fixed columns. FLAGGED reports show events as a vertical list of name-value paragraphs with each complete event separated from the next by a blank line. VERBATIM reports list events as a vertical list as well. However the column name is listed on one line and its value on the next line(s). This presents the components of each column without line breaks. Related Topics
SET FORMAT MARK ...
Decide what character you want to appear in the leftmost column (remember you cannot use the semi-colon ";"). For the purpose of an example lets use "=". Then issue the command:
SET FORMAT MARK =;From this point forward MARKED TABULAR reports will place the character "=" in the left most column of reports. SET HEADER ...
You can control how often these items are placed in your report by issuing a SET HEADER FREQUENCY command. The syntax for this is:
SET HEADER FREQUENCY (1:1){ 0 | 1ST | FIRST | ALL | EVERY @int(1:) }The values mean respectively: on none of the pages; on the first page only, on every page, and on the first page and every nth page following the first page. Related Topics
SET PAGE ...
The default height and width of this page are 20 and 80 characters respectively. To adjust these use the following commands.
SET PAGE HEIGHT @int(20:) SET PAGE WIDTH @int(40:132)You may also set the title that appears on reports with the command
SET PAGE TITLE (1:)@wordUse the title "NONE" if you want no title to appear on report pages. Related Topics
SET TIME ...
SET COLUMN column_name FORMAT format; SET DEFAULT TIME FORMAT format; Related Topics
SET TITLE ...
SET PAGE TITLE titleNote that the TITLE is an attribute of the display page. Whenever, a report is displayed in which a title is allowed, the title you've set with the SET PAGE TITLE command will be the title used. You may also control the placement of the report title using the command:
SET TITLE JUSTIFICATION (1:1){ LEFT | CENTER | RIGHT }You can control how often the title are placed in your report by issuing a SET TITLE/HEADER FREQUENCY command. The syntax for this is:
SET TITLE FREQUENCY (1:1){ 0 | 1ST | FIRST | ALL | EVERY @int(1:) }The values mean respectively: on none of the pages; on the first page only; on every page, and on the first page and every nth page following the first page. (See SET PAGE ...for a description of the output page ). Related Topics
Setting The Editor
EDIT commandInspekt writes the specified command to a file, starts up some text editor on your system and loads the file into the editor window. However, the editor selected might not be one you are familiar with. This can be terribly frustrating because you may not know how to get the editor to carry out any familiar task. You can determine the default editor by typing
SHOW ENVIRONMENTIf the editor listed there is not the one you prefer you can change to some other editor by typing
SET EDITOR edit_launching_commandwhere "edit_launching_command" is the command you type to invoke your favorite editor on your computer. If you use an alias for this command, you should look up what this alias translates to and use that translation. Setting up Inspekt --- SET
Columns, Display Area, Reports, SET COLUMN, SET FORMAT, SET HEADER, SET PAGE, SET TIME, SET TITLE, Time Formats, Numeric Formats, Other Settings, Current Settings --- SHOW Short Cut to Topics
Inspekt> HELP topic title;where topic title is the title that appears in one of the help menus. You don't have to enter the title exactly as it appears in the help system menus. The help topic search does not depend upon the case of the letters you use. Also, you may use a wild card pattern for the topic title. This way you don't have to remember the exact topic. However, you do run a slight risk that some other help topic will match your pattern. If more than one topic matches the pattern, Inspekt will choose the one that occurs first in an alphabetical listing of the help topics. Once you are in the help system, you must use the menus to navigate the various help topics. You can not enter the name of some other topic and display it directly. SHOW COLUMN ...
SHOW COLUMN column_name;If more than one table possess a column with your name you must specify which column you are talking about. Do this by prefixing the table name to the column name as in
SHOW COLUMN table.column_namewhere <table> is the name of the column of interest . Below is a possible result of the command SHOW COLUMN ACTIVITY;
Attributes of column: : ACTIVITY Type : CHARACTER*(32) Indexed : YES Number of Components : 1 User Adjustable Attributes Column justification : LEFT Column width : 32 Column heading : ACTIVITY Related Topics
SHOW COMMENTS ...
SHOW COMMENTS patternIf the name of a loaded kernel matches this pattern, the comments for that kernel will be displayed. If none of the kernel names match this pattern, a message informing you of this condition will be displayed. If a kernel matches the pattern, but no comments are in the kernel a message will be displayed indicating that no comments are available. SHOW ENVIRONMENT ...
SHOW ENVIRONMENT Related Topics
SHOW FORMAT ...
SHOW FORMAT;In addition to showing you the format, it will show you the current format being used for presenting time and in the case of MARKED TABULAR format the current format mark. You will also be given the current value for triggering a data DELUGE WARNING. An example result is given here.
Report Format : MARKED TABULAR Report Mark : '>' Default Time Format: YYYY MON DD HR:MN:SC::UTC::RND Default Integer Format: ########### Default Floating Format: #########.#### Deluge Warning : 100 Auto Adjust : ASK (applies only to tabular formats) Related Topics
SHOW INDEXED ...
To get a list of all indexed columns, type the command
SHOW INDEXED SHOW KERNELS ...
SHOW KERNELS;There are two main reasons for issuing this command:
Related Topics
SHOW PAGE ...
SHOW PAGE;A sample output is given below. (Note: the Page width refers to number of columns one character wide will fit on the page.)
Page height (rows) : 20 Page width (columns): 80 Page Title : Inspekt Report Title Justification : LEFT Title Appears on : First page only Header Appears on : First page only SHOW SUMMARY ...
SHOW SUMMARY;Inspekt will display an alphabetical listing of all columns Special Symbols --- Queries
Here's an example. Suppose you routinely issue some select command and that the only portion that changes is the constraint upon the column time.
SELECT TIME, COMMENTS FROM EVENTLIST WHERE TIME variable condition ORDER BY TIME;Define the following symbols
DEFINE STDSEL SELECT TIME, COMMENTS FORM EVENTLIST WHERE TIME After_Before_Tween? ORDER BY TIME; DEFINE AFTER GT TIME? DEFINE BEFORE LT TIME? DEFINE TWEEN BETWEEN FIRST_TIME? AND LAST_TIME?Here's what happens when we now type STDSEL;
Inspekt> STDSEL;Inspekt responds with the following prompt.
Enter value for After_Before_Tween >You can type anything at this prompt. However the prompt suggests you should pick one of the symbols you define earlier. Type "before" followed by a semi-colon.
Enter value for After_Before_Tween > before; Enter value for TIME >Now enter some time (be sure to put it in quotes) and follow this with a semi-colon.
Enter value for After_Before_Tween > before; Enter value for TIME > "1 jan 1995";The effect of these three entries is
SELECT TIME, COMMENTS FROM EVENTLIST WHERE TIME LT "1 jan 1995" ORDER BY TIME;By creative use of symbols and queries you can greatly alter your view of Inspekt and greatly ease the entry of frequently typed commands. Specifying Strings
column GE 'A' AND column LE 'B'If you need to put a quote into a string, you type double the quote as you would in a FORTRAN string. For example the word DOESN'T would be typed as
'DOESN''T' Related Topics
Specifying Times
First, time strings need to be input as strings. Strings must be enclosed in quotes. The condition
TIME LT 1 JAN 1995will not be recognized if it is part of a SELECT command. However, once you place quotes around the time, the time string will be recognized
TIME LT "1 JAN 1995"A wide variety of time formats are allowed as input to Inspekt. These formats are listed below. Spacecraft Clock
MO SCLK mars observer spacecraft clock string GLL SCLK galileo spacecraft clock string VGR1 SCLK voyager 1 spacecraft clock string VGR2 SCLK voyager 2 spacecraft clock stringTo use these formats you must have either specified SCLK to be an appropriate kernel (see Getting Started) or have loaded an appropriate kernel via the LOAD SCLK KERNEL command. ISO Formats
YYYY-MM-DDTHR:MN:SC ISO UTC Calendar format YYYY-DDDTHR:MN:SC ISO UTC Day of year format Generic
MONTH DD YYYY HR:MN:SC.##...# DD MONTH YYYY HR:MN:SC.##...# YYYY DD MONTH HR:MN:SC.##...# YYYY MONTH DD HR:MN:SC.##...# YYYY MM DD HR:MN:SC.##...# MM DD YYYY HR:MN:SC.##...# JD244xxxx.xx...x Related Topics
Symbol
When you type a command in Inspekt that contains a symbol, the symbol is replaced by its associated value. The command is then re-examined and any remaining symbols are replaced by their associated values. Symbols allow you to customize your Inspekt environment. In addition they allow you to greatly reduce the amount of typing you need to do in order to issue frequently occurring groups of words. Words that are surrounded by any of the characters ("'@) are not regarded as symbols and are processed as they appear. Symbols are case insensitive in Inspekt. If you define "SPUD" to be a symbol then "spud", "Spud", "sPud", etc. will all be interpreted as SPUD. You may not define EDIT, DO, RECALL, START, STOP, DEFINE, ECHO Syntax Description Language
Inspekt's command language is quite simple; it does not require all of the features of Meta/2. But since Inspekt is expected to grow, we've included a complete description of Meta/2 so that you'll have a handy reference as this growth occurs. Keywords
"(" the left parenthesis "@" the "at" sign "|" the vertical bar "}" the right braceIn Inspekt all of the keywords are english words. The simplest Meta/2 expressions consist entirely of keywords. Some of Inspekt's commands that fall into this category are shown below.
SHOW KERNELS SHOW SUMMARY SHOW INDEXES SET AUTOADJUST ON SET FORMAT TABULAR SET FORMAT FLAGGED PRESERVED SET FORMAT VERBATIM SET TITLE FREQUENCY ALL SET HEADER FREQUENCY FIRSTWhen you type a command, you may enter the keywords in upper, lower or mixed case. Class Templates
Class templates are used to indicate that the values associated with a particular keyword belong to a class of values. For example the Meta/2 expression of the rule that the keywords SHOW COLUMN are to be followed by the name of a column looks like this.
SHOW COLUMN @name ...The word, name, indicates that the next word in the command following COLUMN should begin with a letter followed by characters from the collection: upper and lower case letters, digits, the hyphen and the underscore. Given this rule, a command that begins
SHOW COLUMN 13 ...is clearly in error. Class templates are very much like the wild card templates used in operating systems like Unix and VMS, except they are a little more specialized. The class templates recognized by Meta/2 are listed below along with descriptions of the words that match them. Class templates in a Meta/2 description begin with the "at" character (@). number
1 3.14 0.07281D-10 int
-3 26172771 0.24E6 word
alpine /u/user/naif/etc/data/spam ^&HANNk228***(JASNSK name
Andrea BRORSEN-METCALF COMMAND_STEM X11J9 calendar
JAN 1, 1992 12:28:28 1992-3-18 18:28 5 APR 1993 18:00:00.289 12-1-1995 Template Quantifiers
FORMAT (1:8)@wordmatches the keyword FORMAT followed by between one and eight words. The quantifier
(n:m)when prefixed to any class template has similar meaning. The lower bound is always present, and is always positive. The upper bound is optional: for example, template
(2:)@intmatches any sequence of two or more integer words. Numeric Qualifiers
WIDTH @int(8:80)matches the keyword WIDTH followed by an integer between 8 and 80 inclusive. The qualifier
(n:m)when suffixed to any numeric class template has similar meaning. Both bounds are optional: for example the templates
@number(2:) @number(:1000)are matched by numeric words whose values are greater than or equal to two and less than or equal to 1000 respectively. Character Qualifiers
DIRECTORY @word([*]|*%:[*]|*:)matches any word that matches one of the individual wildcard templates
[*] *%:[*] *:The wildcard characters (asterisk and percent sign) match any substring and any character respectively. The qualifier
(t1|...|tn)when suffixed to any character class template has a similar meaning. Combining Quantifiers with Qualifiers
@int(-5:5) (3:)@name(A*|B*|*X) (1:3)@name(John|Bobby|Teddy) Switches
(1:1){ NONE | FIRST | 1ST | ALL | EVERY @int(2:) }is called a switch. It is the final construct that you need to know. Although it looks forbidding, it is really quite simple. A switch is a list of keyword-template phrases, separated by vertical bars, and surrounded by braces. The left brace is prefixed with a quantifier,
(n:m){ ... }Whenever you see a switch, it means that at least n and not more than m of the phrases separated by vertical bars must appear; however, they may appear in any order. Thus, the syntax
SET TITLE FREQUENCY (1:1){ NONE | FIRST | 1ST | ALL | EVERY @int(2:) }matches all of the following commands.
SET TITLE FREQUENCY FIRST SET TITLE FREQUENCY EVERY 3 SET TITLE FREQUENCY ALLbut does not match
SET TITLE FREQUENCY NONE FIRST ALL EVERY @int(2:)When you see the special word
@optionswithin a switch, it means that the phrases following the token are optional, whereas the phrases preceding the token are required (again, the phrases may appear in any order). For example the construct
(2:3){ WIDTH @int(40:132) | HEIGHT @int(22:) | @options | TITLE (1:3)@word }means that the phrases beginning with the keywords WIDTH and HEIGHT must appear, while the phrase beginning with TITLE is optional. Nesting Switches
(a:b){ ... | (c:d){ ... } }is illegal. Examples
SET FORMAT (0:1){ SPACED | MARKED } TABULAR (0:1){ PRESERVED }Convince yourself that the following are all valid commands.
SET FORMAT TABULAR; SET FORMAT SPACED TABULAR; SET FORMAT MARKED TABULAR PRESERVED; SET FORMAT TABULAR PRESERVED; SET FORMAT SPACE TABULAR PRESERVED;Convince yourself that the following are not valid commands.
SET FORMAT SPACED; SET FORMAT PRESERVED TABULAR; SET FORMAT MARKED PRESERVED; Syntax Summaries
DEFINE @name DEFINE @name (1:)@word UNDEFINE @name DISCARD DO @word ECHO NO ECHO EDIT @word EXIT HELP LOAD EK @word LOAD LEAPSECONDS @word LOAD SCLK KERNEL @word RECALL RECALL @word SAVE TO @word SAMPLE @int(1:) SELECT (1:100)@word FROM (1:)@word (0:1){ WHERE (1:)@word } (0:1){ ORDER BY (1:100)@word } SAMPLE (1:1){ FIRST @int(1:) | LAST @int(1:) } SELECT (1:100)@word FROM (1:)@word (0:1){ WHERE (1:)@word } (0:1){ ORDER BY (1:100)@word } SAMPLE @int(1:) (1:1){ UP TO @int(0:100) EVERY @int(1:) | UP TO @int(0:100) | STARTING AT @int(0:100) EVERY @int(1:) | STARTING AT @int(0:100) | CENTER AT @int(0:100) EVERY @int(1:) | CENTER AT @int(0:100) | FROM @int(0:100) TO @int(0:100) } SELECT (1:100)@word FROM (1:)@word (0:1){ WHERE (1:)@word } (0:1){ ORDER BY (1:100)@word } SELECT (1:100)@word FROM (1:)@word (0:1){ WHERE (1:)@word } (0:1){ ORDER BY (1:100)@word } SET AUTOADJUST (1:1){ OFF | ASK | ON } SET COLUMN @word FORMAT (1:)@word } SET COLUMN @word HEADING (1:)@word SET COLUMN @word JUSTIFICATION (1:1){ LEFT | JUSTIFICATION } SET COLUMN @word WIDTH @int SET DEFAULT TIME FORMAT (1:)@word SET DEFAULT INTEGER FORMAT @word SET DEFAULT FLOATING FORMAT @word SET DELUGE WARNING @int(1:) SET EDITOR (1:)@word SET FORMAT (0:1){ SPACED | MARKED } TABULAR (0:1){ PRESERVED } SET FORMAT FLAGGED (0:1){ PRESERVED } SET FORMAT MARK @word(%) SET FORMAT VERBATIM SET HEADER FREQUENCY (1:1){ 0 | FIRST | 1ST | ALL | EVERY @int(2:) } SET HELP WAIT SET HELP NO WAIT SET PAGE HEIGHT @int SET PAGE TITLE (1:)@word SET PAGE WIDTH @int SET TITLE FREQUENCY (1:1){ 0 | FIRST | 1ST | ALL | EVERY @int(2:) } SET TITLE JUSTIFICATION (1:1){ LEFT | CENTER | RIGHT } SHOW COLUMN @word SHOW COMMENTS SHOW COMMENTS @word SHOW ENVIRONMENT SHOW FORMAT SHOW INDEXES SHOW KERNELS SHOW PAGE SHOW SYMBOL @word SHOW SUMMARY START @word UNLOAD @word Related Topics
Table
The designation "table" comes from the appearance of listings of the attributes of events. If we list all of the events we have recorded on a sheet of paper (or a terminal) so that the attributes for each event are always listed in the same order from left to right, the resulting page will look like a "table" of values similar to a table of sines and cosines or a table of prices. Tabular Format
TABULAR
JAN 25 07:15:00 OBSERVATION WEATHER Sunny and cool (about 55 F) Air Quality good. JAN 26 07:15:00 OBSERVATION WEATHER Sunny and cool (about 52 F) MARKED TABULAR
> JAN 25 07:15:00 OBSERVATION WEATHER Sunny and cool (about 55 F) Air Quality good. > JAN 26 07:15:00 OBSERVATION WEATHER Sunny and cool (about 52 F) SPACED TABULAR
JAN 25 07:15:00 OBSERVATION WEATHER Sunny and cool (about 55 F) Air Quality good. AN 26 07:15:00 OBSERVATION WEATHER Sunny and cool (about 52 F) Related Topics
Tabular Format Mark
SET FORMAT MARK characterwhere "character" is the character you would like to replace '>'. NOTE: the format character cannot be a semi-colon. For example suppose that you would like to change the format mark from '>' to '='. Type the command
SET FORMAT MARK =; Related Topics
Time Formats
SET COLUMN column_name FORMAT format; SET DEFAULT TIME FORMAT format;A number of standard formats may be specified:
Custom Formats, Default Time Format Titles
SHOW PAGE Typing Commands
Inspekt>The program performs some action based upon the typed command. If a command is too long to fit on a single line, hit the return key when you get to the end of the line and continue typing on the next line. When you are finished typing the command, type a semi-colon (";"). The semi-colon is required at the end of all commands typed in response to a prompt ending with ">". It is needed even if the line will fit on a single line. Occasionally, Inspekt may prompt you to supply inputs other than commands (such as in the Help system). In such cases the prompt will not end in a greater than sign ">" and the semi-colon is not needed. The commands you type may be in either upper or lower case. If you begin typing a command and realize you've made an error or wish to start again, add a blank line to the command entered so far. Inspekt will ignore what you've typed and prompt you for a new command. \subsection Related Topics Editing Commands, Column and Table Abbreviations, Using Symbols, Special Symbols --- Queries, Collecting Commands In Files Using SymbolsAn Example
For example suppose that you frequently want to edit your last "Select" command. You could make up the symbol ES as shown below:
DEFINE ES EDIT SELECT;When you type
Inspekt> ES;The command is translated to
EDIT SELECTIf you have recently issued a select command, the command will be copied into the editor so that you may perform any desired modifications. Creating Symbols
DEFINE symbol_name value;where "symbol_name" is the name of the symbol you want to define and "value" is the associated list of words and characters. The value of a symbol may be blank. Symbol names must begin with a letter and can not end with a question mark '?'. Also the case of letters in a symbol is insignificant. For example, the commands
DEFINE MYSYM a string of words; DEFINE MySym a string of words; DEFINE mysym a string of words;all define the symbol MYSYM. Moreover, when symbols appear in a command, the case of the letters is insignificant. The commands
SET FORMAT MYSYM; SET FORMAT MySym; SET FORMAT mysym;will all be recognized as containing the symbol MYSYM. Removing Symbols
UNDEFINE symbol_nameNote that you can "undefine" a symbol that has not been defined. This is useful in Inspekt Procedure Files when you want to make sure that some previously defined symbol will not accidentally alter the meaning of a procedure command. Symbols Used in Other Symbols
DEFINE P PRESERVED; DEFINE M MARKED; DEFINE TAB TABULAR; DEFINE SETF SET FORMAT DEFINE MYFMT SETF M TAB P;When you type
Inspekt> MYFMT;The effect will be the same as if you had typed
SET FORMAT MARKED TABULAR PRESERVED;Symbols are not evaluated until they are encountered in a command. Moreover, symbol substitution is performed until no more symbols are found in the string. As a result of this "evaluate when encountered" strategy you can change the value of MYFMT to mean SET FORMAT MARKED TABULAR by redefining P to be a blank.
DEFINE P ;In addition to saving you typing, symbols offer a mechanism for passing information to Inspekt Procedures. If a procedure needs some variable piece of information, you can write the procedure so that this information is expected to be present in some symbol. Then create the symbol with the appropriate information before starting the procedure that needs it. Suppressing Symbols Substitution
SET PAGE TITLE @MYFMT@; Examining Symbols
SHOW SYMBOL patternto see the definition and full evaluation of all symbols whose names match the supplied pattern. \subsection Related Topics Echoing Translated Commands, Collecting Commands In Files, Special Symbols --- Queries, Column and Table Abbreviations Verbatim Format
--- TIME --- JAN 25 18:29:59 --- ACTIVITY --- OBSERVATION --- SUBCLASS --- GOOD AIR QUALITY --- COMMENTS --- The air quality is good. Smog has not been a problem for several days now. Related Topics
Where Clause
WHERE condition AND/OR (NOT) condition ... AND/OR (NOT) conditionWith one exception A condition is an expression of the form:
column_name binary_relation value/column or column_name [NOT] BETWEEN value1/column AND value2/columnOnly names of columns from loaded kernels may be specified. The columns must be scalar valued. If the column specified in a relation is a character or time column, VALUE must be enclosed in single (') or double (") quotes. The binary relations are: NE, LT, LE, EQ, GE, GT, LIKE, NOT LIKE. The short hand equivalents of the first 6 of these are !=, <, <=, =, >=, >. All but the LIKE relation can be used with any column. The LIKE relation can be used only with character columns; it is the pattern matching relation. The value to the right of a LIKE relation is a pattern that the column must match. The character '*' matches any substring of of any string. The character '% ' matches any single character. Conditions may be grouped using parentheses. These groups may in turn be grouped using parentheses and the connecting words AND and OR. Any condition can be negated using the word NOT. Related Topics
Problems, Suggestions
If you have comments or suggestions regarding Inspekt, send them to
btaber@spice.jpl.nasa.govWithin the limits of time and money, we will do our best to respond to your correspondence.
---Bill Taber |