QUERY DB command

Use the QUERY DB command, which is a type-2 command, to display information about databases.

Subsections:

Environment

The following table lists the environments (DB/DC, DBCTL, and DCCTL) from which the QUERY DB command and keywords can be issued:

Table 1. Valid environments for QUERY DB command and keywords
Command / Keyword DB/DC DBCTL DCCTL
QUERY DB X X  
NAME X X  
SHOW X X  
STATUS X X  
TYPE X X  

Syntax

Read syntax diagramSkip visual syntax diagram QUERYQRY DB NAME(*)NAME(,namename*) SHOW(,ACCTYPEALLDEFNDEFNTYPEGLOBALIMSIDLOCALMODELRESIDENTSTATUSTIMESTAMP)SHOW(PGMSNDXVERSIONWORK)SHOW(EXPORTNEEDED)STATUS(,ALLOCFALLOCSBACKOUTEEQELOCKNOTINITNOTOPENOLROPENQUIESCEDQUIESCINGRECALLRECOVRNLRREPLSTOACCSTOSCHDSTOUPDS)TYPE(,DEDBDHISNDXDLIMSDBPARTPHDAMPHIDAMPSINDEX)

Keywords

The following keywords are valid for the QUERY DB command:

NAME()

Specifies the 1- to 8-character name of the database (DBD name). Wildcards can be specified in the name. The name is a repeatable parameter. The default is NAME(*), which returns all database resources.

If the STATUS filter is not specified, all the database names that match the NAME parameter are returned.

The database names that match the generic or wildcard parameters are processed. Response lines are returned for all the databases names that are processed.

The database name specified can be a HALDB master or a HALDB partition. If the database name is the HALDB master, response lines are returned for the HALDB master and all of its partitions. If the database name is the HALDB partition, response lines are returned for the HALDB master and the partition name if the HALDB master has not been taken offline.

If the database name specified is a DEDB name, response lines are returned for the DEDB name and all the DEDB areas.

DEDB area information is not returned if SHOW(DEFN) is specified.

SHOW()
Specifies the database output fields to be returned. The database name and type are always returned, along with the name of the IMS that created the output for the database and the completion code. The filters supported with the SHOW keyword are:
ACCTYPE
Returns the type of access to the database or the area.

If SHOW(ACCTYPE) is specified, and IMS is not using the IMSRSC repository and global DB status is maintained, the global access type from the resource structure is returned.

If SHOW(ACCTYPE) is specified, the command master IMS is using the repository, and global status is also enabled, the global access type from the resource structure is not returned. The access type from the repository is returned.

The access type from the repository is returned if SHOW(DEFN), SHOW(DEFN,ACCTYPE), SHOW(DEFN,GLOBAL), or SHOW(DEFN,ACCTYPE,GLOBAL) is specified.

ALL
Returns all information about the database itself. Other SHOW keywords can be specified to return information about resources related to the database.

The command master IMS returns global information from the RM resource structure on a separate line, even if the database is not defined at the command master.

Restriction: The ExportNeeded column, which is returned when SHOW(EXPORTNEEDED) is specified, is not returned with SHOW(ALL).
DEFN
Specifies that the resource definitions are to be returned.

The database attributes that can be returned are ACCTYPE, RESIDENT, the repository create and update time stamps, and the IMS runtime create, update, import, and access time stamps.

If SHOW(DEFN) is specified without any other SHOW filters or with the IMSID filter, all the definitional attributes, including those defined globally in the repository and those defined locally in the IMS system, are returned. The runtime resource definitions from the IMS system are returned by each IMS that receives the command. The stored resource definitions in the repository are returned by the command master IMS if the command master IMS is enabled to use the repository.

The command master IMS returns a response line for each generic stored resource definition obtained from the repository. This response line displays the attributes of the generic resource definition. When SHOW(DEFN) is specified without the IMSID filter and all the IMS systems have the same attribute values defined, only the response line for the generic definition is returned. The IMS IDs of the IMS systems that have the stored resource definition defined are not returned. If an IMS system has a stored resource definition with one or more attribute values that differ from the generic stored resource definition, an additional response line is returned for each IMS that has different attribute values.

If SHOW(DEFN,LOCAL) is specified, the runtime resource definitions from the IMS system are returned by each IMS that received the command.

If SHOW(DEFN,GLOBAL) is specified, the stored resource definitions from the repository are returned by the command master IMS. SHOW(DEFN,GLOBAL) is valid only when the command master IMS is enabled to use the repository.

If SHOW(DEFN) is specified with other parameters, only the requested definitional attributes are returned. For example, if SHOW(DEFN,TIMESTAMP) is specified, only the time stamps are returned.
Restrictions:
  • You cannot specify SHOW(DEFN) with DEFNTYPE, MODEL, STATUS, WORK, or PGM.
  • When querying database information from the repository, the SHOW(DEFN) filter is not supported when used with either the TYPE or STATUS filter. The runtime filters of TYPE and STATUS are not valid with SHOW(DEFN), SHOW(DEFN,GLOBAL), SHOW(DEFN,LOCAL), SHOW(DEFN,IMSID), SHOW(DEFN,IMSID,GLOBAL) or SHOW(DEFN,IMSID,LOCAL).
  • The AreaName, LclStat, LModelName, LModelType, and LDefnType columns, which are returned on the QUERY DB SHOW(ALL) command, are not returned with SHOW(DEFN).
  • The Repo and IMSid columns, which are returned with SHOW(DEFN), are not returned with SHOW(ALL).

If SHOW(DEFN,IMSID) is specified, a response line is returned for the generic stored resource definition and an additional response line is returned for each IMS that has the resource defined in the repository, regardless of whether their stored resource definitions are the same as the generic resource definition. There will be some performance overhead for SHOW(DEFN,IMSID) because a list of the IMS systems that have the resource defined is also to be obtained, along with the resource definition.

DEFNTYPE
Returns the definition type. This is how the resource was defined.
EXPORTNEEDED
Specifies that only the database resources that match the NAME parameter and have not been exported to the IMSRSC repository since they were created or last updated are to be returned on the QUERY command.

If the NAME keyword is omitted or NAME(*) is specified, only the names of the resources that need to be exported to the repository are returned.

If a specific name or a generic name that is not NAME(*) is specified on the NAME keyword, a response line is returned for each resource name specified on the command. If the specified resource does not need to be exported to the repository, an N is returned in the ExportNeeded column.

SHOW(EXPORTNEEDED) cannot be specified with any other SHOW parameters or other keywords and is valid only when IMS is enabled with the IMSRSC repository.

The QUERY DB SHOW(EXPORTNEEDED) command is not valid on an XRF alternate.

Tip: For resources and descriptors that have not been exported to the IMSRSC repository, you can issue the EXPORT DEFN TARGET(REPO) OPTION(CHANGESONLY) command to write the resource and descriptor definitions to the repository so that they are available for the next IMS cold start.
GLOBAL
For output fields that have both local and global values, this option returns only the global values. If used with another SHOW keyword to request a specific output field, this option requests that only the global value of the specified output field is returned. IMS retrieves global status information from RM. Global output is returned only by the command master IMS.

The command master IMS returns global status information from the RM resource structure on a separate line, even if the database is not defined at the command master.

If the database name is a HALDB master, global information is returned only for the master database, not for the HALDB partitions associated with the master. If the database name specified is a DEDB, global information is returned only for the DEDB, not the DEDB areas associated to the DEDB.

If SHOW(GLOBAL) is specified without SHOW(DEFN), the repository information is not returned. If GSTSDB=Y is set in IMS, SHOW(GLOBAL) returns global status information from the RM resource structure.

If SHOW(GLOBAL,DEFN) is specified, the global resource definitions from the repository are returned by the command master IMS. SHOW(GLOBAL,DEFN) is valid only when the command master IMS is enabled to use the repository.

IMSID
Returns the IMSIDs of the IMS systems whose resource lists contain the resource name specified.

SHOW(IMSID) is processed only by the command master IMS and is valid only when command master IMS is enabled to use the repository.

If SHOW(IMSID) is specified with the DEFN filter, a separate line is returned for each IMS that has the resource defined, along with the stored resource definitions.

If SHOW(IMSID) is specified without the DEFN filter, a separate line is returned for each IMS that has the resource defined, along with the resource name. No resource definitions are returned.

SHOW(IMSID) cannot be specified with any other SHOW filters other than DEFN and GLOBAL. If SHOW(IMSID,GLOBAL) is specified, GLOBAL is ignored; that is, SHOW(IMSID,GLOBAL) is treated as SHOW(IMSID). SHOW(DEFN,IMSID,LOCAL) is treated as SHOW(DEFN,LOCAL).

Start of changeSHOW(IMSID) cannot be specified with either the STATUS() or the TYPE() filter.End of change

LOCAL
For output fields that have both local and global values, this option returns only the local values. If used with another SHOW keyword to request a specific output field, this option requests that only the local value of the specified output field is returned. Local output is returned by each IMS that processes the command.

SHOW(DEFN,LOCAL) returns only the local definitional attributes from the IMS system that processes the command.

MODEL
The model name and model type used to create this resource. The model name and model type are blanks for databases generated in the MODBLKS data set. The CREATE command specified without the LIKE keyword creates a resource using the default descriptor as a model. The default descriptor is either the IMS descriptor DFSDSDB1 or user-defined. The CREATE command specified with the LIKE keyword creates a resource using a model. The resource is created with all the same attributes as the model. Attributes set explicitly by the CREATE command override the model attributes. The model type can either be a descriptor (DESC) or a resource (RSC). The model name and model type are for reference only. The resource attributes might not match the model, if attributes are overridden by CREATE or UPDATE command values, or the model is updated later. The model name and model type can be used to identify resources that were created with the same model. The model name and model type of a resource are exported and imported. The IMPORT command does not use the model name and model type when creating a resource.
PGM
The names of the programs that reference the specified database.

The QRY DB SHOW(PGM) command will not show the area names if the DB is a DEDB or the partition names if the DB is a HALDB master.

The QRY DB SHOW(PGM) command will not show dynamic (DOPT) PSBs and database names for which the DOPT PSB has intent.

Note: You cannot specify this filter with other SHOW filters; you must specify SHOW(PGM) individually.
RESIDENT
Returns the local runtime value for the resident option. The value returned is always RESIDENT(Y) for Fast Path DEDBs. The resident option definition is also shown, if it is different from the runtime value. The RESIDENT(Y) option takes effect at the next restart, unless the database was created or updated as RESIDENT(Y) after the checkpoint from which this IMS is performing emergency restart.
SNDX
Returns the names of the associated Fast Path secondary index databases for a DEDB database.
Restriction: You cannot specify this filter with other SHOW filters. You must specify SHOW(SNDX) individually.
STATUS
Returns the local and global database status.

If global status is maintained, the command master IMS returns global information from the RM resource structure on a separate line. The global status information is returned even if the database is not defined at the command master. For a description of the possible database status returned, see the STATUS keyword in the Output fields table under Output fields.

TIMESTAMP
The creation time (TIMECREATE), last update time (TIMEUPDATE), last access time (TIMEACCESS) time, and import time (TIMEIMPORT) time stamps are returned. The time is returned in local time in the format YYYY.JJJ HH:MM:SS.TH, where:
  • YYYY is the year.
  • JJJ is the Julian day (001 - 365).
  • HH is the hour (01 - 24).
  • MM is the minute (00 - 59).
  • SS is the seconds (00 - 59).
  • TH is the tenths and hundredths of a second (00 - 99).
VERSION

Returns the version number of the database that is currently active in the online IMS system. The active version number of a database is stored in the database control blocks that are loaded by the online IMS system. The control blocks define the actual physical structure of the database to the online IMS system.

The possible version numbers range from 0 - 2147483647.

You cannot specify this filter with other SHOW filters; you must specify SHOW(VERSION) individually.

SHOW(VERSION) is valid only for the following database access types:
  • HDAM
  • HIDAM
  • PHDAM
  • PHIDAM
  • DEDB

If SHOW(VERSION) is specified for an unsupported database access type, completion code BD is returned in the CC column of the output. This completion code indicates that the query is invalid for the access type of the database.

If SHOW(VERSION) is specified for a HALDB master, the output includes response lines for the HALDB master name and for each of its partitions. Each partition of the HALDB inherits the version number from the HALDB master, so each response line displays the same version number.

If SHOW(VERSION) is specified for a HALDB partition, the output lists a response line for just that partition. The version number that is displayed is that of the HALDB master. If the partition is disconnected from the HALDB master, such as might happen when the /DBR command is in effect on the database, completion code 10 is returned in the CC column of the output to indicate that no resource was found.

If SHOW(VERSION) is specified for a DEDB, the output lists a response line for only the DEDB. Area information is not listed in the output response.

WORK
Work is in progress for the database that is specified on the NAME parameter and its associated resources. The QRY DB SHOW(WORK) command can be issued before a DELETE, IMPORT or UPDATE command to check for any work in progress for the specified database and any of its associated resources. Any work in progress might cause the subsequent DELETE, IMPORT or UPDATE command to fail. The QRY DB SHOW(WORK) command returns the status for the work in progress for the database that is specified on the NAME parameter.

Specifying SHOW(WORK) with NAME(*) might take a long time to process.

The QRY DB SHOW(WORK) command for a HALDB master database will show the master name if the master has work in progress. The HALDB partition names are shown only if the partitions have work in progress.

Notes:
  1. You cannot specify this filter with other SHOW filters; you must specify SHOW(WORK) individually.
  2. The QRY DB SHOW(WORK) command is not valid on an XRF alternate.
STATUS()
Selects databases for display that match the NAME parameter and possess at least one of the specified database statuses. This selection allows for additional filtering by database status.

The output returned when the STATUS filter is specified includes the status of the database that caused the database name to be displayed even if SHOW(STATUS) is not specified.

ALLOCF
Sets the STATUS() filter to return information about databases that have allocation failure.
ALLOCS
Sets the STATUS() filter to return information about databases that are allocated successfully.
BACKOUT
Sets the STATUS() filter to return information about databases for which incomplete backout exists that prevents the use of the databases.
EEQE
Sets the STATUS() filter to return information about databases for which one or more extended error queue elements exist.
LOCK
Sets the STATUS() filter to return information about databases that are locked.
NOTINIT
Sets the STATUS() filter to return information about databases that are not initialized and therefore cannot be used.
NOTOPEN
Sets the STATUS() filter to return information about databases that are not open.
OLR
The QUERY DB STATUS(OLR) command displays the status of all 'authorized' partitions with HALDB OLR in progress. The rate information is not returned. Instead, the rate information is returned on the QUERY OLREORG command output. A partition can be authorized by issuing a /START DB partname OPEN or UPDATE DB NAME(partname) OPTION(OPEN) command or by accessing the partition from an application. The SSYS record from a RECON listing can be used to determine whether a partition is authorized and to which subsystem.
OPEN
Sets the STATUS() filter to return information about databases that are open.
QUIESCED
Sets the STATUS() filter to return information about databases that are currently quiesced by a previous UPDATE DB START(QUIESCE) command.
QUIESCING
Sets the STATUS() filter to return information about databases that are undergoing quiesce by a previous UPDATE DB START(QUIESCE) command.
RECALL
Sets the STATUS() filter to return information about databases for which database recalls are in progress.
RECOV
Sets the STATUS() filter to return information about databases for which database recovery is in progress.
RNL
Sets the STATUS() filter to return information about DEDB databases for which randomizers are not loaded.
RREPL
Sets the STATUS() filter to return information about databases that have the Restricted Update RREPL value set to ABEND or STATUS.
STOACC
Sets the STATUS() filter to return information about databases that are stopped for access locally or globally and are offline. The SHOW(STATUS) keyword on the QUERY DB command returns a status of STOACC for a DEDB. A status of STOACC indicates that the DEDB is stopped from further access because of a prior /DBR DB or UPDATE DB STOP(ACCESS) command.
STOSCHD
Sets the STATUS() filter to return information about databases that are stopped locally.
STOUPDS
Sets the STATUS() filter to return information about databases that are stopped for updates locally.
TYPE()
Selects databases for display that match the NAME parameter and specific TYPE filter. The supported TYPE filters are:
  • DEDB
  • DHISNDX (refers to Fast Path secondary index databases)
  • DLI
  • MSDB
  • PART
  • PHDAM
  • PHIDAM
  • PSINDEX

TYPE can be specified with the STATUS filter. If both TYPE and STATUS filters are specified, a response line is returned for each database that matches the NAME parameter and the TYPE and STATUS filters specified.

Usage notes

The command can be specified only through the OM API and can be processed only in DB/DC and DBCTL environments.

The QUERY DB command is valid on the XRF alternate system.

The command syntax for QUERY DB is defined in XML and is available to automation programs that communicate with OM.

When you enter this command, the database name can be an existing non-HALDB, a HALDB master, or a HALDB partition. A command against a HALDB partition operates exactly like a command against a non-HALDB except for the /START DB command and the UPDATE DB START(ACCESS) command. A HALDB partition is not allocated during the command unless it was previously authorized but not allocated, the OPEN keyword was specified, or the partition has EEQEs. The partition is allocated at first reference.

For HALDB databases, IMS tracks partition statuses and master database statuses separately. For example, a partition can be stopped, but its master database can be started. Alternatively, the partition can be started, but its master database can be stopped. Before opening, authorizing, or scheduling a partition, IMS always examines the status of the partition and the master database. If either the partition or the master database has a status that prevents the action, IMS does not perform the action.

Each partition has the access limitations of both itself and its master database. For example, if the master database has an access intent of read (READ) and one of its partitions has an access intent of update (UPD), the partition cannot be updated. Alternatively, if the master database has an access intent of update (UPD) and one of its partitions has an access intent of read (READ), the partition cannot be updated. Similar considerations apply to other statuses that affect access limitations, such as being stopped or locked.
Exception: If the HALDB master database has update access (UPD), the partitions can have an access intent of exclusive (EXCL), exceeding the access of the master.

