Databases Reference
In-Depth Information
field area(s) so that, upon restart, your program may continue to add more
data to these values.
Restart Call
This should be the first IMS call in your program. It serves to determine
whether to continue processing as a normal (cold start) or to restart the
program from a post ABEND state (warm start). Following the call, your
program should test for SPACES in the Checkpoint ID field. If found then a
normal start is performed. If not, then a restart is done. Regardless of
which logic path is chosen, the majority of your program's initialize logic
should be always followed. For example, control card files for Checkpoint
frequency should be opened and read. Initialization of working storage
area done. Transaction control flags set. There are, however, a few items
that require your consideration.
Normal Start Paragraph
1. Initialize the Checkpoint Id field, for example
. IMS expects
your program to take unique checkpoints. Follow your company
standards. For example, we use an 8-byte field, made up of a 4-byte
character name and a 4-byte counter field. Your program updates
the counter field by one before it takes each checkpoint. Thus, it is
possible to restart the program back at any of the checkpoints that
have been taken. Of course, you would normally want to restart at
the last checkpoint.
2. Initialize any Save-Area fields. This is where you get the date field,
set any summary fields to zero. If the transaction records driving
your batch process come from a DB2 Fetch, make sure that any host
fields used in the SQL DECLARE's WHERE clause to guarantee repo-
sitioning during a restart are set to appropriate low-values.
3. If the transaction records driving the batch process come from a
sequential file then you must access this file as an IMS GSAM data-
bases. You want to use IMS because the RESTART call automatically
repositions GSAM databases.
PCIP0000
In COBOL, this means replacing the usual READ and WRITE com-
mands with IMS GN and ISRT calls. The file should also be deleted
from the FD section, etc. Please note that GSAM databases do not
need to be explicitly opened. However, if you wish to insert this
code, do so here.
4. Sequential output files, such as report files, must also be accesses as
IMS GSAM databases. This is because IMS automatically repositions
GSAM databases during a restart. Again, GSAM databases do not
need to be explicitly opened.
Search WWH ::




Custom Search