Syntax and options of the DSN1LOGP control statement
The DSN1LOGP utility control statement, with its multiple options, defines the function that the utility job performs.
DSN1LOGP syntax diagram
.-RBAEND--(--FFFFFFFFFFFF--)-. >>-+-+------------------------+--+----------------------------+-+--> | '-RBASTART(hex-constant)-' '-RBAEND--(--hex-constant--)-' | | .-LRSNEND--(--FFFFFFFFFFFF--)-. | '-LRSNSTART(hex-constant)-+-----------------------------+----' '-LRSNEND--(--hex-constant--)-' .-DATAONLY--(NO)--. .-SYSCOPY--(NO)--. >--+-----------------+--+----------------+----------------------> '-DATAONLY--(YES)-' '-SYSCOPY--(YES)-' .------------------------. V | >--+--------------------+----+--------------------+-+-----------> '-DBID(hex-constant)-' '-OBID(hex-constant)-' .------------------------. .-----------------------. V | V | >----+--------------------+-+----+-------------------+-+--------> '-PAGE(hex-constant)-' '-RID(hex-constant)-' .------------------------. .------------------. V | V | >----+--------------------+-+----+--------------+-+-------------> '-URID(hex-constant)-' '-LUWID(luwid)-' >--+-------------------------------------------------------------+--> +-TYPE--(--hex-constant--)------------------------------------+ '-SUBTYPE--(--hex-constant--)--+----------------------------+-' '-| value/offset statement |-' .-SUMMARY--(NO)-----------------------. >--+-------------------------------------+--+-------------+---->< '-SUMMARY--(--+-YES--+--)--+--------+-' '-CHECK(DATA)-' '-ONLY-' '-FILTER-'
value/offset statement:
>>-VALUE/OFFSET--+-------------------------------------------+->< '-VALUE(hex-constant)--OFFSET(hex-constant)-'
Option descriptions
To run DSN1LOGP, construct a batch job. Include the utility name, DSN1LOGP, on the EXEC statement.
Specify keywords in up to 50 control statements in the SYSIN file. Each control statement can have up to 72 characters. To specify no keywords, either use a SYSIN file with no keywords following it, or omit the SYSIN file from the job JCL.
If you specify more than one keyword, separate them by commas. You can specify the keywords in any order. You can include blanks between keywords, and also between the keywords and the corresponding values.
- RBASTART(hex-constant)
- Specifies the hexadecimal log RBA from which to begin reading. If the value does not match the
beginning RBA of one of the log records, DSN1LOGP begins reading at the beginning RBA of the next
record. Specify this keyword only once in the job. Alternative spellings: STARTRBA, ST.
hex-constant is a hexadecimal value that consists of 1 to 12 characters (6 bytes); leading zeros are not required.
The default value is 0.
DB2® issues a warning if the value is not within the range of log records that is covered by the input log record information.
- RBAEND(hex-constant)
- Specifies the last valid hexadecimal log RBA to extract. If the specified RBA is in the middle
of a log record, DSN1LOGP continues reading the log in an attempt to return a complete log record.
To read to the last valid RBA in the log, specify RBAEND(FFFFFFFFFFFF). Specify this keyword only once in the job. Alternative spellings: ENDRBA, EN.
hex-constant is a hexadecimal value that consists of 1 to 12 characters (6 bytes); leading zeros are not required.
The default value is FFFFFFFFFFFF.
DB2 issues a warning if the value is not within the range of log records that is covered by the input log record information.
RBAEND can be specified only if RBASTART is specified.
- LRSNSTART(hex-constant)
- Specifies the log record sequence number (LRSN) from which to begin the log scan. DSN1LOGP
starts its processing on the first log record that contains an LRSN value that is greater than or
equal to the LRSN value that is specified on LRSNSTART. The default LRSN is the LRSN at the
beginning of the data set. Alternative spellings: STARTLRSN, STRTLRSN, and LRSNSTRT.
Specify this keyword only once in the job.
You must specify this keyword to search the member BSDSs and to locate the log data sets from more than one DB2 subsystem. You can specify either the LRSNSTART keyword or the RBASTART keyword to search the BSDS of a single DB2 subsystem and to locate the log data sets.
DB2 issues a warning if the value is not within the range of log records that is covered by the input log record information.
- LRSNEND(hex-constant)
Specifies the
LRSN value of the last log record that is to be scanned if LRSNSTART is also specified. If LRSNEND
is not specified, the LRSNEND value is either current end of the log (X'FFFFFFFFFFFF') or the LRSN value for
the end of the data
set.DSN1LOGP ends its processing on the last log record that contains an LRSN value that is greater than or equal to the LRSN value that is specified on LRSNEND.
An alternative spelling for LRSNEND is ENDLRSN.
Specify this keyword only once in the job.
DB2 issues a warning if the value is not within the range of log records that is covered by the input log record information.