Commands that are issued with a partition name affect only the status of the partition. Commands that are issued against the master database affect only the status of the master database. Therefore, a start of a master database does not update the status of its partitions. If the partitions are stopped, they remain stopped. When a HALDB partition is explicitly stopped, it must be explicitly started again. The type-1 commands with the keyword ALL, type-2 commands with NAME(*), and commands against a HALDB master do not change the STOPPED (shown as STOACC, STOSCHD, or STOUPDS on QUERY DB) and LOCKED indicators in each HALDB partition.

When the command target is a HALDB master, processing acts on all HALDB partitions. For example, if the IMS command is UPDATE DB STOP(ACCESS) on the HALDB master, all of the HALDB partitions are closed, deallocated, and deauthorized. However, the stopped status is only set in the master database. If a QUERY DB command is issued, only the HALDB master displays a status of STOACC (each HALDB partition does not display STOACC unless it was itself stopped). If a UPDATE DB STOP(ACCESS) command was issued against a HALDB master, the display output of a /DISPLAY DB command shows the HALDB master (as STOPPED), but does not display the status of the partitions.

If you want to display information about resource definitions, specify SHOW(DEFN). If you want to know which IMS systems have the resource defined and also know the attributes or resource definitions at each IMS system, specify SHOW(DEFN,IMSID). If you want to know which IMS systems have the resource defined, specify SHOW(IMSID).

Equivalent IMS type-1 commands

The following table shows variations of the QUERY DB command and the type-1 IMS commands that perform similar functions.

Table 2. Type-1 equivalents for the QUERY DB command
QUERY DB command Similar IMS type-1 commands
QUERY DB /DIS DB dbname1...dbnamen | ALL, /DIS STATUS DB

Output fields

The following table shows the QUERY DB output fields. The columns in the table are as follows:
Short label
Contains the short label generated in the XML output.
Long label
Contains the long label generated in the XML output.
Keyword
Identifies the keyword on the command that caused the field to be generated. N/A appears for output fields that are always returned. error appears for output fields that are returned only in case of an error.
Scope
Identifies the scope of the output field.
Meaning
Provides a brief description of the output field.
Table 3. Output fields for QUERY DB command
Short label Long label Keyword Scope Meaning
ACC Acc ACCTYPE, GLOBAL GBL Global access type information from RM, which can be one of the following values:
BRWS
Database has global access type of BRWS.
EXCL
Database has global access type of EXCL.
READ
Database has global access type of READ.
UPD
Database has global access type of UPD.
AREA AreaName N/A N/A Area name. The area name is returned if there are one or more response lines for DEDB areas in the output.
CC CC N/A N/A Completion code. The completion code indicates whether IMS was able to process the command for the specified resource. The completion code is always returned. Refer to the return, reason, and completion codes for QUERY DB.
CCTXT CCText error LCL Completion code text that briefly explains the meaning of the non-zero completion code.
DB DBName DB N/A Database name.
DFNT LDefnType DEFNTYPE N/A Definition type, which can be one of the following values:
CREATE
Defined by a CREATE command.
DDLCRE
Defined by the DDL CREATE DATABASE command.
IMPORT
Defined by the IMPORT command.
IMS
Defined by IMS.
MODBLKS
Defined by system definition in the MODBLKS data set.
Start of changePGMCREATEnd of change
Start of changeDefined by the program create user exit. The database can be exported if the export option was set.End of change
UPDATE
Defined by system definition in the MODBLKS data set, but changed into a dynamic resource by the UPDATE command.
EXPN ExportNeeded EXPORTNEEDED LCL Indicates whether the database has been exported to the IMSRSC repository. The value can be Y or N.
IMSID IMSid IMSID GBL Returns from the repository the IMSIDs that have resource defined.
LACC LAcc ACCTYPE LCL Type of access to database or area, which can be one of the following values:
BRWS
The database is available for read-only processing on this IMS subsystem. The only programs that can use the database on this subsystem are those that have a PCB processing option of GO (PROCOPT=GO). Programs that access the data using the GO processing option might see uncommitted data since a sharing IMS subsystem could be updating the database. The database is opened for read-only processing.
EXCL
The named database is to be used exclusively by this IMS subsystem. This exclusive access is guaranteed only when the database is registered to DBRC.
READ
The database is available for read-only processing in this IMS subsystem. Programs with update intent can be scheduled, but cannot update the database. Access type READ differs from access type BRWS in that the data is read with integrity (locking is performed) and all programs can access the data, not just those with a processing option of GO. The database is opened for read-only processing.
UPD
The database is available for update as well as read processing in the IMS subsystem.
LRSDNT LRsdnt ALL, RESIDENT LCL Local runtime value of the resident option. Indicates whether the database DMB resides in local storage.
N
The DMB associated with the named database resource is not made resident in storage. If a database is defined as resident but encounters an error during IMS restart, N is set. The DMB is loaded at scheduling time.
Y
The DMB associated with the named database resource is made resident in storage at the next IMS restart. At the next IMS restart, IMS loads the DMB and initializes it. A resident database is accessed from local storage, which eliminates I/O to the ACBLIB.
LSTT LclStat STATUS LCL Local database status. All database status conditions that apply are returned. Database status can be one or more of the status conditions described in Table 4.
MBR MbrName N/A N/A IMSplex member that built the output line. The IMS identifier of the IMS that built the output. The IMS identifier is always returned.
MDLN LModelName MODEL N/A Model name. Name of the resource or descriptor that is used as a model to create this resource. DFSDSDB1 is the IMS descriptor name for databases.
MDLT LModelType MODEL N/A Model type, either RSC or DESC. RSC means that the resource was created by using another resource as a model. DESC means that the resource was created by using a descriptor as a model.
PART PartName N/A N/A HALDB partition name. The partition name is returned if there is one or more response lines for HALDB partitions in the output.
PGM LPgmName PGM LCL Program name, from the local IMS, that references the database.
RACC Acc DEFN GBL Access type information from the repository if SHOW(DEFN) is specified and the repository is enabled.
REPO Repo DEFN GBL Indicates whether the information about the line includes stored resource definitions.
Y
Indicates repository definitions.
(blank)
Indicates local definitions.
RRSDNT Rsdnt DEFN, RESIDENT GBL Resident value from the repository.
RSDNT LDRsdnt ALL, RESIDENT LCL Local deferred resident value that takes effect at the next IMS restart. A value of Y is shown if a database was defined as resident but could not be made resident at IMS restart time because no DMB existed for it in ACBLIB. This database can become resident during the next IMS restart only if there is a DMB for it in the ACBLIB.
RTMCR TimeCreate DEFN GBL Create time from the repository. This is the time the resource was first created in the repository.
RTMUP TimeUpdate DEFN GBL Update time from the repository. This is the time the resource was last updated in the repository.
SNDX SndxName SNDX LCL Name of the Fast Path secondary index database for a DEDB database.
STT Status STATUS, GLOBAL GBL Global status information from RM, which can be one of the following values:
ALLOC
Database has a global status of allocated.
LOCKED
Database is a global status of locked.
OPEN
Database has a global status of open.
STA
Database has a global status of started.
STOACC
Database has a global status of stopped for access.
STOSCHD
Database has a global status of stopped.
STOUPDS
Database has a global status of stopped for updates.
TMAC LTimeAccess TIMESTAMP LCL The time that the resource was last accessed. The last access time is retained across warm start, emergency restart, export, and import. The updating of the last access time is not logged. After a restart, the last access time reflects the time recorded in the restart checkpoint log records.

This access time stamp is obtained from the local IMS.

For a database resource, the following actions update the last access time:
  • Database is accessed by an application program.
  • CREATE command references the resource as the model.

For HALDB and DEDB databases, the last access time stamp is returned in the HALDB partition entry or the AREA entry. The last access time stamp is left blank in the HALDB master and the DEDB entries.

TMCR LTimeCreate TIMESTAMP LCL The time the resource was created. This is the result of a CREATE DB command, IMPORT command that creates the database, or IMS initialization. The create time is retained across warm start, emergency restart, EXPORT and IMPORT.

This create time stamp is obtained from the local IMS.

TMIM LTimeImport TIMESTAMP LCL The time that the resource was last imported, if applicable. The import time is retained across warm start and emergency restart.

This import time stamp is obtained from the local IMS.

TMUP LTimeUpdate TIMESTAMP LCL The last time the attributes of the runtime resource definition were updated as a result of the UPDATE DB, a type-1 command, or the IMPORT command. The update time is retained across warm start and emergency restart. The output value is obtained from the local IMS.
TYP Type N/A N/A The type of the database.
  • AREA - indicates the response line is for a DEDB area
  • blank - if database status is NOTINIT
  • DEDB - indicates the database is a DEDB
  • DHISNDX - indicates the database is a DEDB HISAM or SHISAM secondary index database
  • DL/I - indicates the database is a full function non-partitioned database
  • MSNR - indicates the database is an MSDB non-related database
  • MSRD - indicates the database is an MSDB-related dynamic database
  • MSRF - indicates the database is an MSDB-related fixed database
  • PART - indicates the database is a HALDB partition
  • PHDAM - indicates the database is the master of a partitioned HDAM database
  • PHIDAM - indicates the database is the master of a Partitioned HIDAM database
  • PSINDEX - indicates the database is the master of a partitioned secondary index database
VER Version VERSION LCL Version number of the database that is currently active on the IMS system.
WRK Work WORK  

Work is in progress for the database or one of its associated resources. Work in progress can be one of the following values:

AREA OPEN
Area associated with the FP DEDB is open.
DB STOP ACCESS IN PROGRESS
A /DBRECOVERY or UPDATE DB STOP(ACCESS) command to stop database access is in progress for a database. This takes the database offline.
DB STOP UPDATES IN PROGRESS
A /DBDUMP or UPDATE DB STOP(UPDATES) command to stop database updates is in progress for the database.
IN USE
Database is in use.
RECOVER CMD ACTIVE
A /RECOVER START command is in progress to recover one or more databases with the database recovery services.

QUERY DB status

The following table lists local area status conditions that can be returned when SHOW(STATUS) is specified.

Table 4. Local status conditions for QUERY DB
Status Meaning
ALLOCF Database has an allocation failure.
ALLOCS Database is allocated successfully.
BACKOUT Incomplete backout exists for the database that prevents the use of the database.
EEQE One or more extended error queue elements exist for the database.
IC Area image copy is active.
LOCK Database is locked locally.
NONE Database has no global status.
NOTINIT-xx-reason Database is not initialized and therefore cannot be used. NOTINIT is displayed in the format NOTINIT-xx-reason, where xx is the reason code that identifies the unique location in one module where this reason code is set. NOTINIT-00 indicates that the reason is unknown. Action: 1.

DFSDDIR MACRO defines each reason code that might be set in the database bad reason code (field DDIRBADR) and identifies the module that sets it. reason explains the reason code xx in abbreviated text format up to 13 characters.

NOTOPEN Area or database is not open.
OLR Database partition has an online reorganization in progress.

The QUERY DB STATUS(OLR) command displays the status of all databases with HALDB OLR in progress. Rate information is not returned. Instead, the rate information is returned on the QUERY OLREORG command output.

OPEN Area or database is open. Not maintained in the RM resource structure.
PRELOAD Area is defined to be preloaded.
PREOPEN Area is defined to be preopened.
QUIESCED Area or database is currently quiesced by a previous UPDATE DB START(QUIESCE) or UPDATE AREA START(QUIESCE) command.
QUIESCING Area or database is currently undergoing quiesce by a previous UPDATE DB START(QUIESCE) or UPDATE AREA START(QUIESCE) command.
RECALL Area or database recall is in progress.
RECOVINP Area or database recovery is in progress.
RECOVNEEDED Area needs recovery.
RNL Randomizer is not loaded for the DEDB database.
RREPL-ABEND If a database update is attempted by a nonreplication or unauthorized program, the program is terminated with user abend U3303.
RREPL-STATUS If a database update is attempted by a nonreplication or unauthorized program, a status code RR will be returned on any DL/I call that would have resulted in an update.
STOACC Database is stopped for access locally and is offline. The SHOW(STATUS) keyword on the QUERY DB command returns a status of STOACC for a DEDB. A status of STOACC indicates that the DEDB is stopped from further access because of a prior /DBR DB or UPDATE DB STOP(ACCESS) command.
STOPPED Area is stopped locally or globally.
STOSCHD Database is stopped locally.
STOUPDS Database is stopped for updates locally.
VSO Area is a VSO area.
Table 5. Reason information for NOTINIT-xx-reason status
Reason Meaning
ALIAS Alias name error.
BLDL BLDL miscellaneous error trying to build ACBLIB directory.
DBALTNOTCMPLT Database alter is not complete
DBINIT Database initialization failed.
DFLTCATALIASN Default catalog alias not used.
DMBINCOMPTBL DMB incompatibility.
DMBLEVEL The IMS release level at which this DMB is generated using ACBGEN does not match the IMS release level of this IMS. Perform a DBDGEN, PSBGEN, ACBGEN, and ACBLIB online change as needed to generate this DMB at the correct IMS release level. Action: 4.
DMBNAME DMB name missing.
DMBPOOL DMB pool shortage.
DMBPOOLDELETE DMB delete from DMB pool failed.
DUPLICATEAREA Duplicate area name found in this DEDB. Action: 4.
EOD EOD marker found before DMB.
FPDB The database is a Fast Path MSDB or DEDB that is defined in a non-Fast Path (FP=N) system. The database cannot be used.
FPRESTART A Fast Path error occurred during restart. Action: 1.
IOERROR An I/O error occurred when trying to close or open the CTL or SAS directory DCB, so this database has not been refreshed. Action: 2.
LOADCOMPRESS An error occurred loading the compression routine.
LOADRANDOMIZE An error occurred loading the randomizer routine.
MAXDBEXCEEDED Database exceeded maximum database limit of 32767. The database cannot be used. The database can be recovered at IMS cold start from RDDS auto import if the total number of databases in a local system is less than 32767.
MOLCCOMMIT Member OLC COMMIT MEMBER failed.
MOLCTKOVR DMU MOLC take over
MSDBCHANGE MSDB added or changed by online change, which is not allowed. Action: 4.
MSDBLEVEL MSDB level of MSDB in ACBLIB is incorrect. Action: 4.
NODB No database DDIR control block exists. Action: 5.
NODMB No database DMB exists in ACBLIB. For a Fast Path database, this could be an MSDB or a DEDB. Action: 2.
NOMSDB No MSDBs defined in system.
NOSHRINDXDDIR No shared index database DDIR control block. Action: 5.
NOSHRINDXDMB No DMB in ACBLIB for shared index. Action: 2.
NOTDMB Not a DMB. A PSB by the same name as the database is defined in ACBLIB instead of a DMB. If this resource should be a program, create the program with a CREATE PGM command. If this resource should be a database, perform a DBDGEN, PSBGEN, ACBGEN, and ACBLIB online change to define this resource as a DMB instead of a PSB. Action: 4.
PARTBUILD Partition build failed.
PSBINCOMPTBL PSB incompatibility.
REPOCHGLIST The database name exists in the change list in the IMSRSC repository for this IMS, and the change list is being processed or the change list processing failed because of an error. This database cannot be used, scheduled, updated, exported, or referenced as a model until it is successfully imported so that the runtime database definition and the stored definition in the repository are synchronized. Action: 6.
RSCNEEDOLC A Fast Path DEDB database is created with the IMPORT DEFN command. The DEDB database cannot be brought online for use with the IMPORT DEFN command. Perform ACBLIB online change to bring Fast Path DEDB database online. Action 2.
RSCNEEDSTADB A full-function HALDB is created with the IMPORT DEFN command. HALDB master is created. To create HALDB partition databases, issue either the /START DB command or the UPDATE DB command on the HALDB master database.
SEGMENTNUM Segment number error. ACBGEN error, more than 127 segments. Action: 4.
WRONGDMB Wrong DMB.
WRONGPSB Wrong PSB.
Note: Actions that can be taken to initialize the database are:
  1. Call IBM®.
  2. Perform ACBLIB online change or import to add the DMB to ACBLIB or directory.
  3. Perform ACBLIB online change or import to add the PSB to ACBLIB or directory.
  4. Perform ACBLIB online change or import to correct PSBs or DMBs.
  5. Perform MODBLKS online change or issue the CREATE DB command to create the database.
  6. If IMS change list processing failed and message DFS4411E was issued, correct the problem and take one of the following actions:
    • Shut down IMS and restart it in order to try processing the change list again.
    • Issue the IMPORT DEFN SOURCE(REPO) NAME(dbname) TYPE(DB) command to import the database, where dbname is the database name.

How the SHOW keyword on QUERY DB determines the type of output

