Db2-lc-slides03-fp2005-ver1.0

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Db2-lc-slides03-fp2005-ver1.0 as PDF for free.

More details

  • Words: 1,074
  • Pages: 67
DB2

Session Plan •

Precompilation



DBRM



Binding



Application Plan and Package



Program preparation summary



Demonstration of batch application in different modes



Working with CICS

Copyright © 2005, Infosys Technologies Ltd

2

ER/CORP/CRS/DB01/003 Version No:2.0a

Steps Involved in Program Preparation



Pre-compilation



Binding



Compilation



Linking



Execution

Copyright © 2005, Infosys Technologies Ltd

3

ER/CORP/CRS/DB01/003 Version No:2.0a

Precompilation Involves the following sequence of events. •

Syntax checking of SQL statements embedded in the host language.



Checking for datatype matches.



Commenting out the SQL statements and replacing it with equivalent COBOL CALL statements.



Creation of DBRM (Data base Request Module).

Copyright © 2005, Infosys Technologies Ltd

4

ER/CORP/CRS/DB01/003 Version No:2.0a

DBRM (Data base Request Module)

• A DBRM is a module containing SQL statements.

• A DBRM is stored as a member of a PDS.

Copyright © 2005, Infosys Technologies Ltd

5

ER/CORP/CRS/DB01/003 Version No:2.0a

Binding • Converts all the SQL statements to executables • Bind reads SQL statements from DBRM’s and produces a strategy to access data directed by the SQL statements. • Does the following • Checks the syntax SQL statements • Verification of authority on DB2 objects • Optimization of SQL statements to create the application plan

Copyright © 2005, Infosys Technologies Ltd

6

ER/CORP/CRS/DB01/003 Version No:2.0a

Application Plan • Is the executable form of one or more of one or more DBRMs and application package

• Should be generated every time a DBRM is modified.

• Application plans are kept in the buffer pool during program execution

Copyright © 2005, Infosys Technologies Ltd

7

ER/CORP/CRS/DB01/003 Version No:2.0a

Application Package •

Is the executable form of a single DBRM.



Is bound to an application plan with related packages.



If any DBRM is altered, then only the corresponding package needs rebinding.

Copyright © 2005, Infosys Technologies Ltd

8

ER/CORP/CRS/DB01/003 Version No:2.0a

Relationship between DBRM, Package and Plan PLAN

PACKAGE

PACKAGE

PACKAGE

DBRM1

DBRM2

DBRM3

Copyright © 2005, Infosys Technologies Ltd

9

DBRM4

ER/CORP/CRS/DB01/003 Version No:2.0a

Source Program

Program Preparation Summary Hostvariables copybook

DCLGEN

Precompile DBRM Catalog Tables

Modified Source program

Plans & packages Info

BIND

DB Objects Info

Packages Plans Bufferpool

Compile & Link

Load Module

Copyright © 2005, Infosys Technologies Ltd

10

Execution

ER/CORP/CRS/DB01/003 Version No:2.0a

Demonstration Program Preparation and Execution

Copyright © 2005, Infosys Technologies Ltd

11

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

12

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

13

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

14

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

15

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

16

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

17

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

18

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

19

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

20

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

21

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

22

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

23

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

24

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

25

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

26

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

27

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

28

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

29

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

30

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

31

ER/CORP/CRS/DB01/003 Version No:2.0a

Execution in Foreground Mode

Copyright © 2005, Infosys Technologies Ltd

32

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

33

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

34

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

35

ER/CORP/CRS/DB01/003 Version No:2.0a

Execution in EDITJCL Mode

Copyright © 2005, Infosys Technologies Ltd

36

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

37

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

38

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

39

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

40

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

41

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

42

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

43

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

44

ER/CORP/CRS/DB01/003 Version No:2.0a

Execution in BACKGROUND Mode

Copyright © 2005, Infosys Technologies Ltd

45

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

46

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

47

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

48

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

49

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

50

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

51

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

52

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

53

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

54

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

55

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

56

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

57

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

58

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

59

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

60

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

61

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

62

ER/CORP/CRS/DB01/003 Version No:2.0a

Copyright © 2005, Infosys Technologies Ltd

63

ER/CORP/CRS/DB01/003 Version No:2.0a

Working with CICS •

In CICS, every DBRM associated with a transaction must be put under one Plan.



The RCT (Resource Control Table) in CICS maintains TRANSID to PLAN NAME relationship. The Plan name for the transaction BXXY is PLNBLXXY.

Copyright © 2005, Infosys Technologies Ltd

64

ER/CORP/CRS/DB01/003 Version No:2.0a

What to do when a new Program in added? •

Create PCT, PPT and RCT entries (For CICS applications)



Pre-compile



Translate



Compile



Bind



Install new copies of all the programs

Copyright © 2005, Infosys Technologies Ltd

65

ER/CORP/CRS/DB01/003 Version No:2.0a

Summary •

Precompilation



DBRM



Binding



Application Plan and Package



Program preparation summary



Demonstration of batch application in different modes



Working with CICS

Copyright © 2005, Infosys Technologies Ltd

66

ER/CORP/CRS/DB01/003 Version No:2.0a

Thank You! Copyright © 2005, Infosys Technologies Ltd

67

ER/CORP/CRS/DB01/003 Version No:2.0a