- DATAONLY
- Limits the log records in the detail report to those records that represent data changes (such
as insert, page repair, and update space map).
The default value is DATAONLY(NO).
- (YES)
- Extracts log records for data changes only. For example, DATAONLY(YES), together with a DBID and OBID, reads only the log records that modified data for that DBID and OBID.
- (NO)
- Extracts all record types.
- SYSCOPY
- Limits the detail report to SYSCOPY log records.
The default value is SYSCOPY(NO).
- (YES)
- Includes only SYSCOPY log records in the detail report.
- (NO)
- Does not limit records to SYSCOPY records only.
- DBID(hex-constant)
- Specifies a hexadecimal database identifier (DBID). DSN1LOGP extracts only the records that are
associated with that DBID. Specify this keyword only once in the job.
hex-constant is a hexadecimal value that consists of one to 4 characters. Leading zeros are not required.
You can find the DBID in any of the following ways:- The DBID is displayed in many DB2 messages.
- You can find the DBID in the DB2 catalog for a specific object (for example, in the column that is named DBID of the SYSIBM.SYSTABLESPACE catalog table).
- When you select a DBID from a catalog table, the value is displayed in decimal format. Use the
SQL HEX function in a SELECT statement to convert a DBID to hexadecimal format. The following SQL
statements show this use of the HEX function:
SELECT NAME, DBNAME, HEX(DBID), HEX(PSID) FROM SYSIBM.SYSTABLESPACE WHERE NAME ='table space name' SELECT NAME, DBNAME, HEX(DBID), HEX(ISOBID) FROM SYSIBM.SYSINDEXES WHERE NAME ='index name' - You can use the DSN1PRNT utility to format the data sets for tables or indexes, and find the DBID in first 2 bytes of HPGOBID.
- OBID(hex-constant)
- Specifies a hexadecimal database object identifier, either a data page set identifier (PSID) or
an index page set identifier (ISOBID). DSN1LOGP extracts only the records that are associated with
that identifier.
hex-constant is a hexadecimal value that consists of one to 4 characters. Leading zeros are not required.
Whenever DB2 changes the data, the log record that describes the change identifies the database by DBID and the table space by page set ID (PSID). You can find the PSID column in the SYSIBM.SYSTABLESPACE catalog table.
You can also find a column that is named OBID in the SYSIBM.SYSTABLESPACE catalog table. That column contains the OBID of a file descriptor; do not confuse this value with the PSID, which is the information that you must include when you run DSN1LOGP.
Whenever DB2 changes an index, the log record that describes the change identifies the database (by DBID) and the index space (by index space OBID or ISOBID). You can find the ISOBID for an index space in the column that is named ISOBID in the SYSIBM.SYSINDEXES catalog table.
You can also find a column that is named OBID in the SYSIBM.SYSINDEXES catalog table. This column contains the identifier of a fan set descriptor; do not confuse this value with the ISOBID, which is the information that you must include when you run DSN1LOGP.
When you select either the PSID or the ISOBID from a catalog table, the value is displayed in decimal format. Use the SQL HEX function in your select statement to convert them to hexadecimal.
Alternatively, you can use the DSN1PRNT utility to format the data sets for tables or indexes, and find the PSID or ISOBID in the last 2 bytes of HPGOBID.
You can specify the OBID keyword up to 10 times for a single DSN1LOGP job. If
you specify OBID, you must also specify DBID.
- PAGE(hex-constant)
- Specifies a hexadecimal page number. When data or an index is changed, a recovery log record is
written to the log, identifying the object identifier and the page number of the changed data page
or index page. Specifying a page number limits the search to a single page; otherwise, all pages for
the combination of DBID and OBID are extracted. The log output also contains page set control log
records for the specified DBID and OBID, and system event log records, unless DATAONLY(YES) is also
specified.
hex-constant is a hexadecimal value that consists of a maximum of 8 characters.
You can specify a maximum of 100 PAGE keywords in a single DSN1LOGP job. You must also specify the DBID and OBID keywords that correspond to those pages.
The PAGE and RID keywords are mutually exclusive.
- RID(hex-constant)
- Specifies a record identifier, which is a hexadecimal value that consists of 10 characters, with
the first 8 characters representing the page number and the last 2 characters representing the page
ID map entry number. The option limits the log records that are extracted to those records that are
associated with that particular record. The log records that are extracted include the following
records:
- Those records that are directly associated with the RID, such as insert and delete
- The control records that are associated with the DBID and OBID specifications, such as page set open, page set close, set write, reset write, page set write, data set open, and data set close
You can specify a maximum of 40 RID keywords in a single DSN1LOGP job. You must also specify the DBID and OBID keywords that correspond to the specified records.
The PAGE and RID keywords are mutually exclusive.
- URID(hex-constant)
- Specifies a hexadecimal unit of recovery identifier (URID). Changes to data and indexes occur in
the context of a DB2 unit of recovery, which is identified on
the log by a BEGIN UR record. In the summary DSN1LOGP report, the URID is listed in the STARTRBA
field in message DSN1162I. In the detail DSN1LOGP report, look for the subtype of BEGIN UR; the URID
is listed in the URID field. Using the log RBA of that record as the URID value limits the
extraction of information from the DB2 log to that unit of
recovery.
hex-constant is a hexadecimal value that consists of 1 to 12 characters (6 bytes); leading zeros are not required.
You can specify a maximum of 10 URID keywords in a single DSN1LOGP job.
- LUWID(luwid)
- Specifies up to 10 LUWIDs that DSN1LOGP is to include information about in the summary report.
luwid consists of three parts: an LU network name, an LUW instance number, and a commit sequence number. If you supply the first two parts, the summary report includes an entry for each commit that is performed in the logical unit of work (within the search range). If you supply all three parts, the summary report includes an entry for only that LUWID.
The LU network name consists of a one- to eight-character network ID, a period, and a one- to eight-character network LU name. The LUW instance number consists of a period, followed by 12 hexadecimal characters. The last element of the LUWID is the commit sequence number of 4 hexadecimal characters, preceded by a period.
- TYPE(hex-constant)
- Limits the log records that are extracted to records of a specified type. The TYPE and SUBTYPE
options are mutually exclusive.
If you specify
TYPE, DSN1LOGP ignores the values that you specify for the other keywords except for RBASTART,
RBAEND, LRSNSTART, and LRSNEND.
hex-constant indicates the type, as follows:- Constant
- Description
- 2
- Page set control record
- 4
- SYSCOPY utility record
- 10
- System event record
- 20
- UR control record
- 100
- Checkpoint record
- 200
- UR-UNDO record
- 400
- UR-REDO record
- 800
- Archive quiesce record
- 1000 - 8000
- Assigned by the resource manager
- SUBTYPE(hex-constant)
- Restricts formatting to a particular subtype of unit of recovery undo and redo log records
(types 200 and 400). The TYPE and SUBTYPE options are mutually exclusive.
hex-constant indicates the subtype, as follows:
- Constant
- Description
- 1
- Update data page
- 2
- Format page or update space map
- 3
- Update space map bits
- 4
- Update to index space map
- 5
- Update to index page
- 6
- DBA table update log record
- 7
- Checkpoint DBA table log record
- 9
- DBD virtual memory copy
- A
- Exclusive lock on page set partition or DBD
- B
- Format file page set
- C
- Format index page set
- F
- Update by repair (first half if 32 KB)
- 10
- Update by repair (second half if 32 KB)
- 11
- Allocate or deallocate a segment entry
- 12
- Undo/redo log record for modified page or redo log record for formatted page
- 14
- Savepoint
- 15
- Other DB2 component log records that are written for RMID 14
- 17
- Checkpoint record of modified page set
- 19
- Type 2 index update
- 1A
- Type 2 index undo/redo or redo log record
- 1B
- Type 2 index change notification log record
- 1C
- Type 2 index space map update
- 1D
- DBET log record with exception data
- 1E
- DBET log record with LPL/GRECP data
- 65
- Change Data Capture diagnostic log
- 81
- Index dummy compensation log record
- 82
- START DATABASE ACCESS (FORCE) log record
The VALUE and OFFSET options must be used together. You can specify a maximum of 10 VALUE-OFFSET pairs. The SUBTYPE parameter is required when you specify the VALUE and OFFSET options.- VALUE(hex-constant)
- Specifies a value that must appear in a log record that is to be extracted.
hex-constant is a hexadecimal value that consists of a maximum of 64 characters and must be an even number of characters.
The SUBTYPE keyword must be specified before the VALUE option.
- OFFSET(hex-constant)
- Specifies an offset from the log record header at which the value that is specified in the VALUE
option must appear.
hex-constant is a hexadecimal value that consists of a maximum of 8 characters.
If you specify the OFFSET option, you must specify the SUBTYPE keyword.
- SUMMARY
- Summarizes all recovery information within the RBASTART and RBAEND specifications. You can use
summary information to determine what work is incomplete when DB2 starts. You cannot limit the output of the
summary report with any of the other options, except by using the FILTER option with a URID or LUWID
specification.
The default value is SUMMARY(NO).
- (YES)
- Generates both a detail and summary report.
- (NO)
- Generates only a detail report.
- (ONLY)
- Generates only a summary report.
- FILTER
- Restricts the summary report to include messages for only the specified URIDs and LUWIDs.
Specify this option only once.
The SUMMARY keyword must be specified before FILTER.
- CHECK(DATA)
- Specifies that DSN1LOGP is to check the specified range of data pages for page regression. Any page regression errors are displayed in the detail and summary reports.