Some examples of how the SHOW keyword determines the type of output returned on the QUERY DB command are provided in the following table.
Table 6. How the SHOW keyword on QUERY DB determines the type of output
Form of SHOW keyword used Type of output returned
SHOW(LOCAL) Only those output fields that are local to an IMS system. SHOW(ALL,LOCAL) provides the same output.
SHOW(GLOBAL) Only those output fields that are globally maintained, such as data maintained by RM. SHOW(ALL,GLOBAL) provides the same output.
SHOW(ALL) All of the output fields for those fields that have both local and global data. Both values are returned in the output.
SHOW(STATUS,GLOBAL) Only global STATUS values.
SHOW(STATUS,LOCAL) Only local STATUS values.
SHOW(STATUS) Both local and global STATUS values.
SHOW(ALL,GLOBAL) Only those output fields that are globally maintained, such as data maintained by RM. SHOW(GLOBAL) provides the same output.
SHOW(ALL,LOCAL) Only those output fields that are local to an IMS system. SHOW(LOCAL) provides the same output.
SHOW(DEFN) The runtime definitions from IMS and the stored definitions from the repository are returned.
SHOW(DEFN,IMSID) The runtime definitions from IMS and the stored definitions from the repository are returned. A response line is returned along with the definitional attribute for each IMS that has the resource defined in the repository.
SHOW(DEFN,LOCAL) The runtime definitions from IMS are returned.
SHOW(DEFN,GLOBAL) The stored definitions from the repository are returned.
SHOW(DEFN,IMSID,LOCAL) The runtime definitions from IMS are returned. SHOW(DEFN,IMSID,LOCAL) is the same as SHOW(DEFN,LOCAL).
SHOW(DEFN,IMSID,GLOBAL) The stored definitions from the repository are returned. A response line is returned along with the definitional attribute for each IMS that has the resource defined in the repository.
SHOW(EXPORTNEEDED) Only those runtime resources whose definitions has not been exported to the repository.

Return, reason, and completion codes

An IMS return and reason code is returned to OM by the QUERY DB command. The OM return and reason codes that might be returned as a result of the QUERY DB command are standard for all commands entered through the OM API.

The following table includes the return and reason codes and a brief explanation of the codes. The return or reason code returned for the command might also indicate an error from a CSL request.

Table 7. Return and reason codes for the QUERY DB command
Return code Reason code Meaning
X'00000000' X'00000000' The QUERY DB command completed successfully.
X'00000004' X'00001010' No resources were found to be returned. The resource names specified might be invalid, or:
  • There were no resources that match the filter specified.
  • There were no resources that had work to display for the SHOW(WORK) specified.
  • If SHOW(EXPORTNEEDED) was specified, no resources needed to be exported to the IMSRSC repository.
X'00000008' X'00002004' Invalid command keyword or invalid command keyword combination.
X'00000008' X'00002014' The QUERY DB command is not processed because an invalid character is found in the database name parameter.
X'00000008' X'00002040' More than one filter or keyword value is specified on the QUERY DB command. Either more than one keyword or an invalid combination of filters was specified. Check the input command and reenter the correct combinations.
X'0000000C' X'00003000' The QUERY DB command was successful for some resources but failed for others. The completion code indicates the reason for the error with the resource name. The completion codes that can be returned by the QUERY DB command are listed in the QUERY DB completion code table.
X'0000000C' X'00003004' The QUERY DB command was not successful for any of the resource names specified. The completion code indicates the reason for the error with the resource name. The completion codes that can be returned by the QUERY DB command are listed in the QUERY DB completion code table.
X'00000010' X'00004004' No CQS address space.
X'00000010' X'00004018' No resource structure. Or, the resource structure is not available.
X'00000010' X'00004100' Resource structure is full.
X'00000010' X'00004104' No RM address space.
X'00000010' X'00004108' No SCI address space.
X'00000010' X'00004300' Command is not allowed because online change for MODBLKS is enabled (DFSDFxxx or DFSCGxxx is defined with MODBLKS=OLC, or MODBLKS is not defined).
X'00000010' X'00004500' IMS is not enabled to use the repository.
X'00000010' X'00004501' RM is not enabled to use the repository.
X'00000010' X'00004502' Repository is not available.
X'00000010' X'00004503' Repository is stopped.
X'00000010' X'00004504' Repository spare recovery is in progress.
X'00000010' X'00004505' No IMS resource list exists, or no resources for the resource type exist in the IMS resource list.
X'00000010' X'00004507' Repository access was denied.
X'00000010' X'00004508' Repository maximum put length exceeded.
X'00000010' X'00004509' RM data version is lower than the IMS data version.
X'00000010' X'0000450A' Repository Server (RS) is being shut down.
X'00000010' X'0000450B' RS is not available.
X'00000010' X'0000450C' RS is busy.
X'00000010' X'0000450D' RM failed to define some of the internal fields related to the IMSRSC repository.
X'00000014' X'00005004' The QUERY DB command processing terminated as a DFSOCMD response buffer could not be obtained.
X'00000014' X'0000501C' IMODULE GETMAIN error.
X'00000014' X'00005100' RM request error.
X'00000014' X'00005104' CQS error.
X'00000014' X'00005108' SCI request error.
X'00000014' X'00005110' Repository error.
X'00000014' X'0000551C' A request to view the data in the repository was rejected because a corrupted resource list was detected. The QUERY DB command is rejected because the resource list is unusable. Contact IBM Software Support. Send in the output from the command in error, and a dump of the local RM address space where the command executed or the dump of all RM address spaces in the IMSplex. Also send a copy of the IMSRSC repository RID and RMD data sets.
X'00000014' X'00005FFF' The QUERY DB command processing terminated because of an internal error.

The following table includes an explanation of the completion codes. Errors unique to the processing of QUERY DB command are returned as completion codes. A completion code is returned for each action against an individual resource.

Table 8. Completion codes for the QUERY DB command
Completion code Completion code text Meaning
0   The QUERY DB command completed successfully for the resource.
10 RESOURCE NOT FOUND The resource name is unknown to the client that is processing the request. The resource name might have been typed in error or the resource might not be active at this time. Confirm the correct spelling of the resource name specified on the command.
193 NOT A DEDB The SHOW(SNDX) keyword was specified, but the database resource is not a DEDB.
194 NO SECONDARY INDEX DEFINED The SHOW(SNDX) keyword was specified, but the database resource has no Fast Path secondary index database defined.
195 INVALID DB ACCESS TYPE Database versioning for this database access type is not supported.

Examples

The following are examples of the QUERY DB command:

Example 1 for QUERY DB command

TSO SPOC input:
QUERY DB NAME(BANKATMS,DEDBJN21,DBHDOK01) SHOW(ALL) 
TSO SPOC output:
(screen 1)
DBName   AreaName MbrName    CC TYPE     LAcc LRsdnt LclStat                 
BANKATMS          IMS1        0          EXCL N      NOTINIT-1E-NODMB,NOTOPEN
DBHDOK01          IMS1        0 DL/I     UPD  N      NOTOPEN                 
DEDBJN21          IMS1        0 DEDB     UPD  Y      NOTOPEN                 
DEDBJN21 DB21AR0  IMS1        0 AREA                 NOTOPEN                 
DEDBJN21 DB21AR1  IMS1        0 AREA                 NOTOPEN                 
DEDBJN21 DB21AR10 IMS1        0 AREA                 NOTOPEN                 
DEDBJN21 DB21AR11 IMS1        0 AREA                 NOTOPEN                 
DEDBJN21 DB21AR2  IMS1        0 AREA                 NOTOPEN                 
DEDBJN21 DB21AR3  IMS1        0 AREA                 NOTOPEN                 
DEDBJN21 DB21AR4  IMS1        0 AREA                 NOTOPEN                 
DEDBJN21 DB21AR5  IMS1        0 AREA                 NOTOPEN                 
DEDBJN21 DB21AR6  IMS1        0 AREA                 NOTOPEN                 
DEDBJN21 DB21AR7  IMS1        0 AREA                 NOTOPEN                 
DEDBJN21 DB21AR8  IMS1        0 AREA                 NOTOPEN                 
DEDBJN21 DB21AR9  IMS1        0 AREA                 NOTOPEN                 

(scrolled right to screen 2)
DBName   AreaName MbrName  LModelName LModelType LTimeCreate           
BANKATMS          IMS1                           2011.181 10:22:15.10            
DBHDOK01          IMS1                           2011.181 10:22:15.10            
DEDBJN21          IMS1                           2011.181 10:22:15.10            
DEDBJN21 DB21AR0  IMS1                                                          
DEDBJN21 DB21AR1  IMS1                                                          
DEDBJN21 DB21AR10 IMS1                                                          
DEDBJN21 DB21AR11 IMS1                                                          
DEDBJN21 DB21AR2  IMS1                                                          
DEDBJN21 DB21AR3  IMS1                                                          
DEDBJN21 DB21AR4  IMS1                                                          
DEDBJN21 DB21AR5  IMS1                                                          
DEDBJN21 DB21AR6  IMS1                                                          
DEDBJN21 DB21AR7  IMS1                                                          
DEDBJN21 DB21AR8  IMS1                                                          
DEDBJN21 DB21AR9  IMS1                                                          

(scrolled right to screen 3)
DBName   AreaName MbrName  LTimeUpdate LTimeAccess          LTimeImport         
BANKATMS          IMS1                                                        
DBHDOK01          IMS1                                                        
DEDBJN21          IMS1                                                        
DEDBJN21 DB21AR0  IMS1                                                        
DEDBJN21 DB21AR1  IMS1                                                        
DEDBJN21 DB21AR10 IMS1                                                        
DEDBJN21 DB21AR11 IMS1                                                        
DEDBJN21 DB21AR2  IMS1                                                        
DEDBJN21 DB21AR3  IMS1                                                        
DEDBJN21 DB21AR4  IMS1                                                        
DEDBJN21 DB21AR5  IMS1                                                        
DEDBJN21 DB21AR6  IMS1                                                        
DEDBJN21 DB21AR7  IMS1                                                        
DEDBJN21 DB21AR8  IMS1                                                        
DEDBJN21 DB21AR9  IMS1                                                        

(scrolled right to screen 4)
DBName   AreaName MbrName  LDefnType  
BANKATMS          IMS1     MODBLKS    
DBHDOK01          IMS1     MODBLKS    
DEDBJN21          IMS1     MODBLKS    
DEDBJN21 DB21AR0  IMS1                                                          
DEDBJN21 DB21AR1  IMS1                                                          
DEDBJN21 DB21AR10 IMS1                                                          
DEDBJN21 DB21AR11 IMS1                                                          
DEDBJN21 DB21AR2  IMS1                                                          
DEDBJN21 DB21AR3  IMS1                                                          
DEDBJN21 DB21AR4  IMS1                                                          
DEDBJN21 DB21AR5  IMS1                                                          
DEDBJN21 DB21AR6  IMS1                                                          
DEDBJN21 DB21AR7  IMS1                                                          
DEDBJN21 DB21AR8  IMS1                                                          
DEDBJN21 DB21AR9  IMS1                                                          
OM API input:
CMD(QUERY DB NAME(BANKATMS,DEDBJN21,DBHDOK01) SHOW(ALL)  )
OM API output:
<imsout>                                       
<ctl>                                          
<omname>OM1OM   </omname>                      
<omvsn>1.5.0</omvsn>                           
<xmlvsn>20  </xmlvsn>                          
<statime>2011.181 18:44:59.208162</statime>    
<stotime>2011.181 18:44:59.209123</stotime>    
<staseq>C80029508EDE234E</staseq>                                              
<stoseq>C80029508F1A3B8E</stoseq>                                              
<rqsttkn1>USRT005 10114459</rqsttkn1>                                          
<rc>00000000</rc>                                                              
<rsn>00000000</rsn>                                                            
</ctl>                                                                         
<cmd>                                                                          
<master>IMS1    </master>                                                      
<userid>USRT005 </userid>                                                      
<verb>QRY </verb>                                                              
<kwd>DB              </kwd>                                                    
<input>QUERY DB NAME(BANKATMS,DEDBJN21,DBHDOK01) SHOW(ALL) </input>            
</cmd>                                                                         
<cmdrsphdr>                                                                    
<hdr slbl="DB" llbl="DBName" scope="LCL" sort="a" key="1" scroll="no"          
 len="8" dtype="CHAR" align="left" skipb="no" />                               
<hdr slbl="AREA" llbl="AreaName" scope="LCL" sort="a" key="4"                  
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />                  
<hdr slbl="PART" llbl="PartName" scope="LCL" sort="a" key="5"                  
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />                  
<hdr slbl="MBR" llbl="MbrName" scope="LCL" sort="a" key="3" scroll="no"        
 len="8" dtype="CHAR" align="left" skipb="no" />                               
<hdr slbl="CC" llbl="CC" scope="LCL" sort="n" key="0" scroll="yes"             
len="4" dtype="INT" align="right" skipb="no" />                          
<hdr slbl="CCTXT" llbl="CCText" scope="LCL" sort="n" key="0"              
 scroll="yes" len="*" dtype="CHAR" align="left" skipb="yes" />            
<hdr slbl="TYP" llbl="TYPE" scope="LCL" sort="n" key="0" scroll="yes"     
 len="8" dtype="CHAR" align="left" skipb="no" />                          
<hdr slbl="LACC" llbl="LAcc" scope="LCL" sort="n" key="0" scroll="yes"    
 len="*" dtype="CHAR" align="left" skipb="no" />                          
<hdr slbl="RSDNT" llbl="LDRsdnt" scope="LCL" sort="n" key="0"           
 scroll="yes" len="1" dtype="CHAR" align="left" skipb="yes" />            
<hdr slbl="LRSDNT" llbl="LRsdnt" scope="LCL" sort="n" key="0"             
 scroll="yes" len="1" dtype="CHAR" align="left" />                        
<hdr slbl="LSTT" llbl="LclStat" scope="LCL" sort="n" key="0"              
 scroll="yes" len="*" dtype="CHAR" align="left" skipb="no" />             
<hdr slbl="MDLN" llbl="LModelName" scope="LCL" sort="n" key="0"           
 scroll="yes" len="8" dtype="CHAR" align="left" />                        
<hdr slbl="MDLT" llbl="LModelType" scope="LCL" sort="n" key="0"           
 scroll="yes" len="4" dtype="CHAR" align="left" />                        
<hdr slbl="TMCR" llbl="LTimeCreate" scope="LCL" sort="n" key="0"          
 scroll="yes" len="20" dtype="CHAR" align="left" />                       
<hdr slbl="TMUP" llbl="LTimeUpdate" scope="LCL" sort="n" key="0"          
 scroll="yes" len="20" dtype="CHAR" skipb="yes" align="left" />           
<hdr slbl="TMAC" llbl="LTimeAccess" scope="LCL" sort="n" key="0"          
 scroll="yes" len="20" dtype="CHAR" align="left" />                       
<hdr slbl="TMIM" llbl="LTimeImport" scope="LCL" sort="n" key="0"         
 scroll="yes" len="20" dtype="CHAR" skipb="yes" align="left" />          
<hdr slbl="DFNT" llbl="LDefnType" scope="LCL" sort="n" key="0"           
 scroll="yes" len="8" dtype="CHAR" align="left" />                       
</cmdrsphdr>                                                             
<cmdrspdata>                                                             
<rsp>DB(BANKATMS) MBR(IMS1    ) CC(   0) TYP(        ) LACC(EXCL)        
 LSTT(NOTINIT-1E-NODMB,NOTOPEN) DFNT(MODBLKS) LRSDNT(N) TMCR(2011.181    
 10:22:15.10) TMUP(                    ) TMIM(                    )      
 TMAC(                    ) </rsp>                                       
<rsp>DB(DEDBJN21) MBR(IMS1    ) CC(   0) TYP(DEDB    ) LACC(UPD)         
 LSTT(NOTOPEN) DFNT(MODBLKS) LRSDNT(Y) TMCR(2011.181 10:22:15.10) TMUP(  
                    ) TMIM(                    ) </rsp>                  
<rsp>DB(DEDBJN21) AREA(DB21AR0 ) MBR(IMS1    ) CC(   0) TYP(AREA    )    
 LSTT(NOTOPEN) TMAC(                    ) </rsp>                         
<rsp>DB(DEDBJN21) AREA(DB21AR1 ) MBR(IMS1    ) CC(   0) TYP(AREA    )    
 LSTT(NOTOPEN) TMAC(                    ) </rsp>                         
<rsp>DB(DEDBJN21) AREA(DB21AR2 ) MBR(IMS1    ) CC(   0) TYP(AREA    )    
 LSTT(NOTOPEN) TMAC(                    ) </rsp>                         
<rsp>DB(DEDBJN21) AREA(DB21AR3 ) MBR(IMS1    ) CC(   0) TYP(AREA    )    
 LSTT(NOTOPEN) TMAC(                    ) </rsp>                         
<rsp>DB(DEDBJN21) AREA(DB21AR4 ) MBR(IMS1    ) CC(   0) TYP(AREA    )    
 LSTT(NOTOPEN) TMAC(                    ) </rsp>                         
<rsp>DB(DEDBJN21) AREA(DB21AR5 ) MBR(IMS1    ) CC(   0) TYP(AREA    )          
 LSTT(NOTOPEN) TMAC(                    ) </rsp>                               
<rsp>DB(DEDBJN21) AREA(DB21AR6 ) MBR(IMS1    ) CC(   0) TYP(AREA    )          
 LSTT(NOTOPEN) TMAC(                    ) </rsp>                               
<rsp>DB(DEDBJN21) AREA(DB21AR7 ) MBR(IMS1    ) CC(   0) TYP(AREA    )          
 LSTT(NOTOPEN) TMAC(                    ) </rsp>                               
<rsp>DB(DEDBJN21) AREA(DB21AR8 ) MBR(IMS1    ) CC(   0) TYP(AREA    )          
 LSTT(NOTOPEN) TMAC(                    ) </rsp>                               
<rsp>DB(DEDBJN21) AREA(DB21AR9 ) MBR(IMS1    ) CC(   0) TYP(AREA    )          
 LSTT(NOTOPEN) TMAC(                    ) </rsp>                               
<rsp>DB(DEDBJN21) AREA(DB21AR10) MBR(IMS1    ) CC(   0) TYP(AREA    )          
 LSTT(NOTOPEN) TMAC(                    ) </rsp>                               
<rsp>DB(DEDBJN21) AREA(DB21AR11) MBR(IMS1    ) CC(   0) TYP(AREA    )          
 LSTT(NOTOPEN) TMAC(                    ) </rsp>                               
