Create database data files and prime them for use.
The Zeroload function creates the database data files and primes them for use. The database data files contain the segment data and pointers for the database. A database must be Zeroloaded before an application can issue calls against it. An automatic Zeroload is performed by the IMSDBU Load function prior to loading the data. A Zeroload can also be performed by the stand-alone Zeroload utility or DBUTIL.
Warning: Zeroloading an existing database reinitializes the database and causes any data to be lost.
Syntax - Command Line
mfims imsdbu ZERO {database-name|filename}
[[NO]CLS]
[ECHO(keyword,msglvl,stoplvl
[[NO]INI(filespec)]
[[NO]LIST(filespec)]
[LISTOPEN(disp)]
[[NO]LOG(filespec)]
[PROGRESS(no-of-segments)]
Syntax - JCL
ZERO EXEC PGM=MFDBUJCL,PARM='ZEROLOAD,database-name'
//SYSOUT DD SYSOUT=*
Parameters - Command Line
- database-name
- The name of a database on which the function operates.
- filename
- The name of a file containing a list of databases on which the function operates.
- CLS
- Clears the screen before starting the utility. NOCLS prevents the initial clear screen and can be helpful when you are running a series of utilities in a command file.
- ECHO
- Controls the display of and interaction with the messages displayed by IMSDBU.
- Sub-parameters
-
keyword
|
The category of information displayed. One of the following:
- ALL
- Always displays processing messages, input source or detail information and the ending message. Warning and error messages are displayed and stop for user input if the message level is equal to or greater than the
msglvl and
stoplvl values.
- MSGS
- Always displays processing messages and the ending message. No source or detail information is displayed. Warning and error messages are displayed and stop for user input if the message level is equal to or greater than the
msglvl and
stoplvl values.
- ERREND
- Always displays the utility ending message. Warning and error messages are displayed and stop for user input if the message level is equal to or greater than the
msglvl and
stoplvl values.
- ENDMSG
- Displays ending message only if the utility ending return code is equal to or greater than
msglvl. A "Press any key to continue" message is displayed and stops for input if the utility ending return code is equal to or greater than the
stoplvl. Enter a
msglvl and/or
stoplvl value of zero to display and/or stop on every ending message.
- COND
- Both the warning/error and ending messages are conditional on the
msglvl and
stoplvl values. Warning and error messages are displayed and stop for user input if the message level is equal to or greater than the
msglvl and
stoplvl values. The ending message is displayed if the ending return code is equal to or greater than
msglvl. You see the message "Press any key to continue" which requires input if the utility ending return code is equal to or greater than the
stoplvl.
- ERRORS
- You see warning and error messages which require input if the message level is equal to or greater than the
msglvl and
stoplvl. You do not see the ending message.
|
msglvl
|
A value from 4 through 20 to indicate the severity of messages to display.1
|
stoplvl
|
A value from 4 through 20 to indicate the severity of messages to stop for user input.
1
|
1 Can take the following values:
Value
|
Category
|
Example Cause
|
4
|
General warning message
|
A minor coding error in DBD source which DBDGEN can make an assumption about and continue.
|
6
|
IMS specific warning message
|
A warning that a keyword or statement is not supported and is ignored - processing can continue.
|
8
|
General severe error
|
An incorrect coding in DBD source which cannot be compensated for, such as 'no DBD statement'.
|
10
|
IMS Option specific severe error
|
An unsupported feature was defined which cannot be compensated for, such as 'Exceeded some maximum'.
|
12
|
Severe error - possible temporary condition
|
A temporary I/O error such as a 'file locked' or 'database locked' status.
|
16
|
Severe error- permanent - likely installation problem
|
A permanent I/O error, such as an invalid data set name or member name, was input to a utility or an environment variable is not set correctly.
|
20
|
Severe error - permanent
|
An unrecoverable I/O error or some other unexpected error.
|
- INI
- Specifies the default directives file.
- Sub-parameter
-
filespec
|
The name and location of the
.INI file containing directives that override the IMSDBU programmed defaults.
|
- Syntax Rules
-
- filespec can include a drive and/or directory if required. If you do not specify a drive or directory, IMSDBU looks for the named
.INI file in the current directory.
- Directives listed in the
.INI file override the IMSDBU programmed defaults.
- Directives entered on the command line or interactive screen override directives in the
.INI file.
- Specifying
NOINI prevents any
.INI file from overriding the programmed defaults.
- If you specify an
.INI file that does not exist, the programmed default directives are used as if
NOINI were specified.
- General Rules
-
- An
.INI file is an ASCII text file containing a heading,
[IMSDBU] on line 1, starting in column 1, followed by a list of
mfims imsdbu directives; one directive per line. A line is terminated by a return or an end-of-file. Comment lines are indicated by an asterisk (*) or semi-colon (;) in column 1. For example:
[IMSDBU]
PROGRESS(1000)
;use local log
LOG(C:\MYDIR\MYDB.LOG)
- LIST
- Controls the location and name of the detail listing file, which includes items such as source listings, completion status, error messages and execution statistics.
- Sub-parameter
-
filespec
|
The name and location to use for the listing file.
|
- Syntax Rules
-
- filespec can include a drive and/or directory if required. If you do not specify a drive or directory, IMSDBU creates the listing file in the current directory.
- NOLIST suppresses the creation of the listing file.
- To specify a path, you can use the convention of placing a dollar sign ($) in front of the name of an environment variable that represents a path. For example,
LIST($ENVVAR\*.DOC) creates a list file of
dbdname.DOC in the directory named by the ENVVAR environment variable.
- Specifying
LIST(*.LST) or
LIST(*.RPT) causes the listing file to be created in the project listing directory.
- If no path is specified, the listing file is created in the current directory.
- If you specify the base name of
filespec as an asterisk (*), it is replaced by the DBD name; this allows IMSDBU to provide separate reports for functions that can operate on multiple databases. It also assists in maintaining historical detailed reports by DBD name.
- Specifying
LIST with no
filespec is equivalent to specifying
LIST(*.LST).
- LISTOPEN
- Controls the open disposition of the detail listing file.
- Sub-parameter
-
disp
|
The disposition to use. One of:
- NEW
- Creates a new listing file or overwrites an existing one.
- MOD
- Appends the list output to an existing file or creates a new listing if one does not exist. MOD allows you to maintain a detailed historical record of database functions.
|
- Syntax Rules
-
- LISTOPEN is ignored when NOLIST is specified.
- LOG
- Specifies the IMSDBU activity log, which shows the ending message status for each function.
- Sub-parameter
-
filespec
|
The name and location of the file to use as the IMSDBU activity log.
|
- Syntax Rules
-
- filespec can include a drive and/or directory if required. If you do not specify a drive or directory, the listing is created in the current directory.
- Specifying NOLOG suppresses the log file output.
- General Rules
-
- The log file is created if it does not exist.
- The log file is historical with the most recent entries written to the end of the file.
- As the log file grows in size over time, it might require deletion periodically.
- PROGRESS
- Controls the frequency of progress reporting.
- Sub-parameter
-
no-of-segments
|
A value between 0 and 9999 indicating the number of segments to process before displaying a progress message. 0 disables progress reporting.
|
- Syntax Rules
-
- We recommend that you do not reduce the number of segments specified to a value below its default of 200. Very small values measurably reduce the performance of the database function.
- For relatively fast systems, setting the value higher (such as to 1000 or larger) might improve performance slightly.
- General Rules
-
- The progress message could show the number of segments processed, or the percentage complete and an estimate of the time remaining.
Parameters - JCL
- database-name
- The name of a database on which the function operates.
Input
The input to a Zeroload function is the name of a primary physical DBD which has been defined using DBDGEN. A Zeroload is not required, and should not be run, for any other kinds of databases.
Exclusive use databases can be Zeroloaded. Shared read-only, Remote IMS, and User Exit databases cannot be Zeroloaded. An attempt to run a Zeroload for an incorrect Database Catalog type will result in an error.
An error message is issued if you attempt to Zeroload the following databases:
- The primary index for a HIDAM database. A primary index database is not required. The
.IDX component of an MFIMS database is the equivalent of a primary index.
- Secondary index databases. These are created automatically when Zeroloading the primary database they index. A secondary index DBD which defines non-unique keys must be genned before Zeroloading the primary database.
- Databases defined as ACCESS=LOGICAL. The physical databases contain the required pointers to support logical relationships.
- GSAM databases. See the GSAM topic for complete details for GSAM databases.
Output
The output from a Zeroload function is the set of data files for the primary database and any secondary indexes defined. Any database calls can be made against a Zeroloaded database. A PCB with processing option 'L' is not required to load an initial segment to a database.
Zeroload Database Names
After performing a Zeroload, the output
dbdname.DAT and
.IDX files are the initialized data files for the database segment data and segment pointers. Exclusive use database data files reside in the location indicated by the exclusive use setting in the IMS project settings. If not set, they will reside in the project
DATA directory. For Fileshare databases, the shared update IMS project setting names the Fileshare Server and optionally, a drive and/or directory.
The names for secondary index data files are the XDFLD's LCHILD name suffixed with both
.DAT and
.IDX. These files contain the secondary index key and pointer to the primary physical database. They reside in the same directory as the primary database files.
The database files may be copied, moved, renamed, or deleted using any standard operating system command or utility for manipulating files. These actions must be performed on both the
.DAT and
.IDX file components. The same actions should be applied to the
.DAT and
.IDX components for any secondary indexes. If a physical database is logically related to other databases, all of the files for the set of related databases must be acted on.
Example
DBD NAME=TEST01DD,
ACCESS=(HIDAM,VSAM)
SEGM NAME=TESTHDRS,PARENT=0,
BYTES=120
FIELD NAME=(SEQFIELD,SEQ,U),
BYTES=1,START=4
FIELD NAME=REQ,
BYTES=20,START=5
LCHILD NAME=(TESTHDRI,TEST01PD),PTR=INDX
LCHILD NAME=(TESTHDRX,TEST012D),PTR=INDX
XDFLD NAME=XSEQ,SRCH=REQ
The name input to Zeroload is TEST01DD. An attempt to Zeroload the primary index TEST01PD or the secondary index TEST012D will result in an error message.
The resulting database files for the primary database are
TEST01DD.DAT and
TEST01DD.IDX.
There is no 'special' data file for the primary index of a HIDAM database. The index is automatically included within these data files.
The resulting database files for the secondary index TEST012D are
TEST012D.DAT and
TEST012D.IDX.
If you copy this database to another directory, copy all four of these files. For deleting, backup, or other operations, perform the same action for each of these four files.