This chapter describes the general purpose commands of Adabas Extended Operation (AEO).
Usage: adaini [DBID=<dbid>] {<add> | <del> | <show>> | <file> | <ver>}
<dbid> is a numeric value between 0 and 255. If the DBID parameter is not specified, or if DBID=0 has been specified, the ADABAS.INI file is processed; otherwise the DB<dbid>.INI file is processed.
<add> is used to add or modify one or more items in a configuration file, and has the following syntax:
{ADD | MOD[IFY] } <topic_list> <item_value_list>
Note:
ADD and MOD[IFY] are equivalent; you can also use ADD to modify
items and MOD[IFY] to add items.
<topic_list> has the following syntax:
{ TOPIC=<topic> } ...
where <topic> is the name of a topic. If the item(s) to be processed belong to a subtopic, the complete hierarchy of topics to which the item(s) belong must be specified.
Note:
Topic names are converted to upper case.
<item_value_list> has the following syntax:
{ITEM=<item>[=<value>] } ...
where <item> is the name of an item and <value> the value of the item.
Notes:
adaini mod topic=node_parameter topic=analyser item=ACTION=no
This command sets the item ACTION in the topic NODE_PARAMETER, subtopic ANALYSER to no, and hence deactivates AEO.
<del> is used to delete one or more items from a configuration file and has the following syntax:
DEL[ETE] <topic_list> <item_list>
<topic_list> is used in the same way as for <add>.
<item_list> has the following syntax:
{ITEM= *} | {ITEM = <item>} ...
where <item> is the name of an item. The specified items are deleted; if you specify '*', all items and the topic to which they belong are deleted.
Notes:
adaini dbid=36 del topic=environment item=ADAHYX_4
This command deletes the environment setting for ADAHYX_4 and hence deactivates hyperexit 4.
<show> is used to show one or more items stored in a configuration file and has the following syntax:
show [<format>] <topic_list> [<item_list>]
<format> has the following syntax:
FORMAT={ BAT | BSH | CMD | CSH}
If you specify FORMAT, statements for the specified shell are generated, which create an environment variable with the item names to be processed as name and the item values as values.
<topic_list> is used in the same way as for <add>.
<item_list> has the same syntax as for <del>. If ITEM=* has been specified, all items belonging to the topic specified are displayed; if <format> has not been specified, they are displayed in the format <item>=<value>, followed by a line feed. If items are specified explicitly by their name, these items are displayed; if <format> has not been specified, only the values of the items are displayed, followed by a line feed.
If <item_list> has not been specified, all items belonging to the topic are displayed; if format has not been specified, they are displayed in the format <item>=<value>. Subtopics are also displayed; the layout is shown in the following example.
The command
adaini show topic=db_list
might generate the following output:
[DBID_001] INI_FILE=C:\Program Files\Software AG\Adabas\db001\DB001.INI NAME=V33-DATABASE STRLVL=12 [DBID_001-END] [DBID_002] AUTOSTART=V616 INI_FILE=C:\Program Files\Software AG\Adabas\db002\DB002.INI NAME=P289591 STRLVL=12 [DBID_002-END] [DBID_003] INI_FILE=C:\Program Files\Software AG\Adabas\db003\DB003.INI NAME=DEFAULT-DATABASE STRLVL=15 [DBID_003-END] [DBID_004] INI_FILE=C:\Program Files\Software AG\Adabas\db004\DB004.INI NAME=TEST-ICU STRLVL=15 [DBID_004-END] [DBID_005] INI_FILE=C:\Program Files\Software AG\Adabas\db005\DB005.INI NAME=ADA618-DB STRLVL=15 [DBID_005-END] [DBID_012] INI_FILE=C:\Program Files\Software AG\Adabas\db012\DB012.INI NAME=GENERAL_DATABASE STRLVL=15 [DBID_012-END] [DBID_036] AUTOSTART=NO INI_FILE=C:\Program Files\Software AG\Adabas\db036\DB036.INI NAME=GENERAL_DATABASE STRLVL=15 [DBID_036-END] [DBID_062] AUTOSTART=NO INI_FILE=C:\Program Files\Software AG\Adabas\db062\DB062.INI NAME=GENERAL_DATABASE STRLVL=16 [DBID_062-END]
The command
adaini dbid=36 show format=bat topic=backup item=BCK001 item=BCK002 item=BCK003
might generate the following output:
set BCK001=C:\Program Files\Software AG\Adabas\db036\BCK001.036 set BCK002=C:\Program Files\Software AG\Adabas\db036\BCK002.036 set BCK003=C:\Program Files\Software AG\Adabas\db036\BCK003.036
<file> is used to display the path and name of the config file for Adabas or a selected DBID. It has the following syntax:
FILE
<ver> is used to verify items in the topic NUCPARMS of a configuration file. Potentially unique abbreviations will then be automatically replaced by the correct item names (e.g. the abbreviation PORT will be automatically corrected to PORTNUMBER). It has the following syntax:
VER[IFY]
Usage: adainst <dbid>
If <dbid> is missing and
ADABAS.INI does not exist in %ADADATADIR%\etc
,
adainst creates %ADADATADIR%\etc\ADABAS.INI
.
The following steps are done by this command:
create directory %ADADATADIR%\etc
copy the template file %ADAPROGDIR%\ADABAS.INI
to
%ADADATADIR%\etc\ADABAS.INI
if this does not yet exist.
if %ADADATADIR%\etc\ADABAS.INI
did already exist,
check whether it already contains the topic NODE_PARAMETER and the DB_PARAMETER
subtopic of the DB_DEFAULTS topic. If not, copy from the template.
substitute the following values if required:
NODE_NAME
in topic MISCELLANEOUS
LOG_FILE in subtopic LOGGING within topic
NODE_PARAMETERS.
If <dbid> is specified and the topic
DBID_<dbid> does not exist in ADABAS.INI,
adainst creates
%ADADATADIR%\db<dbid>\DB<dbid>.INI
.
The following steps are done by this command:
read the topic DB_DEFAULTS from ADABAS.INI and copy it to DB<dbid>.INI.
search for assign.*sh and
adanuc.*sh files in the directory
%ADADATADIR%\db<dbid>
and copy
container definitions into the topic CONTAINER
search for adanuc.*sh files in directory
%ADADATADIR%\db<dbid>
and copy
nucleus parameters into the topic NUCPARMS
ask for user names in the topic ACTION_DBA
display enabled/disabled actions
use adarep
dbid=<dbid>summary
to get the database
name and insert the item NAME into the topic
DBID_<dbid> of ADABAS.INI
Usage: adainst <dbid>
If <dbid> is missing and
ADABAS.INI does not exist in $ADADATADIR/etc
,
adainst creates
$ADADATADIR/etc/ADABAS.INI
.
The following steps are done by this command:
create directory $ADADATADIR/etc
copy the template file $ADAPROGDIR/ADABAS.INI
to
$ADADATADIR/etc/ADABAS.INI
if this does not yet exist.
if $ADADATADIR/etc/ADABAS.INI
did already exist,
check whether it already contains the topic NODE_PARAMETER and the DB_PARAMETER
subtopic of the DB_DEFAULTS topic. If not, copy from the template.
substitute the following values in the copied file:
NODE_NAME
in topic MISCELLANEOUS
LOG_FILE in topic LOGGING
(NODE_PARAMETER).
If <dbid> is specified and the topic
DBID_<dbid> does not exist in ADABAS.INI,
adainst creates
$ADADATADIR/db<dbid>/DB<dbid>.INI
.
The following steps are done by this command:
read the topic DB_DEFAULTS from ADABAS.INI and copy it to DB<dbid>.INI.
search for assign.*sh and
adanuc.*sh in the directory
$ADADATADIR/db<dbid>
and copy
container definitions into the topic CONTAINER
search for adanuc.*sh files in directory
$ADADATADIR/db<dbid>
and copy
nucleus parameters into the topic NUCPARMS
ask for user names in the topic ACTION_DBA
display enabled/disabled actions
use adarep
dbid=<dbid>summary
to get the database
name and insert the item NAME into the topic
DBID_<dbid> of ADABAS.INI
Usage: adakill <dbid>
adakill stops the Adabas nucleus for the database <dbid> as follows:
(PC platforms:) by sending an interrupt (CTRL/BREAK). The parameter <dbid> must be specified.
(Linux:) with Linux signal 15. The parameter <dbid> must be specified.
Warning: This command should only be used if adastop with the option ABORT is not able to stop the nucleus. Adabas will write a memory dump and will perform an AUTORESTART at the next startup. |
The following steps are done by this command:
get the process ID for adanuc
send interrupt
Usage: adalog [<dbid>] [-t]
adalog displays the Adabas log file.
If <dbid> is specified, all entries for this database are displayed. If <dbid> is not specified, entries of all databases are displayed. If the option -t is used, adalog displays the end of the log file and continuously appends new lines from the log file to the display.
Usage: adamsg DBID=<dbid> PID=<process ID> UTILITY=<utility name> MESSAGE=<message ID> TEXT=<message text>
The following message IDs are supported:
ABORTED
For this message ID, TEXT contains the abort reason.
INCNUCP
For this message ID, TEXT=nucleus parameter=<parameter>, current size=<current size>, new size=<new size>. This option is used in the action ada_inuc (increase nucleus parameter).
INP
For this message ID, TEXT=parameter assignment.
STARTED
For this message ID, TEXT is empty.
TERMINATED
For this message ID, TEXT is empty.
adamsg is the interface from batch files to the Adabas log file. Every batch file (as well as AEO actions) may use this interface to log messages. The order of the parameters is free, except that the TEXT parameter must be last in the parameter list. All parameter values except the TEXT parameter will be converted to upper case.
adamsg DBID=77 PID=4711 UTILITY=my_uti MESSAGE=ABORTED TEXT=file abc is empty
will generate following message line at the end of the log file:
004711 <date + time> 00077 <user name> %my_uti-F-ABORTED, file abc is empty
Furthermore, the ID of the current user (if available) is inserted into the ACTION_DBA topic.
Usage (PC platforms): [CALL] adaset <dbid>
Usage (Linux): adaset <dbid>
adaset defines the following environment variables:
ADADBID=<dbid>This is the default database ID.
(PC platforms:) ADADBDIR=%ADADATADIR%\db<dbid>
(Linux:)
ADADBDIR=$ADADATADIR/db<dbid>This is the database working directory of the
default database.
In addition, adaset expands the PATH variable as follows:
PATH=%ADAPROGDIR%;%ADAPROGDIR%\tools;%PATH%
Note that the CALL command must be used when adaset is executed from a batch file rather than from a command prompt.
In addition, adaset expands the PATH variable as follows:
PATH=$ADAPROGDIR:$ADAPROGDIR/tools:$PATH
In a C shell context, adaset is an alias that is created by a call of adaset.csh. In a Bourne shell context, adaset is a function that is created by a call of adaset.bsh. Before you use adaset, you must issue one of the following commands:
. $ADATOOLS/adaset.bsh (Bourne shell) source $ADATOOLS/adaset.csh (C shell)
These statements are already executed by adaenv.bsh (Bourne shell) or adaenv.csh (C shell).
Usage: adashow [<dbid>] [-a]
adashow displays the following information for the database <dbid>:
Database ID : the value specified by ADADBID
Name : NAME in the topic DBID_<value in ADADBID>
Version : Database version
Config. File : INI_FILE in the topic DBID_<value in ADADBID>
Status : either active or inactive
TCP-Port : displays the TCP port number, if configured. The default port number is 49152. If the TCP parameter has not been configured, "not configured" is displayed. If the TCP parameter has been configured, but either ADATCP is not set or NOADATCP is set, "not enabled" is displayed.
Adastart-Port: This is a Linux only option. Displays the adastart Port number, if
configured. If the ADASTARTPORTNUMBER
parameter is not configured or is
set to value 0, "not configured" is displayed. There is no default port number for
this parameter.
If <dbid> is missing, adashow displays the information for the default database specified by the environment variable ADADBID.
If the option -a is used, adashow displays the database ID, name, version and status for all configured Adabas databases on this node which are found in section DB_LIST in Adabas.INI.
Note:
If adashow does not show all the expected information, the reason
might be that abbreviated item names have been configured, possibly with a text
editor. These item names can be verified and automatically corrected with the
usage of adaini verify.
Usage: adastart [<dbid>]
adastart starts the Adabas database <dbid>. The first time it is called, it creates the nucleus log file adanuc.log, on subsequent calls the nucleus log is saved with a time stamp, i.e. adanuc.log.timestamp.
The following steps are done by this command:
Check if the nucleus is already online
The environment variable ADANUCLOG is defined as the full path with the file name for the nucleus log output.
If ADANUCLOG is not defined or valid, the default path for the adanuc.log will be in the same directory as the location of the DBnnn.INI file. The path for each DBnnn.INI is specified in %ADADATADIR%\etc\ADABAS.INI file under the topic INI_FILE. If the value of INI_FILE has not been modified, the default path will be %ADADATADIR%\db<dbid>\adanuc.log
If the environment variable ADANUCLOGOLD is defined as "COPY", and the nucleus log of the previous session exists (file name %ADADATADIR%\db<dbid>\adanuc.log), the nucleus log is copied to %ADADATADIR%\db<dbid>\adanuc.log.old
If the environment variable ADANUCLOGOLD is defined as "APPEND", and the nucleus log of the previous session exists (file name %ADADATADIR%\db<dbid>\adanuc.log), the nucleus log is appended to %ADADATADIR%\db<dbid>\adanuc.log.old
Start the nucleus using the utility named Adabas which reads the nucleus parameters from DB<dbid>.INI.
Wait until the nucleus is online or an Adabas error occurs.
The following steps are done by this command:
Read the nucleus parameters from DB<dbid>.INI and write them into the file $ADADBDIR/nucparms.<dbid>.
Check if the nucleus is already online.
The environment variable ADANUCLOG is defined as the full path with the file name for the nucleus log output.
If ADANUCLOG is not defined or valid, the default path for the adanuc.log will be in the same directory as the location of the DBnnn.INI file. The path for each DBnnn.INI is specified in $ADADATADIR/etc/ADABAS.INI file under the topic INI_FILE. If the value of INI_FILE has not been modified, the default path will be $ADADATADIR/db<dbid>/adanuc.log
If the environment variable ADANUCLOGOLD is defined as "COPY", and the nucleus log of the previous session exists (file name $ADADATADIR/db<dbid>/adanuc.log), the nucleus log is copied to $ADADATADIR/db<dbid>/adanuc.log.old.
If the environment variable ADANUCLOGOLD is defined as "APPEND", and the nucleus log of the previous session exists (file name $ADADATADIR/db<dbid>/adanuc.log), the nucleus log is appended to $ADADATADIR/db<dbid>/adanuc.log.old.
Start the nucleus using the parameter file $ADADBDIR/nucparms.<dbid>.
Wait until the nucleus is online or an Adabas error occurs.
Aditionally, adastart communicates with the nucleus and displays the nucleus messages. By default, adastart displays any error messages written into the nucleus.log file. If you want to display all the messages issued from the nucleus, you must provide an extra parameter while issuing the adastart call. For example:
adastart [<dbid>] [-v | --verbose]
where the -v
or --verbose
option prints the messages received
from the nucleus.
For communicating with the nucleus, adastart needs a dedicated port. You can assign a
port by providing an ADASTARTPORTNUMBER
in the DB<dbid>.INI file under
the NUCPARMS
item. You must assign ADASTARTPORTNUMBER
when
calling adastart for the first time, otherwise then operating system assigns a free port
number communicating.
By default, adastart waits 30 seconds for the next available nucleus message. If you
want to increase this timeout value, you must add the ADASTARTTIMEOUT
parameter in the ENVIRONMENT
item. The value you provide must be in
seconds.
If adastart fails to receive any adanuc messages within timeout, the script ends with an error and you must check the adanuc.log file.
Usage: adastop [<dbid>]
adastop stops the database <dbid>. If <dbid> is missing, adastop stops the default database specified by the environment variable ADADBID.
The following steps are done by this command:
check if the nucleus is online or offline
read the topic definition TERMINATE_ADANUC from DB<dbid>.INI
take the defined shutdown options as defined in the topic and wait for the defined time intervals for the nucleus to stop