<rsp>DB(DBHDOK01) MBR(IMS1    ) CC(   0) TYP(DL/I    ) LACC(UPD)               
 LSTT(NOTOPEN) DFNT(MODBLKS) LRSDNT(N) TMCR(2011.181 10:22:15.10) TMUP(        
                    ) TMIM(                    ) TMAC(                         
   ) </rsp>                                                                    
</cmdrspdata>                                                                  
</imsout>            

Explanation: The QUERY DB command is specified with the SHOW keyword to display the resident attribute and the database status. All definition and status information is returned for databases BANKATMS, DEDBJN21, and DBHDOK01 from IMS1. All of the database output fields do not fit on one screen, so you must scroll to the right for additional output fields. The database name, area name, and member name that built the line of output are displayed on every screen. Database BANKATMS has a status of NOTINIT-1E-NODMB, which means there is no DMB in ACBLIB for BANKATMS and BANKATMS cannot be used. DEDBJN21 is a DEDB and the area information is also returned, along with the DEDB information. No model information is returned because the database was loaded from MODBLKS and not created from a model. Time stamps for the DEDB areas are not maintained and so they are not returned.

Example 2 for QUERY DB command

TSO SPOC input:
QUERY DB NAME(BE3PARTS,CUSTDB) SHOW(PGM)
TSO SPOC output:
DBName   MbrName    CC TYPE     LPgmName               
BE3PARTS IMS1        0 DL/I     PE4CODEL               
BE3PARTS IMS1        0 DL/I     PE4COINQ               
BE3PARTS IMS1        0 DL/I     PE4CORDR               
BE3PARTS IMS1        0 DL/I     PE4CPINV               
BE3PARTS IMS1        0 DL/I     PE4CPPUR               
CUSTDB   IMS1        0 DEDB     PSBBA                  
CUSTDB   IMS1        0 DEDB     PSBNO                  
CUSTDB   IMS1        0 DEDB     PSBOS                  
CUSTDB   IMS1        0 DEDB     PSBPA                    
OM API input:
CMD(QUERY DB NAME(BE3PARTS,CUSTDB) SHOW(PGM))
OM API output:
<imsout>                                   
<ctl>                                      
<omname>OM1OM   </omname>                  
<omvsn>1.5.0</omvsn>                       
<xmlvsn>20  </xmlvsn>                      
<statime>2011.181 18:53:06.988049</statime>
<stotime>2011.181 18:53:06.989553</stotime>
<staseq>C8002B21BDC11F98</staseq>                                           
<stoseq>C8002B21BE1F14D8</stoseq>                                           
<rqsttkn1>USRT005 10115306</rqsttkn1>                                       
<rc>00000000</rc>                                                           
<rsn>00000000</rsn>                                                         
</ctl>                                                                      
<cmd>                                                                       
<master>IMS1    </master>                                                   
<userid>USRT005 </userid>                                                   
<verb>QRY </verb>                                                           
<kwd>DB              </kwd>                                                 
<input>QUERY DB NAME(BE3PARTS,CUSTDB) SHOW(PGM) </input>                    
</cmd>                                                                      
<cmdrsphdr>                                                                 
<hdr slbl="DB" llbl="DBName" scope="LCL" sort="a" key="1" scroll="no"       
 len="8" dtype="CHAR" align="left" skipb="no" />                            
<hdr slbl="AREA" llbl="AreaName" scope="LCL" sort="a" key="4"               
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />               
<hdr slbl="PART" llbl="PartName" scope="LCL" sort="a" key="5"               
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />               
<hdr slbl="MBR" llbl="MbrName" scope="LCL" sort="a" key="3" scroll="no"     
 len="8" dtype="CHAR" align="left" skipb="no" />                            
<hdr slbl="CC" llbl="CC" scope="LCL" sort="n" key="0" scroll="yes"          
len="4" dtype="INT" align="right" skipb="no" />                       
<hdr slbl="CCTXT" llbl="CCText" scope="LCL" sort="n" key="0"           
 scroll="yes" len="*" dtype="CHAR" align="left" skipb="yes" />         
<hdr slbl="TYP" llbl="TYPE" scope="LCL" sort="n" key="0" scroll="yes"  
 len="8" dtype="CHAR" align="left" skipb="no" />                       
<hdr slbl="PGM" llbl="LPgmName" scope="LCL" sort="n" key="0"           
 scroll="yes" len="8" dtype="CHAR" align="left" skipb="no" />          
</cmdrsphdr>                                                           
<cmdrspdata>                                                           
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) TYP(DL/I    ) PGM(PE4CODEL)   
</rsp>                                                                 
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) TYP(DL/I    ) PGM(PE4COINQ)   
</rsp>                                                                 
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) TYP(DL/I    ) PGM(PE4CORDR)   
</rsp>                                                                 
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) TYP(DL/I    ) PGM(PE4CPINV)   
</rsp>                                                                 
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) TYP(DL/I    ) PGM(PE4CPPUR)   
</rsp>                                                                 
<rsp>DB(CUSTDB  ) MBR(IMS1    ) CC(   0) TYP(DEDB    ) PGM(PSBBA   )   
</rsp>                                                                 
<rsp>DB(CUSTDB  ) MBR(IMS1    ) CC(   0) TYP(DEDB    ) PGM(PSBNO   )   
</rsp>                                                                 
<rsp>DB(CUSTDB  ) MBR(IMS1    ) CC(   0) TYP(DEDB    ) PGM(PSBOS   )    
</rsp>                                                                  
<rsp>DB(CUSTDB  ) MBR(IMS1    ) CC(   0) TYP(DEDB    ) PGM(PSBPA   )    
</rsp>                                                                  
</cmdrspdata>                                                           
</imsout>

Explanation: Database BE3PARTS has programs BE3PARTS, PE4COINQ, and PE4CORDR referring to it. Database CUSTDB has programs CUSTDB, PSBOS, and PSBPA referring to it.

Example 3 for QUERY DB command

TSO SPOC input:
QRY DB NAME(DEDBRN01,DX41M401,DB000001) SHOW(RESIDENT,STATUS)     
TSO SPOC output:
DBName   AreaName MbrName    CC TYPE     LDRsdnt LRsdnt LclStat                 
DB000001          IMS1        0          Y       N      NOTINIT-34-NODMB,NOTOPEN
DEDBRN01          IMS1        0 DEDB             Y      NOTOPEN                 
DEDBRN01 DEDB01D1 IMS1        0 AREA                    NOTOPEN                 
DX41M401          IMS1        0 DL/I             N      NOTOPEN        
         
OM API input:
CMD(QRY DB NAME(DEDBRN01,DX41M401,DB000001) SHOW(RESIDENT,STATUS)     )
OM API output:
<imsout>                                    
<ctl>                                       
<omname>OM1OM   </omname>                   
<omvsn>1.5.0</omvsn>                        
<xmlvsn>20  </xmlvsn>                       
<statime>2011.181 18:59:00.325804</statime> 
<stotime>2011.181 18:59:00.326647</stotime>
<staseq>C8002C72B5DAC610</staseq>                                        
<stoseq>C8002C72B60F7B50</stoseq>                                        
<rqsttkn1>USRT005 10115900</rqsttkn1>                                    
<rc>00000000</rc>                                                        
<rsn>00000000</rsn>                                                      
</ctl>                                                                   
<cmd>                                                                    
<master>IMS1    </master>                                                
<userid>USRT005 </userid>                                                
<verb>QRY </verb>                                                        
<kwd>DB              </kwd>                                              
<input>QRY DB NAME(DEDBRN01,DX41M401,DB000001) SHOW(RESIDENT,STATUS)     
</input>                                                                 
</cmd>                                                                   
<cmdrsphdr>                                                              
<hdr slbl="DB" llbl="DBName" scope="LCL" sort="a" key="1" scroll="no"    
 len="8" dtype="CHAR" align="left" skipb="no" />                         
<hdr slbl="AREA" llbl="AreaName" scope="LCL" sort="a" key="4"            
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />            
<hdr slbl="PART" llbl="PartName" scope="LCL" sort="a" key="5"            
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />            
<hdr slbl="MBR" llbl="MbrName" scope="LCL" sort="a" key="3" scroll="no"  
 len="8" dtype="CHAR" align="left" skipb="no" />        
<hdr slbl="CC" llbl="CC" scope="LCL" sort="n" key="0" scroll="yes"        
 len="4" dtype="INT" align="right" skipb="no" />                          
<hdr slbl="CCTXT" llbl="CCText" scope="LCL" sort="n" key="0"              
 scroll="yes" len="*" dtype="CHAR" align="left" skipb="yes" />            
<hdr slbl="TYP" llbl="TYPE" scope="LCL" sort="n" key="0" scroll="yes"     
 len="8" dtype="CHAR" align="left" skipb="no" />                          
<hdr slbl="RSDNT" llbl="LDRsdnt" scope="LCL" sort="n" key="0"           
 scroll="yes" len="1" dtype="CHAR" align="left" skipb="yes" />            
<hdr slbl="LRSDNT" llbl="LRsdnt" scope="LCL" sort="n" key="0"             
 scroll="yes" len="1" dtype="CHAR" align="left" />                        
<hdr slbl="LSTT" llbl="LclStat" scope="LCL" sort="n" key="0"              
 scroll="yes" len="*" dtype="CHAR" align="left" skipb="no" />             
</cmdrsphdr>                                                              
<cmdrspdata>                                                              
<rsp>DB(DEDBRN01) MBR(IMS1    ) CC(   0) TYP(DEDB    ) LSTT(NOTOPEN)      
 LRSDNT(Y) </rsp>                                                         
<rsp>DB(DEDBRN01) AREA(DEDB01D1) MBR(IMS1    ) CC(   0) TYP(AREA    )     
 LSTT(NOTOPEN) </rsp>                                                     
<rsp>DB(DX41M401) MBR(IMS1    ) CC(   0) TYP(DL/I    ) LSTT(NOTOPEN)      
 LRSDNT(N) </rsp>                                                         
<rsp>DB(DB000001) MBR(IMS1    ) CC(   0) TYP(        )                    
 LSTT(NOTINIT-34-NODMB,NOTOPEN) RSDNT(Y) LRSDNT(N) </rsp>               
</cmdrspdata>                                                             
</imsout>                   

Explanation: The QUERY DB command is specified with SHOW keywords to display the resident attribute and the database status for a few different types of databases. DEDBRN01 is a DEDB. DEDBs are always resident and defined with RESIDENT(Y). DX41M401 is a DLI database. DX41M401 is defined as Resident(N) and its local runtime resident value is RESIDENT(N). Because Rsdnt and LRsdnt values of database DX41M401 are the same, only LRsdnt value is displayed. DB000001 is a new database created by a CREATE DB command. DB000001 shows a status of NOTINIT-34-NODMB, which means it has no DMB defined in ACBLIB and cannot be used. Since there is no DMB, the database type is shown as blanks, because IMS does not know what type of database DB000001 is intended to be. DB000001 is defined as RESIDENT(Y), but because the resident option will not take effect until the next IMS restart, the local resident value is N. If all of the databases being displayed have a LRsdnt (Local Resident) value that is the same as the Rsdnt (Definitional Resident) value, the QRY DB output displays the LRsdnt header and value, but not the Rsdnt header and value. Since database DB000001 is defined with RESIDENT(Y) but its local runtime resident value is N, both Rsdnt and LRsdnt columns are displayed in the QUERY DB output.

Example 4 for QUERY DB command

TSO SPOC input:
QRY DB NAME(*) SHOW(STATUS) STATUS(QUIESCING) 
TSO SPOC output:
DBName    MbrName    CC TYPE     LclStat              
DBXYZ     IM03        0 DLI      ALLOCS,OPEN,QUIESCING
KCIRDBAZ  IM03        0 DLI      ALLOCS,OPEN,QUIESCING
GONLXYZ   IM03        0 DLI      ALLOCS,OPEN,QUIESCING

Explanation: This example is a query of the databases that have a status of QUIESCING.

Example 5 for QUERY DB command

TSO SPOC input:
QUERY DB NAME(DEDBJ001) SHOW(ACCTYPE,STATUS)
TSO SPOC output:
DBName   AreaName MbrName    CC TYPE     LAcc LclStat
DEDBJ001          IMS1        0 DEDB     UPD  OPEN
DEDBJ001 D0010001 IMS1        0 AREA     READ OPEN,PREOPEN
DEDBJ001 D0010002 IMS1        0 AREA     BRWS OPEN,PREOPEN
DEDBJ001 D0010003 IMS1        0 AREA          OPEN,PREOPEN
DEDBJ001 D0010004 IMS1        0 AREA     UPD  OPEN,PREOPEN
DEDBJ001 D0010005 IMS1        0 AREA          OPEN,PREOPEN
OM API input:
CMD(QUERY DB NAME(DEDBJ001) SHOW(ACCTYPE,STATUS))
OM API output:
<imsout>                                                                    
 <ctl>                                                                       
 <omname>OM1OM   </omname>                                                   
 <omvsn>1.5.0</omvsn>                                                        
 <xmlvsn>20  </xmlvsn>                                                       
 <statime>2011.188 23:38:28.734794</statime>                                 
 <stotime>2011.188 23:38:28.735444</stotime>
<staseq>C80937F889B4AC94</staseq>                                            
<stoseq>C80937F889DD4554</stoseq>                                            
<rqsttkn1>USRT011 10163828</rqsttkn1>                                        
<rc>00000000</rc>                                                            
<rsn>00000000</rsn>                                                          
</ctl>                                                                       
<cmd>                                                                        
<master>IMS1    </master>                                                    
<userid>USRT011 </userid>                                                    
<verb>QRY </verb>                                                            
<kwd>DB              </kwd>     
<input>QRY DB NAME(DEDBJ001) SHOW(ACCTYPE,STATUS) </input>                   
</cmd>                                                                       
<cmdrsphdr>                                                                  
<hdr slbl="DB" llbl="DBName" scope="LCL" sort="a" key="1" scroll="no"        
 len="8" dtype="CHAR" align="left" skipb="no" />                             
<hdr slbl="AREA" llbl="AreaName" scope="LCL" sort="a" key="4"                
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />                
<hdr slbl="PART" llbl="PartName" scope="LCL" sort="a" key="5"                
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />                
<hdr slbl="MBR" llbl="MbrName" scope="LCL" sort="a" key="3" scroll="no"      
 len="8" dtype="CHAR" align="left" skipb="no" />                             
<hdr slbl="CC" llbl="CC" scope="LCL" sort="n" key="0" scroll="yes"
len="4" dtype="INT" align="right" skipb="no" />                             
<hdr slbl="CCTXT" llbl="CCText" scope="LCL" sort="n" key="0"                 
 scroll="yes" len="*" dtype="CHAR" align="left" skipb="yes" />               
<hdr slbl="TYP" llbl="TYPE" scope="LCL" sort="n" key="0" scroll="yes"        
 len="8" dtype="CHAR" align="left" skipb="no" />                             
<hdr slbl="LACC" llbl="LAcc" scope="LCL" sort="n" key="0" scroll="yes"       
 len="*" dtype="CHAR" align="left" skipb="no" />                             
<hdr slbl="LSTT" llbl="LclStat" scope="LCL" sort="n" key="0"                 
 scroll="yes" len="*" dtype="CHAR" align="left" skipb="no" />                
</cmdrsphdr>                                                                
<cmdrspdata>
<rsp>DB(DEDBJ001) MBR(IMS1    ) CC(   0) TYP(DEDB    ) LACC(UPD)            
 LSTT(OPEN) </rsp>                        
<rsp>DB(DEDBJ001) AREA(D0010001 ) MBR(IMS1    ) CC(   0) TYP(AREA    )       
 LACC(READ)LSTT(OPEN,PREOPEN) </rsp>                       
<rsp>DB(DEDBJ001) AREA(D0010002 ) MBR(IMS1    ) CC(   0) TYP(AREA    )       
 LACC(BRWS) LSTT(OPEN,PREOPEN) </rsp>            
<rsp>DB(DEDBJ001) AREA(D0010003 ) MBR(IMS1    ) CC(   0) TYP(AREA    )       
 LSTT(OPEN,PREOPEN) </rsp>                       
<rsp>DB(DEDBJ001) AREA(D0010004 ) MBR(IMS1    ) CC(   0) TYP(AREA    )       
 LACC(UPD)LSTT(OPEN,PREOPEN) </rsp>                    
<rsp>DB(DEDBJ001) AREA(D0010005 ) MBR(IMS1    ) CC(   0) TYP(AREA    )       
 LSTT(OPEN,PREOPEN) </rsp> 
</cmdrspdata>                                                                
</imsout>                      

Explanation: DEDB DEDBJ001 has database access of UPD (update). Area access for areas D0010001, D00010002, and D0010004 has been changed with the command; that is, area D0010001 has area access of READ (read), area D0010002 has area access of BRWS (read only), and area D0010004 has area access of UPD (update). Areas D0010003 and D0010005 inherit DEDBJ001 database access of UPD (update).

Example 6 for QUERY DB command

