Ims DB Courseware Mainframes Online Training
Ims DB Courseware Mainframes Online Training
Ims DB Courseware Mainframes Online Training
Objectives
• To create awareness about the IMS DB
technology and how it is used to
perform data base operations.
• Target audience :- people who are
relatively new to the IMS DB
Technology.
Prerequisites
• Knowledge of COBOL
• Basic knowledge of data base management concepts
Course Outline
1. An Introduction to DL/I Data Bases
2. DL/I Programs and Control Blocks
3. COBOL Basics for Processing a DL/I Data Base
4. Segment Search Arguments : How to use them
5. Data retrieval from an IMS Data Base
6. Adding and Updating Data to a Data Base
7. Secondary Indexing
8. Logical Data Bases
9. Recovery and Restart
10. DL/I Data Base Organizations
11. Advanced DL/I features
References
• IMS for the COBOL Programmer
DL/I supports hierarchies that are difficult to implement with standard files.
Why a data base management system?
01 VENDOR-RECORD.
05 VR-VENDOR-CODE PIC X(3).
05 VR-VENDOR-NAME PIC X(30).
05 VR-VENDOR-ADDRESS PIC X(30).
05 VR-VENDOR-CITY PIC X(17).
05 VR-VENDOR-STATE PIC XX.
05 VR-VENDOR-ZIP-CODE PIC X(9).
05 VR-VENDOR-TELEPHONE PIC X(10).
05 VR-VENDOR-CONTACT PIC X(30).
Fig 1.2.a Record layout for the VENDORS data set
01 INVENTORY-RECORD.
05 IR-ITEM-KEY.
10 IR-VENDOR-CODE PIC X(3).
10 IR-NUMBER PIC X(5).
05 IR-DESCRIPTION PIC X(35).
05 IR-UNIT-PRICE PIC S9(5)V99 COMP-3.
05 IR-AVG-UNIT-COST PIC S9(5)V99 COMP-3.
05 IR-LOCATION-QUANTITY-DATA OCCURS 20 TIMES.
10 IR-LOCATION PIC X(3).
10 IR-QUANTITY-ON-HAND PIC S9(7) COMP-3.
10 IR-REORDER-POINT PIC S9(7) COMP-3.
10 IR-QUANTITY-ON-ORDER PIC S9(7) COMP-3.
10 IR-LAST-REORDER-DATE PIC X(6).
Fig 1.2.b Record layout for the Inventory Master data set
Item
Stock Location
Customer
Ship-to
Vendor
Stock Location
Payment Adjustment Line Item
Fig 1.7 A logical relationship can connect two data bases
– In Fig 1.7, the line item segment is the logical child segment (or just logical child) of the item
segment.
– Likewise, the item segment is the logical parent segment (or just logical parent) of the line item
segment
•
Basic DL/I Data Base Processing
Sequential Processing
– Top –> Down, Left -> Right
– Position
• At any point, a program has a position in the data base.
• Position reflects not only on retrieved segments, but on new segments inserted as well
Vendor 1 Vendor 2
Item 1
Item 2 Data base Record 2
Item 1
Loc 2 Loc 2
Data base Loc 1 Loc 1
Record 1
Loc 5
Loc 4
Loc 3
Loc 2
Loc 1
Fig 1.8 Sequential processing
Basic DL/I Data Base Processing
• Random (Direct) Processing
(contd.)
– Key (sequence) field required
– Concatenated Key
• Completely identifies the path from the root segment to the segment you want to
retrieve.
Vendor 1 Vendor 2
Item 1
Item 2 Data base Record 2
Item 1
Loc 2 Loc 2
Data base Loc 1
Loc 1
Record 1
Concatenated Key:
Loc 5
Vendor 2
Loc 4 Item 1
Loc 3 Location 1
Loc 2
Loc 1 Fig 1.9 Random Processing
Module 2
DL/I Programs and Control Blocks
The IMS Software Environment
How DL/I relates to your application programs
Control Blocks
DBDGEN
PSBGEN
IMS Processing Options
ACB & ACBGEN
Running an application program under DL/I
The IMS Software Environment
Application
Programs
DL/I
OS
Data Base
DL/I
C Character
P Packed decimal
Z Zoned decimal
X Hexadecimal
H Half word Binary
F Full word Binary
Fig 2.5 Assembler source listing for the Inventory data base load program’s PSBGEN
• Application program is invoked under the control of the batch initialization module
• DLITCBL => ‘DL/I to COBOL’ is the entry point to the program
• DL/I supplies the address of each PCB defined in the program’s PSB
• PCBs must be defined in the Linkage Section
• Linkage Section definition of a PCB is called a ‘PCB Mask’
• Addressability to PCBs established by listing the PCB Masks on the ENTRY
statement
• PCB masks should be listed on the ENTRY statement in the same sequence as they appear in
your program’s PSBGEN
• GO BACK Statement
– When a program ends, it passes control back to the DL/I
– DL/I reallocates resources and closes the data base data sets
The DL/I Call
• CALL statements are used to request DL/I services
• Parameters you code on the CALL statement specify, among other things, the
operation you want DL/I to perform
• CBLTDLI => ‘COBOL to DL/I’, is an interface module that is link edited with your
program’s object module
• PLITDLI, ASMTDLI are other options
The DL/I Call (contd.)
• The DL/I Function
– First parameter coded on any DL/I call
– Four character working storage field containing the function code
01 DLI-FUNCTIONS.
05 DLI-GU PIC X(4) VALUE ‘GU ’.
05 DLI-GHU PIC X(4) VALUE ‘GHU ’.
05 DLI-GN PIC X(4) VALUE ‘GN ’.
05 DLI-GHN PIC X(4) VALUE ‘GHN ’.
05 DLI-GNP PIC X(4) VALUE ‘GNP ’.
05 DLI-GHNP PIC X(4) VALUE ‘GHNP’.
05 DLI-ISRT PIC X(4) VALUE ‘ISRT’.
05 DLI-DLET PIC X(4) VALUE ‘DLET’.
05 DLI-REPL PIC X(4) VALUE ‘REPL’.
05 DLI-CHKP PIC X(4) VALUE ‘CHKP’.
05 DLI-XRST PIC X(4) VALUE ‘XRST’.
05 DLI-PCB PIC X(4) VALUE ‘PCB ’.
The DL/I Call (contd.)
– Get functions
• First six 05-level items in Fig 3.3
• Used to retrieve segments from a DL/I data base
• GU ‘get unique’ function causes DL/I to retrieve a specific segment
occurrence based on field values that you specify
• GN ‘get next’ function used to retrieve segment occurrences in
sequence
• GNP ‘get next within parent’ function lets you retrieve segment
occurrences in sequence, but only subordinate to an established parent
segment
• The three get function codes that contain an H are ‘get hold functions’
and are used to specify an intent to update a segment after you retrieve it
• GHU or the ‘get hold unique’ function corresponds to GU
• GHN or the ‘get hold next’ function corresponds to GN
• GHNP or the ‘get hold next within parent’ function corresponds to GNP
– Update functions
The DL/I Call (contd.)
– Other functions
• Functions CHKP (the ‘checkpoint’ function) and XRST (the ‘restart’
function) are used in programs to take advantage of IMS’s recovery and
restart features
• Function PCB is used in CICS programs
• Function SYNC is used for releasing resources that IMS has locked for the
program (applicable only in a BMP)
• Function INIT allows an application to receive status codes
regarding deadlock and data availability (from DB PCBs)
The DL/I Call (contd.)
• PCB mask
– A qualified SSA
• Combines a segment name with additional information that specifies the
The PCB Mask
• For each data base your program accesses, DL/I maintains an area of storage called
the program communication block (PCB)
• Masks are defined for those areas of storage in the Linkage Section of your
program
01 INVENTORY-PCB-MASK.
05 IPCB-DBD-NAME PIC X(8).
05 IPCB-SEGMENT-LEVEL PIC XX.
05 IPCB-STATUS-CODE PIC XX.
05 IPCB-PROC-OPTIONS PIC X(4).
05 FILLER PIC S9(5) COMP.
05 IPCB-SEGMENT-NAME PIC X(8).
05 IPCB-KEY-LENGTH PIC S9(5) COMP.
05 IPCB-NUMB-SENS-SEGS PIC S9(5) COMP.
05 IPCB-KEY PIC X(11).
– Qualified
– Unqualified
• An unqualified SSA simply names the type of segment you want to use
• A qualified SSA specifies not only the segment type, but also a specific occurrence
of it
01 UNQUALIFIED-SSA.
*
05 UNQUAL-SSA-SEGMENT-NAME PIC X(8).
05 FILLER PIC X VALUE SPACE.
*
• Alternatively, you can code the segment name as a literal when you define a
qualified SSA
Basic Qualified SSA
01 VENDOR-SSA.
*
05 FILLER PIC X(9) VALUE ‘INVENSEG(’.
05 FILLER PIC X(10) VALUE ‘INVENCOD =’.
05 VENDOR-SSA-CODE PIC X(3).
05 FILLER PIC X VALUE ‘)’.
*
Fig 4.2 A basic qualified SSA
• A qualified SSA lets you specify a particular segment occurrence based on a condition
that a field within the segment must meet
• The first eight characters of a basic qualified SSA is the eight character segment name
• The ninth byte is a left parenthesis
• Immediately following the left parenthesis in positions 10 through 17 is an eight
character field name
Basic Qualified SSA (contd.)
• After the field name, in positions 18 and 19, you code a two-character relational
operator to indicate the kind of checking DL/I should do on the field in the
segment
• After the relational operator, you code a variable field into which you move the
Command Codes
01 UNQUALIFIED-SSA.
*
05 UNQUAL-SSA-SEGMENT-NAME PIC X(8).
05 FILLER PIC X VALUE “*”.
05 UNQUAL-SSA-COMMAND-CODE PIC X.
05 FILLER PIC X VALUE SPACE.
*
Command Codes (contd.)
Command Code Meaning
C Concatenated Key
D Path Call
F First Occurrence
L Last Occurrence
N Path Call Ignore
P Set Parentage
Q Enqueue Segment
U Maintain position at this level
01 UNQUALIFIED-SSA.
*
05 UNQUAL-SSA-SEGMENT-NAME PIC X(8).
05 FILLER PIC X VALUE “*”.
05 UNQUAL-SSA-COMMAND-CODE PIC X VALUE “-”.
05 FILLER PIC X VALUE SPACE.
*
Path Call
• A DB call with an SSA that includes the 'D' Command code is a "PATH CALL“ . It’s a
facility where in we can retrieve an entire path of the segment
• Consider a sample GU call
CALL 'CBLTDLI' USING DLI-GU
INVEN-PCB-MASK
INVEN-STOCK-LOC-SEG
VENDOR-SSA
ITEM-SSA
STOCK-LOC-SSA
Normally, DL/I operates on the lowest level segment that is specified in an
SSA(STOCK-LOC-SSA in the above E.g.)
• In case if we need data from not just from the lowest level but from other levels as
well we normally have to give 3 separate GU calls.This will reduce the efficiency of
the program
• Such a call operates on two or more segments rather than just one segment.
• If a program has to use "Path call" then "P" should be one of the values specified
in the PROCOPT parameter of the PCB in the programs PSBGEN.
• If path call is not explicitly enabled in the PSBGEN job there will be an 'AM' status
code.
•
Multiple Qualifications
There are two cases in which you would use multiple qualification
– When you want to process a segment based on the
contents of two or more fields within it
– When you want to process a segment based on a
range of possible values for a single field
• To use multiple qualification, you connect two or more qualification statements (a field
name, a relational operator, and a comparison value) within the parentheses of the
SSA.
• To connect them, you use the Boolean operators AND and OR
• Either of the two symbols shown in the table below may be used for AND or OR
• The independent AND operator is used for special operations with secondary indexes
and will be discussed later
Multiple Qualifications (contd.)
01 VENDOR-SSA.
*
05 FILLER PIC X(9) VALUE ‘INVENSEG(’.
05 FILLER PIC X(10) VALUE ‘INVENCOD>=’.
05 VENDOR-SSA-LOW-CODE PIC X(3).
05 FILLER PIC X VALUE ‘&’.
05 FILLER PIC X(10) VALUE ‘INVENCOD<=’.
05 VENDOR-SSA-HIGH-CODE PIC X(3).
05 FILLER PIC X VALUE ‘)’.
• The above SSA, which uses multiple qualifications can be used to retrieve vendor
segments whose vendor codes fall within a certain range
Item 2
Established Item 1
Parent
Loc 2
Loc 1
Loc 5 Established
Vendor 1
Loc 4 Parent
Loc 3
Loc 2 Item 2
Loc 1
Item 1
Loc 2
Loc 1
Fig 5.1 Sequential retrieval with GNP call
Loc 5
Loc 4
Loc 3
Loc 2
Loc 1
Status Codes you can expect during
Sequential Processing
Using Command Codes with
Retrieval Calls
• The F command code
– When you issue a call with an SSA that includes
the F command code, the call processes the first
occurrence of the segment named by the SSA,
subject to the call’s other qualifications
– Can be used when you are doing sequential
processing and you need to back up in the data
base, or in other words, the F command code can
be used for sequential retrieval using GN and GNP
calls
– Meaningless with GU calls, because GU normally
retrieves the first segment occurrence that meets
the criteria you specify
Using Command Codes with
–
Retrieval Calls
The usage of the D command code is illustrated below
01 VENDOR-SSA.
05 FILLER
(contd.)
PIC X(11) VALUE “INVENSEG*D(”.
05 FILLER PIC X(10) VALUE “INVENCOD =”.
05 VENDOR-SSA-CODE PIC X(3).
05 FILLER PIC X VALUE “)”.
*
01 ITEM-SSA.
05 FILLER PIC X(11) VALUE “INITMSEG*D(”.
05 FILLER PIC X(10) VALUE “INITMNUM =”.
05 ITEM-SSA-NUMBER PIC X(5).
05 FILLER PIC X VALUE “)”.
*
01 LOCATION-SSA.
05 FILLER PIC X(11) VALUE “INLOCSEG*D(”.
05 FILLER PIC X(10) VALUE “INLOCLOC =”.
05 LOCATION-SSA-CODE PIC X(3).
05 FILLER PIC X VALUE “)”.
*
01 PATH-CALL-I-O-AREA.
05 INVENTORY-VENDOR-SEGMENT PIC X(131).
05 INVENTORY-ITEM-SEGMENT PIC X(48).
05 INVENTORY-STOCK-LOC-SEGMENT PIC X(21).
*
. . .
*
CALL “CBLTDLI” USING DLI-GU
INVENTORY-PCB-MASK
Using Command Codes with
Retrieval Calls
• The C command code
(contd.)
– If you are developing a program that retrieves just
lower-level segment occurrences from a data
base, you don’t have to code separate SSAs for
each level in the hierarchical path
– Instead you can use a single SSA with the C
command code
– Then, rather than coding a field name, relational
operator, and search value, you specify the
concatenated key for the segment you are
interested in
– An illustration of the use of the C command code
is shown below
Using Command Codes with
Retrieval Calls
• The P command code
(contd.)
– When you issue a GU or GN call, DL/I normally
establishes parentage at the lowest level segment
that is retrieved
– However, if you want to override that and cause
parentage to be established at a higher-level
segment in the hierarchical path, you can use the
P command code in its SSA
• The U command code
the
B11
same time
B12
Data base
Record 2
C22
B22 C21
B21
• If SSAs for vendor and item are initialized with the proper key values, DL/I inserts
the new segment occurrence in the correct position in the data base
• When you issue a fully qualified ISRT call like this, DL/I returns a status code of GE
if any segment occurrence you specify in an SSA isn’t present in the data base
• As a result, you can issue an ISRT call with qualified SSAs instead of first issuing GU
calls to find out if higher-level segments in the path are present
• By issuing one call instead of two (or more), you can save system resources
The ISRT Call (contd.)
• Where inserted segments are stored
01 HOSPITAL-SSA.
05 FILLER PIC X(19) VALUE 'HOSPITAL(HOSPNAME ='.
05 HOSPNAME-SSA PIC X(20).
05 FILLER PIC X VALUE ')'.
01 WARD-SSA.
05 FILLER PIC X(19) VALUE 'WARD (WARDNO ='.
05 WARDNO-SSA PIC X(04).
05 FILLER PIC X VALUE ')'.
01 PATIENT-SSA.
05 FILLER PIC X(19) VALUE 'PATIENT (PATNAME ='.
05 PATNAME-SS PIC X(20).
05 FILLER PIC X VALUE ')'.
01 UNQUAL-HOSPITAL-SSA PIC X(9) VALUE 'HOSPITAL '.
01 UNQUAL-WARD-SSA PIC X(9) VALUE 'WARD '.
01 UNQUAL-PATIENT-SSA PIC X(9) VALUE 'PATIENT '.
01 WS-ISRT PIC X(4) VALUE 'ISRT'.
01 WS-GHU PIC X(4) VALUE 'GHU '.
01 HOSP-I-O-AREA.
05 HOSP-NAME PIC X(20).
Sample Program (contd.)
01 PATIENT-I-O-AREA.
03 PATIENT-NAME PIC X(20).
03 PATIENT-ADDRESS PIC X(30).
03 PATIENT-PHONE PIC X(10).
03 BEDINDENT PIC X(4).
03 DATEADMT PIC X(8).
03 PREV-STAY-FLAG PIC X.
LINKAGE SECTION.
01 PCB-MASK.
02 DBD-NAME-1 PIC X(8).
02 SEG-LEVEL-1 PIC XX.
02 STATUS-CODE-1 PIC XX.
02 PROCESS-OPTIONS-1 PIC X(4).
02 KEY-LENGTH PIC S9(5) COMP.
02 SEG-NAME-FDBK-1 PIC X(8).
02 LENGTH-FB-KEY-1 PIC S9(5) COMP.
02 NUMB-SENS-SEGS-1 PIC S9(5) COMP.
02 KEY-FB-AREA-1 PIC X(26).
PROCEDURE DIVISION.
ENTRY 'DLITCBL' USING PCB-MASK.
PERFORM INSERT-HOSP-PARA THRU INSERT-HOSP-EXIT.
PERFORM INSERT-WARD-01-PARA THRU INSERT-WARD-01-EXIT.
PERFORM INSERT-PATIENTS-PARA THRU INSERT-PATIENTS-EXIT.
GOBACK.
INSERT-HOSP-PARA.
MOVE 'MACNEAL ‘ TO HOSP-NAME.
MOVE 'ABC DDDD' TO HOSP-ADDRESS.
MOVE '12345' TO HOSP-PHONE.
CALL 'CBLTDLI' USING WS-ISRT
PCB-MASK
HOSP-I-O-AREA
UNQUAL-HOSPITAL-SSA.
Sample Program (contd.)
IF STATUS-CODE-1 NOT EQUAL SPACES
EXIT.
INSERT-HOSP-EXIT.
EXIT.
INSERT-WARD-01-PARA.
MOVE '01' TO WARD-NO.
MOVE 10 TO TOT-ROOMS.
MOVE 20 TO TOT-BEDS.
MOVE '03' TO BEDAVAIL
MOVE 'INTENSIVE' TO WARD-TYPE.
CALL 'CBLTDLI' USING WS-ISRT
PCB-MASK
WARD-I-O-AREA
UNQUAL-HOSPITAL-SSA
UNQUAL-WARD-SSA.
IF STATUS-CODE-1 NOT EQUAL SPACES
EXIT.
INSERT-WARD-01-EXIT.
EXIT.
INSERT-PATIENTS-PARA.
MOVE 'MACNEAL' TO WARDNO-SSA.
MOVE 'JOHN SMITH' TO PATIENT-NAME.
MOVE '123 HAMILTON STR' TO PATIENT-ADDRESS.
MOVE '12345 ' TO PATIENT-PHONE.
MOVE '1111' TO BEDINDENT.
MOVE '02021999' TO DATEADMT.
MOVE 'N' TO PREV-STAY-FLAG.
CALL 'CBLTDLI' USING WS-ISRT
PCB-MASK
PATIENT-I-O-AREA
HOSPITAL-SSA
WARD-SSA
UNQUAL-PATIENT-SSA.
Module 7
Secondary Indexing
The Need for Secondary Indexing
A Customer Data Base
Secondary Indexes
Secondary Keys
Secondary Data Structures
DBDGEN Requirements for Secondary Indexes
PSBGEN Requirements for Secondary Indexing
Indexing a Segment based on a Dependent Segment
The Independent AND Operator
Sparse Sequencing
Duplicate Data Fields
The Need for Secondary Indexing
• Often you need to be able to access a data base in an order other than its primary
hierarchical sequence
• Or, you may need to access a segment in a data base directly, without supplying its
complete concatenated key
• With secondary indexing both are possible
A Customer Data Base
Customer
Ship-to
Buyer Receivable
Fig 7.2 Segment Layouts for the Customer Data Base (Part 2 of 2)
Customer Data Base
Secondary Indexes Secondary Index
Data Base
Invoice number index data base
Prefix Data
Customer
Rec. Seg. Invoice Index
Addr. No. Pointer
Segment
Ship-to
Fig 7.3 Secondary Indexing Example in which the Index Source Segment and the Index Target Segment are the same
•
Secondary Indexes (contd.)
DL/I maintains the alternate sequence by storing pointers to segments of the indexed
data base in a separate index data base
• A secondary index data base has just one segment type, called the index pointer
segment
• The index pointer segment contains two main elements– a prefix element and a data
element
• The data element contains the key value from the segment in the indexed data base
over which the index is built, called the index source segment
• The prefix part of the index pointer segment contains a pointer to the index target
segment– the segment that is accessible via the secondary index
• The index source and target segments need not be the same
• After a secondary index has been set up, DL/I maintains it automatically as changes are
made to the indexed data base– though the index is transparent to application
programs that use it
Receivable
Customer Buyer
Fig 7.4 Secondary Data Structure for the Secondary Index
Secondary Data Structures (contd.)
• Secondary data structures don’t change the way the data base segments are
stored on disk
Fig 7.5 Partial DBDGEN output for the customer data base showing the code to implement the secondary index
DBDGEN Requirements for
Secondary Indexes (contd.)
Fig 7.6 DBDGEN output for the Secondary Index Data Base
• In the DBDGEN for the indexed data base, an LCHILD macro relates an index target segment to its
associated secondary index data base
• In the DBDGEN for the secondary index data base, an LCHILD macro relates the index pointer
segment to the index target segment
DBDGEN Requirements for
Secondary Indexes (contd.)
• ACCESS=INDEX in the DBD macro in Fig 7.6 tells DL/I that an index data base is
being defined
• The INDEX parameter of the LCHILD macro in Fig 7.6 specifies the name of the
secondary key field– CRRECXNO
• The XDFLD macro in Fig 7.5 supplies a field name (CRRECXNO) that is used to
access the data base via the secondary key
Buyer Receivable
Index Source
Segment
Payment Adjustment Line Item
01 ITEM-SELECTION-SSA.
*
05 FILLER PIC X(9) VALUE ‘CRCUSSEG(’.
05 FILLER PIC X(10) VALUE ‘CRLINXNO =’.
05 SSA-ITEM-KEY-1 PIC X(8).
05 FILLER PIC X VALUE ‘#’.
05 FILLER PIC X(10) VALUE ‘CRLINXNO =’.
05 SSA-ITEM-KEY-2 PIC X(8).
05 FILLER PIC X VALUE ‘)’.
•
Sparse Sequencing
When the DBA implements a secondary index data base with sparse sequencing (also
called sparse indexing), it is possible to omit some index source segments from the
index
• Sparse sequencing can improve performance when some occurrences of the index
source segment must be indexed but others need not be
• DL/I uses a suppression value, a suppression routine, or both to determine whether a
segment should be indexed (either when inserting a new segment or processing an
existing one)
• If the value of the sequence field(s) in the index source segment matches a suppression
value specified by the DBA, no index relationship is established (for an insert) or
expected (for any other call)
• The DBA can also specify a suppression routine that DL/I invokes to determine the index
status for the segment
• The suppression routine is a user-written program that evaluates the segment and
determines whether or not it should be indexed
• Note:
– When sparse indexing is used, its functions are
handled by DL/I
– You don’t need to make special provisions for it in
Duplicate Data Fields
• For some applications, it might be desirable to store user data from the index
source segment in the index pointer segment
• When the DBA specifies that some fields are duplicate data fields, this is possible
• Up to five data fields can be stored in the index data base, and DL/I maintains
them automatically
• Duplicate data fields are useful only when the index data base is processed as a
separate data base
• Note:
SEG-1
DB1
PP Physical
Parent
Logical Parent
LP
******DBD2*******
.
.
.
6 SEGM NAME=LP, PARENT=SEG-1, BYTES=48
7 LCHILD NAME= (RLC,DBD1), POINTER=PTR, PAIR=VLC
8 FIELD NAME=********************************
9 FIELD NAME=********************************
10 FIELD NAME=********************************
Module 9
Recovery and Restart
Introduction to Data Base Recovery
Introduction to Checkpointing
Types of Checkpointing
Extended Restart
Database Image Copy
Introduction to Data Base Recovery
• The process of recovering the data base in case of application program failure
• Back out changes made by the abended program, correct the error and rerun the
program.
• Types of recoveries
– Forward recovery
– Backward recovery
• Forward Recovery
– Basic checkpointing
– Symbolic checkpointing
• Basic checkpointing
• Disadvantage:
– TP PCBs First
– DB PCBs Second
– GSAM PCBs Last
• A sample PSB is shown below
PCB TYPE=TP,NAME=OUTPUT1
PCB TYPE=DB,DBDNAME=PARTMSTR,PROCOPT=A,KEYLEN=100
SENSEG NAME=PARTMAST,PARENT=0,PROCOPT=A
SENSEG NAME=CPWS,PARENT=PARTMAST,PROCOPT=A
PCB TYPE=GSAM,DBDNAME=REPORT,PROCOPT=LS
PSBGEN LANG=COBOL,PSBNAME=APPLPGM3
END
Thank You