Access Server Commands [ Information Access Server: Database Administration ] MPE/iX 5.0 Documentation
Information Access Server: Database Administration
Access Server Commands
_____________________________________
| |
| |
| HELP [command] |
| |
_____________________________________
command -- command topic for which help is desired
Supplies help information on any specified command.
_____________________________________
| |
| |
| LIST record# |
| |
_____________________________________
record# -- number of the record to be listed
Lists selected records from the current table. The listing starts at the
beginning of the file or with the first record specified.
_____________________________________
| |
| |
| RECORD filename|OFF |
| |
_____________________________________
filename -- name of file where session will be recorded
OFF -- used in place of name to turn recording off
Records all commands and their parameters in an MPE file, allowing the
user to create a command file model.
_____________________________________
| |
| |
| RESUME |
| |
_____________________________________
Continues execution of the command file if an error occurs that would
normally terminate the batch job. The RESUME command can be
strategically placed between functionally autonomous sections of the
command file when the results of one section are not dependent on the
other. Once this command is encountered, batch processing will start
over with the next TABLE or SELECT command.
_____________________________________
| |
| |
| SHOW option |
| |
_____________________________________
option -- desired option
This command is used in conjunction with the configuration commands to
access database data and table information. Here are the valid options:
TABLES -- shows tables currently configured for access
ITEMS -- lists item names and types in current table
DATASETS -- lists datasets in the selected database
DATAITEMS -- lists data items in the selected dataset
STATUS -- shows status of current session
(For more details, see "Show Item Characteristics" under "Examining Table
Definitions" in Chapter 5.)
_____________________________________
| |
| |
| TELL message |
| |
_____________________________________
message -- "desired message string"
Specifies a message that will appear in the JOB-STATUS table. This
command must be issued after the user's identity is established with a
REMOTE or USERINFO command. The message string must be enclosed in
single (') or double quotes (").
_____________________________________
| |
| |
| XEQ filename |
| |
_____________________________________
filename -- name of the command file to be executed
Executes an Access Server batch command file. This command can either be
executed interactively or can be nested in another command file. When
XEQ is issued interactively, an "end of file" returns control to the Host
Batch Facility, while an EXIT command exits the batch program.
_____________________________________
| |
| |
| DEBUG |
| |
_____________________________________
Enters the MPE DEBUG subsystem. You must have privileged mode (PM)
capability to enter the debugger.
_____________________________________
| |
| |
| TIME ON|OFF |
| |
_____________________________________
Causes a time message to be associated with each command execution. By
default this feature is OFF.
_____________________________________
| |
| |
| SPEED 0-60 |
| |
_____________________________________
Defines how long (between 0 and 60 seconds) to wait between each command
execution. The default is 0.
_____________________________________
| |
| |
| USERINFO [username [userpswd]]|
| |
_____________________________________
username -- name of a valid Information Access user
userpswd -- password assigned to the user
Used to establish user access on the HP 3000. The user name and password
are checked against the data dictionary to determine which tables can be
accessed.
_____________________________________
| |
| |
| TABLE table [SAVED|S] |
| |
_____________________________________
table -- name of the table to access
SAVED or S -- identifies the table as a saved table
Explicitly selects a single table for access. All currently active
tables are closed and replaced with the one specified. To select more
than one table for access, you must use succeeding SELECT commands. The
SAVED parameter is required only if a configured table and a saved table
have the same name and you want to select the saved table.
_____________________________________
| |
| |
| REN_TAB [oldname] newname |
| |
_____________________________________
oldname -- name originally assigned to the table
newname -- new name to be assigned to the table
This command can be used to supply both the new name and the old name,
which eliminates the need for SELECT. Only Information Access saved
tables can be renamed.
_________________________________________
| |
| |
| COLUMN [table column [column[..]]]|
| |
_________________________________________
table -- name of table where columns exist, or a * for
current
column -- name of column(s) to access
Explicitly selects columns for access. However, if data from more than
one table is desired, the COLUMN command must be used in conjunction with
succeeding SELECT commands.
______________________________________
| |
| |
| DEFINE_Q (value operator value)|
| |
______________________________________
value -- defines values to be queried
operator -- valid operator that defines the query
Performs a query operation on the current table and provides the features
offered through the Where Clause of a view table (see Appendix B,
Constructing View Tables).
The value can refer to any item or record in the current table. If the
value contains a blank character, such as exists in a proper name, it
must be surrounded by single quotes. If you want to query all of the
records in the selected tables, simply omit the search expression. Valid
operators include:
= > < <> <= >= MATCH
A series of search patterns can be combined to perform more elaborate
queries with the Boolean operators (AND, OR, and NOT). MATCH is used in
conjunction with the wildcard characters @ for any value, ? for any
character.
Here is an example:
DEFINE_Q "(model = 'HP150') AND &
NOT (acquired < 84) &
(user MATCH 'Bill @')"
This example uses the Boolean operators AND and NOT to link three search
patterns together. It directs Information Access to retrieve all records
based on the following conditions:
* all HP 150s
* not acquired before 1984
* belonging to any user named Bill.
_____________________________________
| |
| |
| OUTPUT_TAB [outputname [type]]|
| |
_____________________________________
outputname -- saved table, data table object, or filename[.group]
type -- output format (default SAVED)
Used to output the current result table according to the specified
format.
_____________________________________
| |
| |
| SORT column [direction] |
| |
_____________________________________
column -- name of column to be sorted
direction -- direction of the sort
Performs a sort operation. This command allows sorting of only one
column at a time. To sort more than one column, you must use SELECT
commands in conjunction with the PERFORM_SORT command.
_________________________________________
| |
| |
| SUMMARY column operation newcolumn|
| |
_________________________________________
column -- name of the column to summarize
operation -- summary operation to be performed
newcolumn -- new name assigned to summarized results
This command initiates one summary operation. To summarize information
in multiple columns, or if you want to use the GROUP command, you must
use PERFORM_SUM in conjunction with the SELECT command.
Selecting and Manipulating Tables
_____________________________________
| |
| |
| SELECT table [SAVED|S] |
| |
_____________________________________
table -- name of table
SAVED or S -- identifies the table as a saved table
Selects table for access. The SELECT must be issued immediately after
user access is established with REMOTE or LOCAL. Up to three tables (and
their type if needed) can be selected during each session. If you are
accessing a saved table, and a configured table with the same name
exists, use the SAVED option. Here is an example:
REMOTE username userpswd
SELECT table1 SAVED
SELECT table2
SELECT table3
NOTE A special TABLE command, available through Access Server, is
described above.
____________________________________________
| |
| |
| RELEASE_TABLE savedtablename username|
| |
____________________________________________
savedtablename -- name of saved table to release
username -- name of the user to release it to
Once a table has been saved, it can be made available to other users.
_____________________________________
| |
| |
| DEL_TAB table [SAVED|S] |
| |
_____________________________________
table -- name of table to be deleted
SAVED or S -- identifies the table as a saved table
Deletes the specified table. Only those tables for which the current
user has access privileges can be deleted. The type need not be
specified unless a configured table and a saved table share the same
name. In that case, if no type is specified, the configured table is
deleted.
NOTE If a saved table and a configured table exist with the same names,
the configured table will be deleted unless "S" or "SAVED" is
specified.
Choosing Columns
_____________________________________
| |
| |
| COLUMN |
| |
_____________________________________
Indicates that you want to select columns for access. The columns are
chosen with succeeding SELECT commands:
SELECT table col1 col2 col3 ...
The list of columns can be continued on the next line with the
continuation character (&). The JOIN_COL command is required if more
than one table has been selected.
_____________________________________
| |
| |
| JOIN_COL table column |
| |
_____________________________________
table -- name of table being accessed
column -- join column with data common to all tables
When more than one table is being accessed, you must specify a "join
column" containing data common to all of the tables. Data from up to
three tables can be combined. A separate JOIN_COL command is required
for each table. Here is an example of how to access columns from two
different tables:
REMOTE
SELECT table1
SELECT table2
COLUMN
SELECT table1 col1 col2 col3
SELECT table2 col3 col4 col5
JOIN_COL table1 col3
JOIN_COL table2 col3
Requesting a Query
_____________________________________
| |
| |
| DEFINE_Q |
| |
_____________________________________
Indicates that you want to perform a query operation. The SEARCH command
supplies the parameters describing the query and a PERFORM_Q command
initiates the query.
NOTE In Access Server, DEFINE_Q provides additional capabilities that
are not valid on the PC. For a full description, see "Access Server
Shortcuts," above.
____________________________________________
| |
| |
| SEARCH ["(column operator value...)"]|
| |
____________________________________________
column -- name of column being queried
operator -- valid query operator
value -- value to be queried
All three parameters in the search expression must be collectively
enclosed in double quotes. If the value contains a blank character, such
as exists in a proper name, the value must be surrounded by single quots.
If you want the query to include all of the values in the result table,
simply omit the search expression. Valid operators include:
= > < <> <= >=
A series of search patterns can be combined to perform more elaborate
queries with the Boolean operators (AND, OR, and NOT). Here is an
example:
SEARCH "(model-number = 'HP150') AND &
(acquired < 84) AND &
(user MATCH 'Bill @')"
This example uses the Boolean operator AND to link three search patterns
together. It directs Information Access to retrieve all records based on
the following conditions:
* Looks for all HP 150s
* that were acquired before 1984
* and belong to any user named Bill.
_____________________________________
| |
| |
| Q_RESULT |
| |
_____________________________________
Queries data resulting from the previous query operation. A SEARCH
command is used to supply the desired search criteria.
_____________________________________
| |
| |
| PERFORM_Q |
| |
_____________________________________
Initiates the query operation specified by a succeeding SEARCH command.
Here is an example of the entire sequence:
DEFINE_Q
SEARCH "(model = 'HP 150')"
PERFORM_Q
Requesting a Sort
_____________________________________
| |
| |
| SORT |
| |
_____________________________________
Indicates that you want to perform a sort operation. A SELECT command
defines the sort parameters and a PERFORM_SORT command initiates the
sequence.
Up to four columns on the PC (8 columns on the host HP 3000) can be
selected for each sorting operation. Preceding SELECT commands are used
to specify which column to sort and to define the direction and order of
the sort:
SELECT column direction order
where
column -- name of column to be sorted
direction -- the direction of the sort (A or D)
order -- the order of the sort (1-4)
The named column is sorted in an ascending (A) or descending (D)
direction. The order is established by a number placed in the last
position of each SELECT command.
_____________________________________
| |
| |
| PERFORM_SORT |
| |
_____________________________________
This command is needed to initiate the sort operation specified in a
previous SELECT. The following example illustrates how four different
columns are sorted:
SORT
SELECT column1 A 2
SELECT column2 A 4
SELECT column3 D 1
SELECT column4 A 3
PERFORM_SORT
In this example column3 is processed first in descending order, followed
by column1, column4, and column2 in ascending order.
Requesting a Summary
_____________________________________
| |
| |
| SUMMARY |
| |
_____________________________________
Indicates that you want to perform a summary operation. Succeeding
SELECT commands specify the parameters of the summary and a PERFORM_SUM
command initiates the sequence.
Up to 64 summary operations, each using a separate SELECT, can be
processed at a time. In this instance, SELECT is used like this:
SELECT column operation [newcolumn]
where
column -- name of the column to be summarized
operation -- the summary operation to be performed
newcolumn -- name assigned to summarized column (optional)
Data from the selected column is summarized according to the specified
operator, and the results are placed in a new column with the designated
name. If the new name is omitted or an asterisk (*) used in place of the
new name, a default name is assigned to the resulting column of
summarized data.
Here are the valid operations:
TOT = total
AVE = average
MAX = maximum value
MIN = minimum value
GROUP = group records
COUNT = count records
Up to 10 GROUP options are allowed on remote tables.
_____________________________________
| |
| |
| PERFORM_SUM |
| |
_____________________________________
This command initiates the summary operations specified in the preceding
SELECT commands. Here is an example of a summary operation:
SUMMARY
SELECT COL1 MIN
SELECT COL2 TOT TOTAL-COL1
SELECT COL5 CNT
SELECT COL5 GROUP
SELECT COL6 GROUP
SELECT COL7 GROUP
PERFORM_SUM
MPE/iX 5.0 Documentation