TSO SPOC input:
QUERY DB NAME(BANKATMS,DEDBJN21,BE3PARTS,NEWDB1) SHOW(DEFN,ACCTYPE,RESIDENT) 
TSO SPOC output:
(screen 1)
DBName   MbrName    CC CCText                      Repo IMSid    TYPE       
BANKATMS IMS1        0                             Y                       
BANKATMS IMS1        0                                  IMS1                  
BANKATMS IMS2        0                                  IMS2                  
BANKATMS IMS3        0                                  IMS3                  
BE3PARTS IMS1        0                             Y                       
BE3PARTS IMS1        0                             Y    IMS2                
BE3PARTS IMS1        0                             Y    IMS3               
BE3PARTS IMS1        0                                  IMS1     DL/I         
BE3PARTS IMS2        0                                  IMS2     DL/I         
BE3PARTS IMS3        0                                  IMS3     DL/I         
DEDBJN21 IMS1        0                             Y                       
DEDBJN21 IMS1        0                                  IMS1     DEDB         
DEDBJN21 IMS2        0                                  IMS2     DEDB         
DEDBJN21 IMS3        0                                  IMS3     DEDB         
NEWDB1   IMS1      1D3 REPOSITORY MEMBER NOT FOUND Y                          
NEWDB1   IMS1        0                                  IMS1                 
NEWDB1   IMS2       10 NO RESOURCES FOUND                                    
NEWDB1   IMS3       10 NO RESOURCES FOUND                                    
(scrolled right to screen 2)
DBName   MbrName  Repo IMSid    TYPE     Acc  LAcc Rsdnt LDRsdnt LRsdnt  
BANKATMS IMS1     Y                      EXCL      N                     
BANKATMS IMS1          IMS1                   EXCL               N       
BANKATMS IMS2          IMS2                   EXCL               N       
BANKATMS IMS3          IMS3                   EXCL               N       
BE3PARTS IMS1     Y                      EXCL      N                     
BE3PARTS IMS1     Y    IMS2              UPD       N                     
BE3PARTS IMS1     Y    IMS3              EXCL      Y                     
BE3PARTS IMS1          IMS1     DL/I          EXCL               N       
BE3PARTS IMS2          IMS2     DL/I          UPD                N       
BE3PARTS IMS3          IMS3     DL/I          EXCL       Y       N       
DEDBJN21 IMS1     Y                      UPD       Y                     
DEDBJN21 IMS1          IMS1     DEDB          UPD                Y       
DEDBJN21 IMS2          IMS2     DEDB          UPD                Y       
DEDBJN21 IMS3          IMS3     DEDB          UPD                Y       
NEWDB1   IMS1     Y                                       
NEWDB1   IMS1          IMS1                   UPD                N  
NEWDB1   IMS2                                                       
NEWDB1   IMS3   
OM API input:
CMD(QUERY DB NAME(BANKATMS,DEDBJN21,BE3PARTS,NEWDB1) SHOW(DEFN,ACCTYPE,RESIDENT))
OM API output:
<imsout>                                                
<ctl>                                                   
<omname>OM1OM   </omname>                               
<omvsn>1.5.0</omvsn>                                    
<xmlvsn>20  </xmlvsn>                                   
<statime>2011.181 19:51:43.997358</statime>             
<stotime>2011.181 19:51:44.021469</stotime>   
<staseq>C800383BD29AEE9C</staseq>                         
<stoseq>C800383BD87DDE80</stoseq>                         
<rqsttkn1>USRT005 10125143</rqsttkn1>                     
<rc>0200000C</rc>                                         
<rsn>00003008</rsn>                                       
<rsnmsg>CSLN054I</rsnmsg>                                 
<rsntxt>None of the clients were successful.</rsntxt>     
</ctl>                                                    
<cmderr>                                                  
<mbr name="IMS1    ">                                     
<typ>IMS     </typ>                                       
<styp>DBDC    </styp>                                     
<rc>0000000C</rc>                                         
<rsn>00003000</rsn>                                       
<rsntxt>At least one request successful</rsntxt>          
</mbr>                                                    
<mbr name="IMS3    ">                                     
<typ>IMS     </typ>                                       
<styp>DBDC    </styp>                                     
<rc>0000000C</rc>                                         
<rsn>00003000</rsn>                                       
<rsntxt>At least one request successful</rsntxt>          
</mbr>                                                    
<mbr name="IMS2    ">                                                      
<typ>IMS     </typ>                                                        
<styp>DBDC    </styp>                                                      
<rc>0000000C</rc>                                                          
<rsn>00003000</rsn>                                                        
<rsntxt>At least one request successful</rsntxt>                           
</mbr>                                                                     
</cmderr>                                                                  
<cmd>                                                                      
<master>IMS1    </master>                                                  
<userid>USRT005 </userid>                                                  
<verb>QRY </verb>                                                          
<kwd>DB              </kwd>                                                
<input>QUERY DB NAME(BANKATMS,DEDBJN21,BE3PARTS,NEWDB1)                    
                  SHOW(DEFN,ACCTYPE,RESIDENT) </input>                     
</cmd>                                                                     
<cmdrsphdr>                                                                
<hdr slbl="DB" llbl="DBName" scope="LCL" sort="a" key="1" scroll="no"      
 len="8" dtype="CHAR" align="left" skipb="no" />                           
<hdr slbl="AREA" llbl="AreaName" scope="LCL" sort="a" key="4"              
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />              
<hdr slbl="PART" llbl="PartName" scope="LCL" sort="a" key="5"              
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />              
<hdr slbl="MBR" llbl="MbrName" scope="LCL" sort="a" key="3" scroll="no"        
 len="8" dtype="CHAR" align="left" skipb="no" />                               
<hdr slbl="CC" llbl="CC" scope="LCL" sort="n" key="0" scroll="yes"             
 len="4" dtype="INT" align="right" skipb="no" />                               
<hdr slbl="CCTXT" llbl="CCText" scope="LCL" sort="n" key="0"                   
 scroll="yes" len="*" dtype="CHAR" align="left" skipb="yes" />                 
<hdr slbl="REPO" llbl="Repo" scope="LCL" sort="d" key="2" scroll="no"          
 len="1" dtype="CHAR" align="left" />                                          
<hdr slbl="IMSID" llbl="IMSid" scope="GBL" sort="n" key="0"
 scroll="yes" len="4" dtype="CHAR" align="left" skipb="yes" />
<hdr slbl="TYP" llbl="TYPE" scope="LCL" sort="n" key="0" scroll="yes"          
 len="8" dtype="CHAR" align="left" skipb="no" />                               
<hdr slbl="RACC" llbl="Acc" scope="GBL" sort="n" key="0" scroll="yes"          
 len="*" dtype="CHAR" align="left" skipb="no" />                               
<hdr slbl="LACC" llbl="LAcc" scope="LCL" sort="n" key="0" scroll="yes"         
 len="*" dtype="CHAR" align="left" skipb="no" />                               
<hdr slbl="RRSDNT" llbl="Rsdnt" scope="GBL" sort="n" key="0"                   
 scroll="yes" len="1" dtype="CHAR" align="left" />                             
<hdr slbl="RSDNT" llbl="LDRsdnt" scope="LCL" sort="n" key="0"                
 scroll="yes" len="1" dtype="CHAR" align="left" skipb="yes" />                 
<hdr slbl="LRSDNT" llbl="LRsdnt" scope="LCL" sort="n" key="0"                  
 scroll="yes" len="1" dtype="CHAR" align="left" />                             
</cmdrsphdr>                                                                   
<cmdrspdata>                                                                 
<rsp>DB(BANKATMS) MBR(IMS1    ) CC(   0) TYP(        ) LACC(EXCL)            
 IMSID(IMS1    ) LRSDNT(N) </rsp>                                            
<rsp>DB(DEDBJN21) MBR(IMS1    ) CC(   0) TYP(DEDB    ) LACC(UPD)             
 IMSID(IMS1    ) LRSDNT(Y) </rsp>                                            
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) TYP(DL/I    ) LACC(EXCL)            
 IMSID(IMS1    ) LRSDNT(N) </rsp>                                            
<rsp>DB(NEWDB1  ) MBR(IMS1    ) CC(   0) TYP(        ) LACC(UPD)             
 IMSID(IMS1    ) LRSDNT(N) </rsp>                                            
<rsp>DB(BANKATMS) MBR(IMS1    ) CC(   0) REPO(Y) RACC(EXCL) RRSDNT(N)        
</rsp>                                                                       
<rsp>DB(DEDBJN21) MBR(IMS1    ) CC(   0) REPO(Y) RACC(UPD ) RRSDNT(Y)        
</rsp>                                                                       
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) REPO(Y) RACC(EXCL) RRSDNT(N)        
</rsp>                                                                       
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS2    )             
 RACC(UPD ) RRSDNT(N) </rsp>                                                 
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS3    )             
 RACC(EXCL) RRSDNT(Y) </rsp>                                                 
<rsp>DB(NEWDB1  ) MBR(IMS1    ) CC( 1D3) CCTXT(REPOSITORY MEMBER NOT         
 FOUND) REPO(Y) </rsp>                                                       
<rsp>DB(BANKATMS) MBR(IMS3    ) CC(   0) TYP(        ) LACC(EXCL)            
 IMSID(IMS3    ) LRSDNT(N) </rsp>      
<rsp>DB(DEDBJN21) MBR(IMS3    ) CC(   0) TYP(DEDB    ) LACC(UPD)            
 IMSID(IMS3    ) LRSDNT(Y) </rsp>                                 
<rsp>DB(BE3PARTS) MBR(IMS3    ) CC(   0) TYP(DL/I    ) LACC(EXCL)           
 IMSID(IMS3    ) RSDNT(Y) LRSDNT(N) </rsp>                                
<rsp>DB(NEWDB1  ) MBR(IMS3    ) CC(  10) CCTXT(NO RESOURCES FOUND)          
</rsp>                                                                      
<rsp>DB(BANKATMS) MBR(IMS2    ) CC(   0) TYP(        ) LACC(EXCL)           
 IMSID(IMS2    ) LRSDNT(N) </rsp>      
<rsp>DB(DEDBJN21) MBR(IMS2    ) CC(   0) TYP(DEDB    ) LACC(UPD)            
 IMSID(IMS2    ) LRSDNT(Y) </rsp>                                 
<rsp>DB(BE3PARTS) MBR(IMS2    ) CC(   0) TYP(DL/I    ) LACC(UPD)            
 IMSID(IMS2    ) LRSDNT(N) </rsp>                                           
<rsp>DB(NEWDB1  ) MBR(IMS2    ) CC(  10) CCTXT(NO RESOURCES FOUND)          
</rsp>                                                                      
</cmdrspdata>                                                               
</imsout> 
Explanation: This example shows the result of query for the runtime definitions and the definitions stored in the repository for databases BANKATMS, BE3PARTS, DEDBJN21, and NEWDB1, for an IMSplex that contains IMS1, IMS2, and IMS3. IMS1 is the command master IMS.
  • In the TSO SPOC output, the response lines 1-4 show the repository and local information for DB BANKATMS.
    • Line 1 indicates that database BANKATMS is defined to the repository, the line was built by command master IMS1, and that the database has a global access type of EXCL and a global resident value of N. The Repo column shows a value of Y, which indicates the global values for database BANKATMS in the repository. The IMSid column is blank, which indicates that this is the global definition of BANKATMS for all IMS systems that it is defined to.
    • Lines 2, 3, and 4 indicate that database BANKATMS is defined locally to IMS1, IMS2, and IMS3 with local access type and resident runtime values that are the same as the repository values. The MbrName column is the IMSID of the IMS that built the response line. The IMSid column shows the IMSID of the IMS to which the resource or descriptor is defined. The command master IMS1 already built repository information for BANKATMS. The output does not indicate whether database BANKATMS is defined in the resource lists for IMS1, IMS2, or IMS3, because SHOW(IMSID) was not specified.
  • The response lines 5-10 show the repository and local information for DB BE3PARTS.
    • Line 5 indicates that database BE3PARTS is defined to the repository, the line was built by command master IMS1, and that the database has a global access type of EXCL and a global resident value of N. The Repo column shows a value of Y, which indicates the global values for database BE3PARTS in the repository. The IMSid column is blank, which indicates that this is the global definition of BE3PARTS for all IMS systems that it is defined to and that do not have their own specific definitions.
    • Line 6 indicates that database BE3PARTS is defined to the repository with unique values for IMS2 (the access type is UPD instead of EXCL), different from the global values. When IMS2 next imports database BE3PARTS from the repository, it will get its unique access type value of UPD, but the global resident value of N. The resource list for IMS2 contains database BE3PARTS because it must, in order for its unique attributes, be stored in the repository.
    • Line 7 indicates that database BE3PARTS is defined to the repository with unique values for IMS3 (the resident value is Y instead of N), different from the global values. When IMS3 next imports database BE3PARTS from the repository, it will get its unique resident value of Y, but the global access type of EXCL. The resource list for IMS3 contains database BE3PARTS because it must, in order for its unique attributes, be stored in the repository.
    • Lines 8-10 indicate that database BE3PARTS is defined locally to IMS1, IMS2, and IMS3 with various local access type and resident runtime values. The output does not indicate whether database BE3PARTS is in the resource lists for IMS1, IMS2, or IMS3, because SHOW(IMSID) was not specified. These IMS systems do not access repository information; the command master IMS1 already accessed it. Runtime values for IMS1, IMS2, and IMS3 match the stored values in the repository, so their definitions are synchronized with the repository and no import is needed.
  • The response lines 11-14 show the repository and local information for database DEDBJN21.
    • Line 11 indicates that database DEDBJN21 is defined to the repository, the line was built by command master IMS1, and that the database has a global access type of UPD and a global resident value of Y. The Repo column shows a value of Y and indicates the global values for database DEDBJN21 in the repository.
    • Lines 12-14 indicate that database DEDBJN21 is defined locally to IMS1, IMS2, and IMS3 with the local access type UPD and resident Y runtime values. The command master IMS1 already built repository information for DEDBJN21. Runtime values for IMS1, IMS2, and IMS3 match the stored values in the repository, so their definitions are synchronized with the repository, and no import is needed. The output does not indicate whether database DEDBJN21 is defined in the resource lists for IMS1, IMS2, or IMS3, because SHOW(IMSID) was not specified.
  • The response lines 15-18 shows the information for DB NEWDB1.
    • Line 15 indicates that the database NEWDB1 is not defined to the repository.
    • Line 16 indicates that database NEWDB1 is defined locally to IMS1.
    • Line 17-18 indicate that the database NEWDB1 is not defined locally to IMS2 and IMS3.

Example 7 for QUERY DB command

TSO SPOC input:
QUERY DB NAME(BA*) SHOW(DEFN) 
TSO SPOC output:
(screen 1)
DBName   MbrName    CC Repo IMSid    TYPE     Acc  LAcc Rsdnt LRsdnt  
BANKATMS IMS1        0 Y                      EXCL      N             
BANKATMS IMS1        0      IMS1                   EXCL       N                 
BANKATMS IMS2        0      IMS2                   EXCL       N                 
BANKFNCL IMS1        0 Y                      EXCL      N             
BANKFNCL IMS1        0      IMS1                   EXCL       N                 
BANKFNCL IMS2        0      IMS2                   EXCL       N                 
BANKLDGR IMS1        0 Y                      EXCL      N             
BANKLDGR IMS1        0      IMS1                   EXCL       N                 
BANKLDGR IMS2        0      IMS2                   EXCL       N                 
BANKTERM IMS1        0 Y                      EXCL      N             
BANKTERM IMS1        0      IMS1                   EXCL       N                 
BANKTERM IMS2        0      IMS2                   EXCL       N                 
 (scrolled right to screen 2)                                  
DBName   MbrName  Repo TimeCreate           LTimeCreate            
BANKATMS IMS1     Y    2011.181 10:22:15.10                                  
BANKATMS IMS1                               2011.181 10:22:15.10             
BANKATMS IMS2                               2011.181 10:20:47.82             
BANKFNCL IMS1     Y    2011.181 10:22:15.10                                  
BANKFNCL IMS1                               2011.181 10:22:15.10             
BANKFNCL IMS2                               2011.181 10:20:47.82             
BANKLDGR IMS1     Y    2011.181 10:22:15.10                                  
BANKLDGR IMS1                               2011.181 10:22:15.10             
BANKLDGR IMS2                               2011.181 10:20:47.82             
BANKTERM IMS1     Y    2011.181 10:22:15.10                                  
BANKTERM IMS1                               2011.181 10:22:15.10             
BANKTERM IMS2                               2011.181 10:20:47.82        
(scrolled right to screen 3)
DBName   MbrName  Repo LTimeUpdate LTimeAccess          LTimeImport  
BANKATMS IMS1     Y                                                  
BANKATMS IMS1                                                        
BANKATMS IMS2                                                        
BANKFNCL IMS1     Y                                                  
BANKFNCL IMS1                                                        
BANKFNCL IMS2                                                        
BANKLDGR IMS1     Y                                                  
BANKLDGR IMS1                                                        
BANKLDGR IMS2                                                        
BANKTERM IMS1     Y                                                  
BANKTERM IMS1                                                        
BANKTERM IMS2                                                        
OM API input:
CMD(QUERY DB NAME(BA*) SHOW(DEFN))
OM API output:
<imsout>                                     
<ctl>                                        
<omname>OM1OM   </omname>                    
<omvsn>1.5.0</omvsn>                         
<xmlvsn>20  </xmlvsn>                        
<statime>2011.181 20:08:12.066851</statime>  
<stotime>2011.181 20:08:12.152198</stotime>      
<staseq>C8003BEA1E823B0C</staseq>                                        
<stoseq>C8003BEA335864C2</stoseq>                                        
<rqsttkn1>USRT005 10130812</rqsttkn1>                                    
<rc>00000000</rc>                                                        
<rsn>00000000</rsn>                                                      
</ctl>                                                                   
<cmd>                                                                    
<master>IMS1    </master>                                                
<userid>USRT005 </userid>                                                
<verb>QRY </verb>                                                        
<kwd>DB              </kwd>                                              
<input>QRY DB NAME(BA*) SHOW(DEFN) </input>                              
</cmd>                                                                   
<cmdrsphdr>                                                              
<hdr slbl="DB" llbl="DBName" scope="LCL" sort="a" key="1" scroll="no"    
 len="8" dtype="CHAR" align="left" skipb="no" />                         
<hdr slbl="AREA" llbl="AreaName" scope="LCL" sort="a" key="4"            
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />            
<hdr slbl="PART" llbl="PartName" scope="LCL" sort="a" key="5"            
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />            
<hdr slbl="MBR" llbl="MbrName" scope="LCL" sort="a" key="3" scroll="no"  
 len="8" dtype="CHAR" align="left" skipb="no" />                         
<hdr slbl="CC" llbl="CC" scope="LCL" sort="n" key="0" scroll="yes"       
len="4" dtype="INT" align="right" skipb="no" />                               
<hdr slbl="CCTXT" llbl="CCText" scope="LCL" sort="n" key="0"                   
 scroll="yes" len="*" dtype="CHAR" align="left" skipb="yes" />                 
<hdr slbl="REPO" llbl="Repo" scope="LCL" sort="d" key="2" scroll="no"          
 len="1" dtype="CHAR" align="left" />                                          
<hdr slbl="IMSID" llbl="IMSid" scope="GBL" sort="n" key="0"                    
 scroll="yes" len="4" dtype="CHAR" align="left" skipb="yes" />                 
<hdr slbl="TYP" llbl="TYPE" scope="LCL" sort="n" key="0" scroll="yes"          
 len="8" dtype="CHAR" align="left" skipb="no" />                               
<hdr slbl="RACC" llbl="Acc" scope="GBL" sort="n" key="0" scroll="yes"          
 len="*" dtype="CHAR" align="left" skipb="no" />                               
<hdr slbl="LACC" llbl="LAcc" scope="LCL" sort="n" key="0" scroll="yes"         
 len="*" dtype="CHAR" align="left" skipb="no" />                               
<hdr slbl="RRSDNT" llbl="Rsdnt" scope="GBL" sort="n" key="0"                   
 scroll="yes" len="1" dtype="CHAR" align="left" />                             
<hdr slbl="RSDNT" llbl="LDRsdnt" scope="LCL" sort="n" key="0"                
 scroll="yes" len="1" dtype="CHAR" align="left" skipb="yes" />                 
<hdr slbl="LRSDNT" llbl="LRsdnt" scope="LCL" sort="n" key="0"                  
 scroll="yes" len="1" dtype="CHAR" align="left" />                             
<hdr slbl="RTMCR" llbl="TimeCreate" scope="GBL" sort="n" key="0"               
 scroll="yes" len="20" dtype="CHAR" align="left" />                            
<hdr slbl="TMCR" llbl="LTimeCreate" scope="LCL" sort="n" key="0"               
 scroll="yes" len="20" dtype="CHAR" align="left" />                            
<hdr slbl="RTMUP" llbl="TimeUpdate" scope="GBL" sort="n" key="0"               
 scroll="yes" len="20" dtype="CHAR" skipb="yes" align="left" />                
<hdr slbl="TMUP" llbl="LTimeUpdate" scope="LCL" sort="n" key="0"               
 scroll="yes" len="20" dtype="CHAR" skipb="yes" align="left" />                
<hdr slbl="TMAC" llbl="LTimeAccess" scope="LCL" sort="n" key="0"               
 scroll="yes" len="20" dtype="CHAR" align="left" />                            
<hdr slbl="TMIM" llbl="LTimeImport" scope="LCL" sort="n" key="0"               
 scroll="yes" len="20" dtype="CHAR" skipb="yes" align="left" />                
</cmdrsphdr>                                                                   
<cmdrspdata>                                                                   
<rsp>DB(BANKATMS) MBR(IMS1    ) CC(   0) TYP(        ) LACC(EXCL)              
 IMSID(IMS1    ) LRSDNT(N) TMCR(2011.181 10:22:15.10) TMUP(                    
        ) TMIM(                    ) TMAC(                    ) </rsp>         
<rsp>DB(BANKFNCL) MBR(IMS1    ) CC(   0) TYP(        ) LACC(EXCL)              
 IMSID(IMS1    ) LRSDNT(N) TMCR(2011.181 10:22:15.10) TMUP(                    
        ) TMIM(                    ) TMAC(                    ) </rsp>         
<rsp>DB(BANKLDGR) MBR(IMS1    ) CC(   0) TYP(        ) LACC(EXCL)              
 IMSID(IMS1    ) LRSDNT(N) TMCR(2011.181 10:22:15.10) TMUP(                    
        ) TMIM(                    ) TMAC(                    ) </rsp>         
<rsp>DB(BANKTERM) MBR(IMS1    ) CC(   0) TYP(        ) LACC(EXCL)              
 IMSID(IMS1    ) LRSDNT(N) TMCR(2011.181 10:22:15.10) TMUP(                    
        ) TMIM(                    ) TMAC(                    ) </rsp>         
<rsp>DB(BANKATMS) MBR(IMS1    ) CC(   0) REPO(Y) RACC(EXCL) RRSDNT(N)          
RTMCR(2011.181 10:22:15.10) </rsp>                                           
<rsp>DB(BANKFNCL) MBR(IMS1    ) CC(   0) REPO(Y) RACC(EXCL) RRSDNT(N)         
 RTMCR(2011.181 10:22:15.10) </rsp>                                           
<rsp>DB(BANKLDGR) MBR(IMS1    ) CC(   0) REPO(Y) RACC(EXCL) RRSDNT(N)         
 RTMCR(2011.181 10:22:15.10) </rsp>                                           
<rsp>DB(BANKTERM) MBR(IMS1    ) CC(   0) REPO(Y) RACC(EXCL) RRSDNT(N)         
 RTMCR(2011.181 10:22:15.10) </rsp>                                           
<rsp>DB(BANKATMS) MBR(IMS2    ) CC(   0) TYP(        ) LACC(EXCL)             
 IMSID(IMS2    ) LRSDNT(N) TMCR(2011.181 10:20:47.82) TMUP(                   
        ) TMIM(                    ) TMAC(                    ) </rsp>        
<rsp>DB(BANKFNCL) MBR(IMS2    ) CC(   0) TYP(        ) LACC(EXCL)             
 IMSID(IMS2    ) LRSDNT(N) TMCR(2011.181 10:20:47.82) TMUP(                   
        ) TMIM(                    ) TMAC(                    ) </rsp>        
<rsp>DB(BANKLDGR) MBR(IMS2    ) CC(   0) TYP(        ) LACC(EXCL)             
 IMSID(IMS2    ) LRSDNT(N) TMCR(2011.181 10:20:47.82) TMUP(                   
        ) TMIM(                    ) TMAC(                    ) </rsp>        
<rsp>DB(BANKTERM) MBR(IMS2    ) CC(   0) TYP(        ) LACC(EXCL)             
 IMSID(IMS2    ) LRSDNT(N) TMCR(2011.181 10:20:47.82) TMUP(                   
        ) TMIM(                    ) TMAC(                    ) </rsp>        
</cmdrspdata>                                                                 
</imsout>                                                                     

Explanation: A line is returned for each resource that matches the wildcard name. The resource definitions from each IMS that has the resource defined and the global repository definition are returned. The repository information is returned by the command master IMS. There are no IMS-specific sections in the repository for each resource name that matches the wildcard name.

Example 8 for QUERY DB command

TSO SPOC input:
QRY DB NAME(BANKATMS,DEDBJN21,BE3PARTS,NEWDB1) 
SHOW(DEFN,IMSID,ACCTYPE,RESIDENT)
TSO SPOC output:
(screen 1)
DBName   MbrName    CC CCText                      Repo IMSid    TYPE     Acc  
BANKATMS IMS1        0                             Y                      EXCL 
BANKATMS IMS1        0                             Y    IMS1              EXCL 
BANKATMS IMS1        0                             Y    IMS2              EXCL 
BANKATMS IMS1        0                             Y    IMS3              EXCL 
BANKATMS IMS1        0                             Y    IMS4              EXCL 
BANKATMS IMS1        0                                  IMS1                   
BANKATMS IMS2        0                                  IMS2                   
BANKATMS IMS3        0                                  IMS3                   
BE3PARTS IMS1        0                             Y                      EXCL 
BE3PARTS IMS1        0                             Y    IMS1              EXCL 
BE3PARTS IMS1        0                             Y    IMS2              UPD  
BE3PARTS IMS1        0                             Y    IMS3              READ 
BE3PARTS IMS1        0                             Y    IMS4              EXCL 
BE3PARTS IMS1        0                                  IMS1     DL/I          
BE3PARTS IMS2        0                                  IMS2     DL/I      
BE3PARTS IMS3        0                                  IMS3     DL/I          
DEDBJN21 IMS1        0                             Y                      UPD  
DEDBJN21 IMS1        0                             Y    IMS1              UPD  
DEDBJN21 IMS1        0                             Y    IMS2              UPD  
DEDBJN21 IMS1        0                             Y    IMS3              UPD  
DEDBJN21 IMS1        0                             Y    IMS4              UPD  
DEDBJN21 IMS1        0                                  IMS1     DEDB          
DEDBJN21 IMS2        0                                  IMS2     DEDB          
DEDBJN21 IMS3        0                                  IMS3     DEDB          
NEWDB1   IMS1      1D3 REPOSITORY MEMBER NOT FOUND Y                           
NEWDB1   IMS1        0                                  IMS1                   
NEWDB1   IMS2       10 NO RESOURCES FOUND                                      
NEWDB1   IMS3       10 NO RESOURCES FOUND                                      

(scrolled to the right screen 2)
DBName   MbrName  Repo IMSid    TYPE     Acc  LAcc Rsdnt LDRsdnt LRsdnt     
BANKATMS IMS1     Y                      EXCL      N                        
BANKATMS IMS1     Y    IMS1              EXCL      N                        
BANKATMS IMS1     Y    IMS2              EXCL      N                        
BANKATMS IMS1     Y    IMS3              EXCL      N                        
BANKATMS IMS1     Y    IMS4              EXCL      N                        
BANKATMS IMS1          IMS1                   EXCL               N          
BANKATMS IMS2          IMS2                   EXCL               N          
BANKATMS IMS3          IMS3                   EXCL               N          
BE3PARTS IMS1     Y                      EXCL      N                        
BE3PARTS IMS1     Y    IMS1              EXCL      N                        
BE3PARTS IMS1     Y    IMS2              UPD       N                        
BE3PARTS IMS1     Y    IMS3              READ      Y                        
BE3PARTS IMS1     Y    IMS4              EXCL      N                        
BE3PARTS IMS1          IMS1     DL/I          EXCL               N          
BE3PARTS IMS2          IMS2     DL/I          UPD                N          
BE3PARTS IMS3          IMS3     DL/I          READ       Y       N   
DEDBJN21 IMS1     Y                      UPD       Y                 
DEDBJN21 IMS1     Y    IMS1              UPD       Y                 
DEDBJN21 IMS1     Y    IMS2              UPD       Y                 
DEDBJN21 IMS1     Y    IMS3              UPD       Y                 
DEDBJN21 IMS1     Y    IMS4              UPD       Y                 
DEDBJN21 IMS1          IMS1     DEDB          UPD                Y   
DEDBJN21 IMS2          IMS2     DEDB          UPD                Y   
DEDBJN21 IMS3          IMS3     DEDB          UPD                Y   
NEWDB1   IMS1     Y                                                  
NEWDB1   IMS1          IMS1                   UPD                N   
NEWDB1   IMS2                                                        
NEWDB1   IMS3                                                        
OM API input:
CMD(QRY DB NAME(BANKATMS,DEDBJN21,BE3PARTS,NEWDB1)   
SHOW(DEFN,IMSID,ACCTYPE,RESIDENT))
OM API output:
<imsout>                                       
<ctl>                                          
<omname>OM1OM   </omname>                      
<omvsn>1.5.0</omvsn>                           
<xmlvsn>20  </xmlvsn>                          
<statime>2011.181 22:47:45.395196</statime>    
<stotime>2011.181 22:47:45.414012</stotime>    
<staseq>C8005F93F4DFC05C</staseq>                                 
<stoseq>C8005F93F977C345</stoseq>                                 
<rqsttkn1>USRT005 10154745</rqsttkn1>                             
<rc>0200000C</rc>                                                 
<rsn>00003008</rsn>                                               
<rsnmsg>CSLN054I</rsnmsg>                                         
<rsntxt>None of the clients were successful.</rsntxt>             
</ctl>                                                            
<cmderr>                                                          
<mbr name="IMS1    ">                                             
<typ>IMS     </typ>                                               
<styp>DBDC    </styp>                                             
<rc>0000000C</rc>                                                 
<rsn>00003000</rsn>                                               
<rsntxt>At least one request successful</rsntxt>                  
</mbr>                                                            
<mbr name="IMS3    ">                                             
<typ>IMS     </typ>                                               
<styp>DBDC    </styp>                                             
<rc>0000000C</rc>                                                 
<rsn>00003000</rsn>                                               
<rsntxt>At least one request successful</rsntxt>                  
</mbr>                                                            
<mbr name="IMS2    ">                                                    
<typ>IMS     </typ>                                                      
<styp>DBDC    </styp>                                                    
<rc>0000000C</rc>                                                        
<rsn>00003000</rsn>                                                      
<rsntxt>At least one request successful</rsntxt>                         
</mbr>                                                                   
</cmderr>                                                                
<cmd>                                                                    
<master>IMS1    </master>                                                
<userid>USRT005 </userid>                                                
<verb>QRY </verb>                                                        
<kwd>DB              </kwd>                                              
<input>QRY DB NAME(BANKATMS,DEDBJN21,BE3PARTS,NEWDB1)                    
 SHOW(DEFN,IMSID,ACCTYPE,RESIDENT) </input>                              
</cmd>                                                                   
<cmdrsphdr>                                                              
<hdr slbl="DB" llbl="DBName" scope="LCL" sort="a" key="1" scroll="no"    
 len="8" dtype="CHAR" align="left" skipb="no" />                         
<hdr slbl="AREA" llbl="AreaName" scope="LCL" sort="a" key="4"            
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />            
<hdr slbl="PART" llbl="PartName" scope="LCL" sort="a" key="5"            
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />            
<hdr slbl="MBR" llbl="MbrName" scope="LCL" sort="a" key="3" scroll="no"
 len="8" dtype="CHAR" align="left" skipb="no" />                       
<hdr slbl="CC" llbl="CC" scope="LCL" sort="n" key="0" scroll="yes"     
 len="4" dtype="INT" align="right" skipb="no" />                       
<hdr slbl="CCTXT" llbl="CCText" scope="LCL" sort="n" key="0"           
 scroll="yes" len="*" dtype="CHAR" align="left" skipb="yes" />         
<hdr slbl="REPO" llbl="Repo" scope="LCL" sort="d" key="2" scroll="no"  
 len="1" dtype="CHAR" align="left" />                                  
<hdr slbl="IMSID" llbl="IMSid" scope="GBL" sort="n" key="0"            
 scroll="yes" len="4" dtype="CHAR" align="left" skipb="yes" />         
<hdr slbl="TYP" llbl="TYPE" scope="LCL" sort="n" key="0" scroll="yes"  
 len="8" dtype="CHAR" align="left" skipb="no" />                       
<hdr slbl="RACC" llbl="Acc" scope="GBL" sort="n" key="0" scroll="yes"  
 len="*" dtype="CHAR" align="left" skipb="no" />                       
<hdr slbl="LACC" llbl="LAcc" scope="LCL" sort="n" key="0" scroll="yes" 
 len="*" dtype="CHAR" align="left" skipb="no" />                       
<hdr slbl="RRSDNT" llbl="Rsdnt" scope="GBL" sort="n" key="0"           
 scroll="yes" len="1" dtype="CHAR" align="left" />                     
<hdr slbl="RSDNT" llbl="LDRsdnt" scope="LCL" sort="n" key="0"        
 scroll="yes" len="1" dtype="CHAR" align="left" skipb="yes" />         
<hdr slbl="LRSDNT" llbl="LRsdnt" scope="LCL" sort="n" key="0"          
 scroll="yes" len="1" dtype="CHAR" align="left" />                     
</cmdrsphdr>                                                           
<cmdrspdata>                                                                 
<rsp>DB(BANKATMS) MBR(IMS1    ) CC(   0) TYP(        ) LACC(EXCL)            
 IMSID(IMS1    ) LRSDNT(N) </rsp>                                            
<rsp>DB(DEDBJN21) MBR(IMS1    ) CC(   0) TYP(DEDB    ) LACC(UPD)             
 IMSID(IMS1    ) LRSDNT(Y) </rsp>                                            
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) TYP(DL/I    ) LACC(EXCL)            
 IMSID(IMS1    ) LRSDNT(N) </rsp>                                            
<rsp>DB(NEWDB1  ) MBR(IMS1    ) CC(   0) TYP(        ) LACC(UPD)             
 IMSID(IMS1    ) LRSDNT(N) </rsp>                                            
<rsp>DB(BANKATMS) MBR(IMS1    ) CC(   0) REPO(Y) RACC(EXCL) RRSDNT(N)        
</rsp>                                                                       
<rsp>DB(BANKATMS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS1    )             
 RACC(EXCL) RRSDNT(N) </rsp>                                                 
<rsp>DB(BANKATMS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS2    )             
 RACC(EXCL) RRSDNT(N) </rsp>                                                 
<rsp>DB(BANKATMS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS3    )             
 RACC(EXCL) RRSDNT(N) </rsp>                                                 
<rsp>DB(BANKATMS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS4    )             
 RACC(EXCL) RRSDNT(N) </rsp>                                                 
<rsp>DB(DEDBJN21) MBR(IMS1    ) CC(   0) REPO(Y) RACC(UPD ) RRSDNT(Y)        
</rsp>                                                                       
<rsp>DB(DEDBJN21) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS1    )             
 RACC(UPD ) RRSDNT(Y) </rsp>                                                 
<rsp>DB(DEDBJN21) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS2    )            
 RACC(UPD ) RRSDNT(Y) </rsp>                                                
<rsp>DB(DEDBJN21) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS3    )            
 RACC(UPD ) RRSDNT(Y) </rsp>                                                
<rsp>DB(DEDBJN21) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS4    )            
 RACC(UPD ) RRSDNT(Y) </rsp>                                                
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) REPO(Y) RACC(EXCL) RRSDNT(N)       
</rsp>                                                                      
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS1    )            
 RACC(EXCL) RRSDNT(N) </rsp>                                                
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS2    )            
 RACC(UPD ) RRSDNT(N) </rsp>                                                
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS3    )            
 RACC(READ) RRSDNT(Y) </rsp>                                                
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS4    )            
 RACC(EXCL) RRSDNT(N) </rsp>                                                
<rsp>DB(NEWDB1  ) MBR(IMS1    ) CC( 1D3) CCTXT(REPOSITORY MEMBER NOT        
 FOUND) REPO(Y) </rsp>                                                      
<rsp>DB(BANKATMS) MBR(IMS3    ) CC(   0) TYP(        ) LACC(EXCL)           
 IMSID(IMS3    ) LRSDNT(N) </rsp>      
<rsp>DB(DEDBJN21) MBR(IMS3    ) CC(   0) TYP(DEDB    ) LACC(UPD)            
 IMSID(IMS3    ) LRSDNT(Y) </rsp>                               
<rsp>DB(BE3PARTS) MBR(IMS3    ) CC(   0) TYP(DL/I    ) LACC(READ)         
 IMSID(IMS3    ) RSDNT(Y) LRSDNT(N) </rsp>                              
<rsp>DB(NEWDB1  ) MBR(IMS3    ) CC(  10) CCTXT(NO RESOURCES FOUND)        
</rsp>                                                                    
<rsp>DB(BANKATMS) MBR(IMS2    ) CC(   0) TYP(        ) LACC(EXCL)         
 IMSID(IMS2    ) LRSDNT(N) </rsp>    
<rsp>DB(DEDBJN21) MBR(IMS2    ) CC(   0) TYP(DEDB    ) LACC(UPD)          
 IMSID(IMS2    ) LRSDNT(Y) </rsp>                               
<rsp>DB(BE3PARTS) MBR(IMS2    ) CC(   0) TYP(DL/I    ) LACC(UPD)          
 IMSID(IMS2    ) LRSDNT(N) </rsp>                                         
<rsp>DB(NEWDB1  ) MBR(IMS2    ) CC(  10) CCTXT(NO RESOURCES FOUND)        
</rsp>                                                                    
</cmdrspdata>                                                             
</imsout>     

Explanation: Because SHOW(IMSID) is specified, a line is returned for each IMS that has the resource defined in the repository. Line 5 indicates that the BANKATMS definition for IMS4 is defined in the repository for IMS4, but the definition has not yet been imported into IMS4 because IMS4 shows no local line for database BANKATMS.

Example 9 for QUERY DB command

TSO SPOC input:
QRY DB NAME(BANKATMS,DEDBJN21,BE3PARTS,NEWDB1) SHOW(DEFN,GLOBAL)   
TSO SPOC output:
(screen 1)
DBName   MbrName    CC CCText                      Repo IMSid    Acc  Rsdnt 
BANKATMS IMS1        0                             Y             EXCL N     
BE3PARTS IMS1        0                             Y             EXCL N     
BE3PARTS IMS1        0                             Y    IMS2     UPD  N     
BE3PARTS IMS1        0                             Y    IMS3     READ Y     
DEDBJN21 IMS1        0                             Y             UPD  Y     
NEWDB1   IMS1      1D3 REPOSITORY MEMBER NOT FOUND Y                        

(scrolled right to screen 2)
DBName   MbrName  Repo TimeCreate           TimeUpdate               
BANKATMS IMS1     Y    2011.181 15:22:52.65                          
BE3PARTS IMS1     Y    2011.181 15:22:52.65                          
BE3PARTS IMS1     Y    2011.181 15:21:25.99                          
BE3PARTS IMS1     Y    2011.181 15:22:07.39 2011.181 15:45:37.08     
DEDBJN21 IMS1     Y    2011.181 15:22:52.65                          
NEWDB1   IMS1     Y                  
OM API input:
CMD(QRY DB NAME(BANKATMS,DEDBJN21,BE3PARTS,NEWDB1) SHOW(DEFN,GLOBAL)   )
OM API output:
<imsout>                                    
<ctl>                                       
<omname>OM1OM   </omname>                   
<omvsn>1.5.0</omvsn>                        
<xmlvsn>20  </xmlvsn>                       
<statime>2011.181 22:57:34.679151</statime> 
<stotime>2011.181 22:57:34.700833</stotime>
<staseq>C80061C5F106F650</staseq>                               
<stoseq>C80061C5F652109E</stoseq>                               
<rqsttkn1>USRT005 10155734</rqsttkn1>                           
<rc>0200000C</rc>                                               
<rsn>0000300C</rsn>                                             
<rsnmsg>CSLN055I</rsnmsg>                                       
<rsntxt>The command completed with warning(s).</rsntxt>         
</ctl>                                                          
<cmderr>                                                        
<mbr name="IMS1    ">                                           
<typ>IMS     </typ>                                             
<styp>DBDC    </styp>                                           
<rc>0000000C</rc>                                               
<rsn>00003000</rsn>                                             
<rsntxt>At least one request successful</rsntxt>                
</mbr>                                                          
<mbr name="IMS3    ">                                           
<typ>IMS     </typ>                                             
<styp>DBDC    </styp>                                           
<rc>00000004</rc>                                               
<rsn>00001000</rsn>                                             
<rsntxt>IMS not master, cmd ignored</rsntxt>                    
</mbr>                                                          
<mbr name="IMS2    ">                                                     
<typ>IMS     </typ>                                                       
<styp>DBDC    </styp>                                                     
<rc>00000004</rc>                                                         
<rsn>00001000</rsn>                                                       
<rsntxt>IMS not master, cmd ignored</rsntxt>                              
</mbr>                                                                    
</cmderr>                                                                 
<cmd>                                                                     
<master>IMS1    </master>                                                 
<userid>USRT005 </userid>                                                 
<verb>QRY </verb>                                                         
<kwd>DB              </kwd>                                               
<input>QRY DB NAME(BANKATMS,DEDBJN21,BE3PARTS,NEWDB1) SHOW(DEFN,GLOBAL)   
 </input>                                                                 
</cmd>                                                                    
<cmdrsphdr>                                                               
<hdr slbl="DB" llbl="DBName" scope="LCL" sort="a" key="1" scroll="no"     
 len="8" dtype="CHAR" align="left" skipb="no" />                          
<hdr slbl="AREA" llbl="AreaName" scope="LCL" sort="a" key="4"             
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />             
<hdr slbl="PART" llbl="PartName" scope="LCL" sort="a" key="5"             
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />             
<hdr slbl="MBR" llbl="MbrName" scope="LCL" sort="a" key="3" scroll="no"     
 len="8" dtype="CHAR" align="left" skipb="no" />                            
<hdr slbl="CC" llbl="CC" scope="LCL" sort="n" key="0" scroll="yes"          
 len="4" dtype="INT" align="right" skipb="no" />                            
<hdr slbl="CCTXT" llbl="CCText" scope="LCL" sort="n" key="0"                
 scroll="yes" len="*" dtype="CHAR" align="left" skipb="yes" />              
<hdr slbl="REPO" llbl="Repo" scope="LCL" sort="d" key="2" scroll="no"       
 len="1" dtype="CHAR" align="left" />                                       
<hdr slbl="IMSID" llbl="IMSid" scope="GBL" sort="n" key="0"                 
 scroll="yes" len="4" dtype="CHAR" align="left" skipb="yes" />              
<hdr slbl="RACC" llbl="Acc" scope="GBL" sort="n" key="0" scroll="yes"       
 len="*" dtype="CHAR" align="left" skipb="no" />                            
<hdr slbl="RRSDNT" llbl="Rsdnt" scope="GBL" sort="n" key="0"                
 scroll="yes" len="1" dtype="CHAR" align="left" />                          
<hdr slbl="RTMCR" llbl="TimeCreate" scope="GBL" sort="n" key="0"            
 scroll="yes" len="20" dtype="CHAR" align="left" />                         
<hdr slbl="RTMUP" llbl="TimeUpdate" scope="GBL" sort="n" key="0"            
 scroll="yes" len="20" dtype="CHAR" skipb="yes" align="left" />             
</cmdrsphdr>                                                                
<cmdrspdata>                                                                
<rsp>DB(BANKATMS) MBR(IMS1    ) CC(   0) REPO(Y) RACC(EXCL) RRSDNT(N)       
 RTMCR(2011.181 15:22:52.65) </rsp>                                         
<rsp>DB(DEDBJN21) MBR(IMS1    ) CC(   0) REPO(Y) RACC(UPD ) RRSDNT(Y)       
RTMCR(2011.181 15:22:52.65) </rsp>                                        
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) REPO(Y) RACC(EXCL) RRSDNT(N)      
 RTMCR(2011.181 15:22:52.65) </rsp>                                        
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS2    )           
 RACC(UPD ) RRSDNT(N) RTMCR(2011.181 15:21:25.99) </rsp>                   
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS3    )           
 RACC(READ) RRSDNT(Y) RTMUP(2011.181 15:45:37.08) RTMCR(2011.181           
 15:22:07.39) </rsp>                                                       
<rsp>DB(NEWDB1  ) MBR(IMS1    ) CC( 1D3) CCTXT(REPOSITORY MEMBER NOT       
 FOUND) REPO(Y) </rsp>                                                     
</cmdrspdata>                                                              
</imsout>                      

Explanation: The stored resource definition information from the repository is returned for the specified resource names because SHOW(DEFN,GLOBAL) is specified. The access type, resident, create time, and update time from the stored resource definitions in the repository are returned. The output contains generic resource definitions and any IMS-specific sections. The generic resource definition has a blank in the IMSid column. The IMS-specific section includes an IMSID of the IMS whose definition is different from the generic definition. For readability, the DBName and MbrName columns are repeated when the output is scrolled to the right.

Example 10 for QUERY DB command

TSO SPOC input:
QRY DB NAME(BANKATMS,DEDBJN21,BE3PARTS,NEWDB1) SHOW(DEFN,LOCAL)     
TSO SPOC output:
(screen 1)
DBName   MbrName    CC CCText             IMSid    TYPE     LAcc LDRsdnt LRsdnt
BANKATMS IMS1        0                    IMS1              EXCL         N     
BANKATMS IMS2        0                    IMS2              EXCL         N     
BANKATMS IMS3        0                    IMS3              EXCL         N     
BE3PARTS IMS1        0                    IMS1     DL/I     EXCL         N     
BE3PARTS IMS2        0                    IMS2     DL/I     UPD          N     
BE3PARTS IMS3        0                    IMS3     DL/I     READ Y       N     
DEDBJN21 IMS1        0                    IMS1     DEDB     UPD          Y     
DEDBJN21 IMS2        0                    IMS2     DEDB     UPD          Y     
DEDBJN21 IMS3        0                    IMS3     DEDB     UPD          Y     
NEWDB1   IMS1        0                    IMS1              UPD          N     
NEWDB1   IMS2       10 NO RESOURCES FOUND                                      
NEWDB1   IMS3       10 NO RESOURCES FOUND                                      
(scrolled right to screen 2)
DBName   MbrName  LTimeCreate          LTimeUpdate          LTimeAccess    
BANKATMS IMS1     2011.181 15:22:52.65                                     
BANKATMS IMS2     2011.181 15:21:25.99                                     
BANKATMS IMS3     2011.181 15:22:07.39                                     
BE3PARTS IMS1     2011.181 15:22:52.65                                     
BE3PARTS IMS2     2011.181 15:21:25.99 2011.181 15:42:22.19                
BE3PARTS IMS3     2011.181 15:22:07.39 2011.181 15:45:32.27                
DEDBJN21 IMS1     2011.181 15:22:52.65                                     
DEDBJN21 IMS2     2011.181 15:21:25.99                                     
DEDBJN21 IMS3     2011.181 15:22:07.39                                     
NEWDB1   IMS1     2011.181 15:42:43.01                                     
NEWDB1   IMS2                                                              
NEWDB1   IMS3                                                              
OM API input:
CMD(QRY DB NAME(BANKATMS,DEDBJN21,BE3PARTS,NEWDB1) SHOW(DEFN,LOCAL)     )
OM API output:
<imsout>                                        
<ctl>                                           
<omname>OM1OM   </omname>                       
<omvsn>1.5.0</omvsn>                            
<xmlvsn>20  </xmlvsn>                           
<statime>2011.181 23:06:01.535261</statime>     
<stotime>2011.181 23:06:01.559762</stotime>     
<staseq>C80063A95131DA82</staseq>                                    
<stoseq>C80063A9572D2645</stoseq>                                    
<rqsttkn1>USRT005 10160601</rqsttkn1>                                
<rc>0200000C</rc>                                                    
<rsn>00003000</rsn>                                                  
<rsnmsg>CSLN023I</rsnmsg>                                            
<rsntxt>At least one request was successful.</rsntxt>                
</ctl>                                                               
<cmderr>                                                             
<mbr name="IMS3    ">                                                
<typ>IMS     </typ>                                                  
<styp>DBDC    </styp>                                                
<rc>0000000C</rc>                                                    
<rsn>00003000</rsn>                                                  
<rsntxt>At least one request successful</rsntxt>                     
</mbr>                                                               
<mbr name="IMS2    ">                                                
<typ>IMS     </typ>                                                  
<styp>DBDC    </styp>                                                
<rc>0000000C</rc>                                                    
<rsn>00003000</rsn>                                                  
<rsntxt>At least one request successful</rsntxt>                   
</mbr>                                                               
</cmderr>                                                                  
<cmd>                                                                      
<master>IMS1    </master>                                                  
<userid>USRT005 </userid>                                                  
<verb>QRY </verb>                                                          
<kwd>DB              </kwd>                                                
<input>QRY DB NAME(BANKATMS,DEDBJN21,BE3PARTS,NEWDB1) SHOW(DEFN,LOCAL)     
</input>                                                                   
</cmd>                                                                     
<cmdrsphdr>                                                                
<hdr slbl="DB" llbl="DBName" scope="LCL" sort="a" key="1" scroll="no"      
 len="8" dtype="CHAR" align="left" skipb="no" />                           
<hdr slbl="AREA" llbl="AreaName" scope="LCL" sort="a" key="4"              
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />              
<hdr slbl="PART" llbl="PartName" scope="LCL" sort="a" key="5"              
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />              
<hdr slbl="MBR" llbl="MbrName" scope="LCL" sort="a" key="3" scroll="no"    
 len="8" dtype="CHAR" align="left" skipb="no" />                           
<hdr slbl="CC" llbl="CC" scope="LCL" sort="n" key="0" scroll="yes"         
 len="4" dtype="INT" align="right" skipb="no" />                           
<hdr slbl="CCTXT" llbl="CCText" scope="LCL" sort="n" key="0"               
 scroll="yes" len="*" dtype="CHAR" align="left" skipb="yes" />             
<hdr slbl="IMSID" llbl="IMSid" scope="GBL" sort="n" key="0"     
scroll="yes" len="4" dtype="CHAR" align="left" skipb="yes" />          
<hdr slbl="TYP" llbl="TYPE" scope="LCL" sort="n" key="0" scroll="yes"   
 len="8" dtype="CHAR" align="left" skipb="no" />                        
<hdr slbl="LACC" llbl="LAcc" scope="LCL" sort="n" key="0" scroll="yes"  
 len="*" dtype="CHAR" align="left" skipb="no" />                        
<hdr slbl="RSDNT" llbl="LDRsdnt" scope="LCL" sort="n" key="0"         
 scroll="yes" len="1" dtype="CHAR" align="left" skipb="yes" />          
<hdr slbl="LRSDNT" llbl="LRsdnt" scope="LCL" sort="n" key="0"           
 scroll="yes" len="1" dtype="CHAR" align="left" />                      
<hdr slbl="TMCR" llbl="LTimeCreate" scope="LCL" sort="n" key="0"        
 scroll="yes" len="20" dtype="CHAR" align="left" />                     
<hdr slbl="TMUP" llbl="LTimeUpdate" scope="LCL" sort="n" key="0"        
 scroll="yes" len="20" dtype="CHAR" skipb="yes" align="left" />         
<hdr slbl="TMAC" llbl="LTimeAccess" scope="LCL" sort="n" key="0"        
 scroll="yes" len="20" dtype="CHAR" align="left" />                     
<hdr slbl="TMIM" llbl="LTimeImport" scope="LCL" sort="n" key="0"        
 scroll="yes" len="20" dtype="CHAR" skipb="yes" align="left" />         
</cmdrsphdr>                                                            
<cmdrspdata>                                                            
<rsp>DB(BANKATMS) MBR(IMS1    ) CC(   0) TYP(        ) LACC(EXCL)       
 IMSID(IMS1    ) LRSDNT(N) TMCR(2011.181 15:22:52.65) TMUP(             
        ) TMIM(                    ) TMAC(                    ) </rsp>  
<rsp>DB(DEDBJN21) MBR(IMS1    ) CC(   0) TYP(DEDB    ) LACC(UPD)        
IMSID(IMS1    ) LRSDNT(Y) TMCR(2011.181 15:22:52.65) TMUP(                  
        ) TMIM(                    ) </rsp>                                  
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) TYP(DL/I    ) LACC(EXCL)            
 IMSID(IMS1    ) LRSDNT(N) TMCR(2011.181 15:22:52.65) TMUP(                  
        ) TMIM(                    ) TMAC(                    ) </rsp>       
<rsp>DB(NEWDB1  ) MBR(IMS1    ) CC(   0) TYP(        ) LACC(UPD)             
 IMSID(IMS1    ) LRSDNT(N) TMCR(2011.181 15:42:43.01) TMUP(                  
        ) TMIM(                    ) TMAC(                    ) </rsp>       
<rsp>DB(BANKATMS) MBR(IMS3    ) CC(   0) TYP(        ) LACC(EXCL)            
 IMSID(IMS3    ) LRSDNT(N) TMCR(2011.181 15:22:07.39) TMUP(                  
        ) TMIM(                    ) TMAC(                    ) </rsp>       
<rsp>DB(DEDBJN21) MBR(IMS3    ) CC(   0) TYP(DEDB    ) LACC(UPD)             
 IMSID(IMS3    ) LRSDNT(Y) TMCR(2011.181 15:22:07.39) TMUP(                  
        ) TMIM(                    ) </rsp>                                  
<rsp>DB(BE3PARTS) MBR(IMS3    ) CC(   0) TYP(DL/I    ) LACC(READ)            
 IMSID(IMS3    ) RSDNT(Y) LRSDNT(N) TMCR(2011.181 15:22:07.39)             
 TMUP(2011.181 15:45:32.27) TMIM(                    ) TMAC(                 
         ) </rsp>                                                            
<rsp>DB(NEWDB1  ) MBR(IMS3    ) CC(  10) CCTXT(NO RESOURCES FOUND)           
</rsp>                                                                       
<rsp>DB(BANKATMS) MBR(IMS2    ) CC(   0) TYP(        ) LACC(EXCL)            
 IMSID(IMS2    ) LRSDNT(N) TMCR(2011.181 15:21:25.99) TMUP(                  
        ) TMIM(                    ) TMAC(                    ) </rsp>       
<rsp>DB(DEDBJN21) MBR(IMS2    ) CC(   0) TYP(DEDB    ) LACC(UPD)         
 IMSID(IMS2    ) LRSDNT(Y) TMCR(2011.181 15:21:25.99) TMUP(              
        ) TMIM(                    ) </rsp>                              
<rsp>DB(BE3PARTS) MBR(IMS2    ) CC(   0) TYP(DL/I    ) LACC(UPD)         
 IMSID(IMS2    ) LRSDNT(N) TMCR(2011.181 15:21:25.99) TMUP(2011.181      
 15:42:22.19) TMIM(                    ) TMAC(                    )      
</rsp>                                                                   
<rsp>DB(NEWDB1  ) MBR(IMS2    ) CC(  10) CCTXT(NO RESOURCES FOUND)       
</rsp>                                                                   
</cmdrspdata>                                                            
</imsout>     

Explanation: The runtime resource definitions at the IMS system are returned for the specified resource names. Because SHOW(LOCAL) is specified, only the local runtime definitions from each IMS system are returned. No stored resource definitions from repository are returned.

Example 11 for QUERY DB command

TSO SPOC input:
QRY DB NAME(BANKATMS,DEDBJN21,BE3PARTS) SHOW(IMSID)
TSO SPOC output:
DBName   MbrName    CC Repo IMSid    
BANKATMS IMS1        0 Y    IMS1     
BANKATMS IMS1        0 Y    IMS2     
BANKATMS IMS1        0 Y    IMS3     
BANKATMS IMS1        0 Y    IMS4     
BE3PARTS IMS1        0 Y    IMS1     
BE3PARTS IMS1        0 Y    IMS3     
BE3PARTS IMS1        0 Y    IMS2     
BE3PARTS IMS1        0 Y    IMS4     
DEDBJN21 IMS1        0 Y    IMS3     
DEDBJN21 IMS1        0 Y    IMS1     
DEDBJN21 IMS1        0 Y    IMS2     
DEDBJN21 IMS1        0 Y    IMS4     
OM API input:
CMD(QRY DB NAME(BANKATMS,DEDBJN21,BE3PARTS) SHOW(IMSID))
OM API output:
<imsout>                                              
<ctl>                                                 
<omname>OM1OM   </omname>                             
<omvsn>1.5.0</omvsn>                                  
<xmlvsn>20  </xmlvsn>                                 
<statime>2011.181 23:14:08.509271</statime>           
<stotime>2011.181 23:14:08.533678</stotime>           
<staseq>C8006579BB557B48</staseq>                                       
<stoseq>C8006579C14AE3CA</stoseq>                                       
<rqsttkn1>USRT005 10161408</rqsttkn1>                                   
<rc>02000004</rc>                                                       
<rsn>00001014</rsn>                                                     
<rsnmsg>CSLN055I</rsnmsg>                                               
<rsntxt>At least one request completed with warning(s).</rsntxt>        
</ctl>                                                                  
<cmderr>                                                                
<mbr name="IMS3    ">                                                   
<typ>IMS     </typ>                                                     
<styp>DBDC    </styp>                                                   
<rc>00000004</rc>                                                       
<rsn>00001000</rsn>                                                     
<rsntxt>IMS not master, cmd ignored</rsntxt>                            
</mbr>                                                                  
<mbr name="IMS2    ">                                                   
<typ>IMS     </typ>                                                     
<styp>DBDC    </styp>                                                   
<rc>00000004</rc>                                                       
<rsn>00001000</rsn>                                                     
<rsntxt>IMS not master, cmd ignored</rsntxt>                            
</mbr>                                                                  
</cmderr>                                                                
<cmd>                                                                    
<master>IMS1    </master>                                                
<userid>USRT005 </userid>                                                
<verb>QRY </verb>                                                        
<kwd>DB              </kwd>                                              
<input>QRY DB NAME(BANKATMS,DEDBJN21,BE3PARTS) SHOW(IMSID) </input>      
</cmd>                                                                   
<cmdrsphdr>                                                              
<hdr slbl="DB" llbl="DBName" scope="LCL" sort="a" key="1" scroll="no"    
 len="8" dtype="CHAR" align="left" skipb="no" />                         
<hdr slbl="AREA" llbl="AreaName" scope="LCL" sort="a" key="4"            
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />            
<hdr slbl="PART" llbl="PartName" scope="LCL" sort="a" key="5"            
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />            
<hdr slbl="MBR" llbl="MbrName" scope="LCL" sort="a" key="3" scroll="no"  
 len="8" dtype="CHAR" align="left" skipb="no" />                         
<hdr slbl="CC" llbl="CC" scope="LCL" sort="n" key="0" scroll="yes"       
 len="4" dtype="INT" align="right" skipb="no" />                         
<hdr slbl="CCTXT" llbl="CCText" scope="LCL" sort="n" key="0"             
 scroll="yes" len="*" dtype="CHAR" align="left" skipb="yes" />           
<hdr slbl="REPO" llbl="Repo" scope="LCL" sort="d" key="2" scroll="no"    
 len="1" dtype="CHAR" align="left" />                                    
<hdr slbl="IMSID" llbl="IMSid" scope="GBL" sort="n" key="0"                 
 scroll="yes" len="4" dtype="CHAR" align="left" skipb="yes" />              
</cmdrsphdr>                                                                
<cmdrspdata>                                                                
<rsp>DB(BANKATMS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS1    ) </rsp>     
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS1    ) </rsp>     
<rsp>DB(DEDBJN21) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS1    ) </rsp>     
<rsp>DB(BANKATMS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS2    ) </rsp>     
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS2    ) </rsp>     
<rsp>DB(DEDBJN21) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS2    ) </rsp>     
<rsp>DB(BANKATMS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS3    ) </rsp>     
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS3    ) </rsp>     
<rsp>DB(DEDBJN21) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS3    ) </rsp>     
<rsp>DB(BANKATMS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS4    ) </rsp>     
<rsp>DB(BE3PARTS) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS4    ) </rsp>     
<rsp>DB(DEDBJN21) MBR(IMS1    ) CC(   0) REPO(Y) IMSID(IMS4    ) </rsp>     
</cmdrspdata>                                                               
</imsout>  

Explanation: The SHOW(IMSID) keyword without the DEFN filter is specified. The IMSID information from the repository is returned for the specified resource names. The IMSIDs that have the specified resource names in their IMS resource list in the repository are returned in the IMSid column. All the IMSID information is returned in the IMSid column.

Example 12 for QUERY DB command

In this example, TYPE is set to DHISNDX for a HISAM or a SHISAM secondary index database.

TSO SPOC input:
QUERY DB NAME(D*) SHOW(ACCTYPE)
TSO SPOC output:
DATABASE  TYPE     TOTAL UNUSED  TOTAL UNUSED ACC  CONDITIONS      IMS1
DBHDOJ01  PHDAM                               UP                   IMS1
PDHDOJA    PART                               UP    NOTOPEN        IMS1 
PDHDOJB    PART                               UP    NOTOPEN        IMS1
PDHDOJC    PART                               UP    NOTOPEN        IMS1
PDHDOJD    PART                               UP    NOTOPEN        IMS1 
DEDBJN24   DEDB     SEQ DEPEND  DIRECT ADDRES UP    NOTOPEN        IMS1
DB24A000   AREA     N/A      N/A     N/A      N/A   NOTOPEN        IMS1
DB24A001   AREA     N/A      N/A     N/A      N/A   NOTOPEN        IMS1
DB24A239   AREA     N/A      N/A     N/A      N/A   NOTOPEN        IMS1
DEHSJX24   DHISNDX                            UP    NOTOPEN        IMS1
*09043/155658*     IMS1 

Explanation: DBHDOJ01 is a PHDAM database with four partitions: PDHDOJA, PDHDOJB, PDHDOJC, and PDHDOJD. DEDBJN24 is a HISAM or SHISAM secondary index database with three areas: DB24A000, DB24A001, and DB24A239. DEHSJX24 is a HISAM or a SHISAM secondary index database. The local access of each database is UPDATE.

Example 13 for QUERY DB command

In this example, TYPE is set to DHISNDX for a HISAM or a SHISAM secondary index database.

TSO SPOC input:
QUERY DB NAME(D*) SHOW(ACCTYPE)
TSO SPOC output:
DBName      AreaName PartName  MbrName   CC   TYPE      LAcc
DBHDOJ01                       IMS1       0   PHDAM     UPD
DBHDOJ01              PDHDOJA  IMS1       0   PART      UPD
DBHDOJ01              PDHDOJB  IMS1       0   PART      UPD
DBHDOJ01              PDHDOJC  IMS1       0   PART      UPD
DBHDOJ01              PDHDOJD  IMS1       0   PART      UPD
DEDBJN24                       IMS1       0   DEDB      UPD
DEDBJN24   DB24A000            IMS1       0   AREA
DEDBJN24   DB24A001            IMS1       0   AREA
DEDBJN24   DB24A239            IMS1       0   AREA
DEHSJX24                       IMS1       0   DHISNDX   UPD

Explanation: DBHDOJ01 is a PHDAM database with four partitions: PDHDOJA, PDHDOJB, PDHDOJC, and PDHDOJD. DEDBJN24 is a HISAM or SHISAM secondary index database with three areas: DB24A000, DB24A001, and DB24A239. DEHSJX24 is a HISAM or a SHISAM secondary index database. The local access type of each database is UPDATE.

Example 14 for QUERY DB command

TSO SPOC input:
QUERY DB NAME(D*) TYPE(DHISNDX,DEDB) 
TSO SPOC output:
DBName     AreaName   MbrName   CC   TYPE
DEDBJN24                 IMS1    0   DEDB
DEDBJN24   DB24A000      IMS1    0   AREA
DEDBJN24   DB24A001      IMS1    0   AREA
DEDBJN24   DB24A239      IMS1    0   AREA
DEHSJX24                 IMS1    0   DHISNDX  

Explanation: DEDBJN24 is a HISAM or SHISAM secondary index database with three areas: DB24A000, DB24A001, and DB24A239. DEHSJX24 is a HISAM or a SHISAM secondary index database for a DEDB primary database.

Example 15 for QUERY DB command

TSO SPOC input:
QUERY DB NAME(DEDBGS1A,FPSI1AH*) SHOW(SNDX)
TSO SPOC output:
Response for: QUERY DB NAME(DEDBGS1A,FPSI1AH*) SHOW(SNDX)             
DBName   AreaName SndxName  MbrName    CC CCText     TYPE             
DEDBGS1A                    IMS1        0            DEDB             
DEDBGS1A           FPSI1AHA IMS1        0            DHISNDX          
DEDBGS1A           FPSI1AH1 IMS1        0            DHISNDX          
DEDBGS1A           FPSI1AH2 IMS1        0            DHISNDX          
DEDBGS1A GS1AAR0            IMS1        0            AREA             
DEDBGS1A GS1AAR1            IMS1        0            AREA             
DEDBGS1A GS1AAR2            IMS1        0            AREA             
DEDBGS1A GS1AAR3            IMS1        0            AREA             
DEDBGS1A GS1AAR4            IMS1        0            AREA             
DEDBGS1A GS1AAR5            IMS1        0            AREA             
DEDBGS1A GS1AAR6            IMS1        0            AREA             
FPSI1AHA                    IMS1      193 NOT A DEDB                  
FPSI1AH1                    IMS1      193 NOT A DEDB                  
FPSI1AH2                    IMS1      193 NOT A DEDB                  

Explanation: DEDBGS1A is a DEDB database with seven areas: GS1AAR0, GS1AAR1, GS1AAR2, GS1AAR3, GS1AAR4, GS1AAR5, and GS1AAR6. DEDBGS1A has three HISAM or SHISAM secondary index databases: FPSI1AHA, FPSI1AH1, and FPSI1AH2. Because databases FPSI1AHA, FPSI1AH1, and FPSI1AH2 are not DEDB databases, they cannot have Fast Path secondary index databases defined. These databases get a completion code of 193, which indicates that they are not DEDB databases.

Example 16 for QUERY DB command

The following example shows a HALDB master database, DBVHDJ05, and two partitions, PVHDJ5B and PVHDJ5D, that are currently being processed by the HALDB online alter function.

TSO SPOC input:
QRY DB NAME(DBVHDJ05) SHOW(WORK)
TSO SPOC output:
DBName    PartName MbrName   CC    TYPE      Work            
DBVHDJ05           IMS1       0    PHDAM     ALTER INCOMPLETE
DBVHDJ05  PVHDJ5B  IMS1       0    PART      ALTER INCOMPLETE
DBVHDJ05  PVHDJ5D  IMS1       0    PART      ALTER INCOMPLETE

Example 17 for QUERY DB command

TSO SPOC input:
QUERY DB NAME(DB0*) SHOW(EXPORTNEEDED)
TSO SPOC output:
DBName   MbrName    CC TYPE     ExportNeeded                   
---------------------------------------------------------------
DB000001 IMS1        0          N                              
DB000002 IMS1        0          Y      
OM API input:
CMD(QUERY DB SHOW(EXPORTNEEDED))
OM API output:
<imsout>                                                    
<ctl>                                                       
<omname>OM1OM   </omname>                                   
<omvsn>1.7.0</omvsn>                                        
<xmlvsn>20</xmlvsn>                                         
<statime>2014.337 22:30:51.302415 22:30:51</statime>
<stotime>2014.337 22:30:51.302792</stotime>
<staseq>CE267AE1EFA0F110</staseq>
<stoseq>CE267AE1EFB88990</stoseq>
<rqsttkn1>1234            </rqsttkn1> 
<rc>00000000</rc><rsn>00000000</rsn>                         
</ctl>
<cmd>
<master>IMS1    </master>  
<userid>USRID01 </userid>  
<verb>QRY </verb>          
<kwd>DB              </kwd>              
<input>QUERY DB NAME(DB%0000%) SHOW(EXPORTNEEDED) </input> 
</cmd>   
<cmdrsphdr>                                                 
<hdr slbl="DB" llbl="DBName" scope="LCL" sort="a" key="1"
 scroll="no" len="8" dtype="CHAR" align="left" skipb="no" />
<hdr slbl="AREA" llbl="AreaName" scope="LCL" sort="a" key="4"
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />
<hdr slbl="PART" llbl="PartName" scope="LCL" sort="a" key="5"
 scroll="no" len="8" dtype="CHAR" align="left" skipb="yes" />
<hdr slbl="MBR" llbl="MbrName" scope="LCL" sort="a" key="3"
 scroll="no" len="8" dtype="CHAR" align="left" skipb="no" />
<hdr slbl="CC" llbl="CC" scope="LCL" sort="n" key="0"
 scroll="yes" len="4" dtype="INT" align="right" skipb="no" />
<hdr slbl="CCTXT" llbl="CCText" scope="LCL" sort="n" key="0"
 scroll="yes" len="*" dtype="CHAR" align="left" skipb="yes" />
<hdr slbl="TYP" llbl="TYPE" scope="LCL" sort="n" key="0"
 scroll="yes" len="8" dtype="CHAR" align="left" skipb="no" />
<hdr slbl="EXPN" llbl="ExportNeeded" scope="LCL" sort="y" key="0"
 scroll="yes" len="1" dtype="CHAR" align="left" />
</cmdrsphdr>                                           
<cmdrspdata>
<rsp>DB(DBR00001) MBR(IMS1    ) CC(   0) TYP(        ) EXPN(Y) </rsp>
<rsp>DB(DB000002) MBR(IMS1    ) CC(   0) TYP(        ) EXPN(Y) </rsp>
</cmdrspdata>             
</imsout>
Start of change

Example 18 for QUERY DB command

TSO SPOC input:
QUERY DB NAME(PSSH1VA) SHOW(DEFNTYPE)
TSO SPOC output:

DBName    MbrName    CC    DEFNTYPE
PSSH1VA   IMS1        0    PGMCREAT 
    
End of change