DB2 requires either MVS/XA (extended architecture) or MVS/ESA (enterprise systems architecture) as the operating system. Both MVS/XA and MVS/ESA have a much larger amount of virtual storage than the other MVS operating system MVS/SP), which is no longer adequate for the newer releases of DB2. This is important because there is a strict correlation between the size of virtual storage and the number of users and transactions DB2 can support.
DB2 Environment Overview
There are three MVS host environments through which applications can access DB2 resources. They are TSO, CICS/VS, and IMS/VS, which are illustrated in Figure 44.2. A DB2 application running under IMS/VS or CICS/VS can access both DB2 data (via SQL statements) and IMS data (via DL/I calls). In addition, C1CS/DB2 applications can also access VSAM, ISAM, and DAM datasets. TSO is the work environment for DB2's interactive facilities, e.g., program preparation and execution panels, interactive database access tools, etc. DB2 data can be accessed from application program written in COBOL, PL/I, Fortran, Assembler, or C.
Online programs can run under the control of TSO, CICS, or IMS. Batch programs can run under TSO or IMS. This book assumes the CICS environment and COBOL for online applications and the TSO environment and COBOL for batch applications.
The various environments in which DB2 operates are:
All the above-mentioned DB2 application types can execute concurrently. They can even share the same DB2 databases. Another important aspect is that the various categories are not interchangeable. That is am application that is designed to run under IMS/DC cannot be moved to CICS without some coding changes to the portions of the application programs that interact with the transaction manager. The portions that perform the database operations are the same in all cases.
The Resource Limit Facility (RLF), or Governor, is provided to simplify the task of controlling DB2 resource usage. The DB2 Governor allows a site to limit, by user ID, plan, or both the amount of CPU time permitted for the execution of dynamic SQL statements. QMF's Governor, which already existed, is super ceded by it, thereby making the QMF Governor somewhat redundant for the MVS/DBB environment. When you access DB2 through QMF or SPUF1, you are actually initiating a dynamic SQL program. It is called dynamic SQL because the SQL statement in the program is not known until you type it in at the terminal and press Enter. Interactive queries carry the risk that an end user may submit a complex SQL query and slow the whole MVS system down to a halt. The Statements which you embed in your programs, do not have this exposure because the program can be tested for performance and CPU utilization first. By limiting CPU time for dynamic SQL statements, the DB2 Governor can have a major effect on maintaining your system's processing capabilities.
Incidentally, although you will often use dynamic SQL programs like SPUFI and QMF, you probably will not write dynamic SQL programs yourself very often. Its counterpart, static SQL, is far more common for application programming.
A DB2 subsystem is a copy of DB2 that runs on a CPU, complete with libraries. Catalog, and Directory. One CPU can have one or more DB2 subsystems running on it.
Distributed Data Facility
Distributed Data Facility (DDF) is available with version 2.2 of DB2 onwards. With DDF, a user connected to one DB2 subsystem can read and update data stored at another. The subsystem to which a user is connected is considered the local system; the other subsystems' from which data may be accessed are considered remote subsystems. A local remote subsystem may run on one computer or may run on two computers at different physical sites.
DB2 Attachments, DSN, and Threads
DB2 requires its own address space. Therefore, for each of the three possible MVS host environments, DB2 must provide services to manage the interface between the host address space and the DB2 address space. These services are called attachment facilities. The connection between DB2 and the host environment is implemented by link-editing a copy of the appropriate attach code (i.e., TSO, CICS, or IMS) to the host language program. In the case of TSO, a program goes through a further layer, DSN. DSN is the TSO command processor provided by DB2 to act as an interface between TSO and DB2. To submit a DB2 batch program, you submit JCL, which executes program IKJEFTOI, which is the TSO Terminal Monitor Program (TMP). TMP is, in effect, TSO itself. Control cards in the JCL then tell TSO to invoke DSN to run your DB2 program. Unlike the non-DB2 batch programs you are used to, you cannot submit your DB2 batch programs as MVS jobs; they must run under TSO TMP.
DB2 does, however, provide the Call Attach Facility (CAF) software, which makes it possible to access DB2 directly from MVS. CAF is used mostly by software vendors as the link to DB2 for their DB2-based products. You will not need to use CAF in your work. DB2 also provides an extensive collection of utility programs for database and system administrators and, to a lesser degree, applications programmers. These utilities execute as standard MVS batch jobs and use their own internal attach mechanisms to provide fast sequential access to data.
DB2's attachment facilities make the connection, or thread, from DB2 to other subsystems possible. A thread is started with the execution of the first SQL statement of an application. At any given moment, the number of active threads equals the number of users (programs, utilities, interactive users, etc.) accessing DB2. The maximum number of concurrent threads is set at installation time. If that number is exceeded, an application will wait until a thread becomes available.
Interactive Access to Data
Unlike non-relational DBMSs, DB2 provides access to the data interactively as well as from user-written programs. As we said earlier in the chapter, you will find this a big help when you are developing and testing a program. Interactive access to the data is possible from TSO through SPUFI or QMF. SPUFI (pronounced "Spoofy") stands for SQL Processor Using the Input. It is a subcomponent of DB2I (DB2 Interactive) and is provided with DB2. QMF (Query Management Facility) is a separate IBM product but is used in most DB2 installations.
Both SPUFI and QMF can be used interactively to process any type of SQL statement, although QMF is most often used for data retrieval only. While SPUFI does format its output, QMF offers sophisticated report formatting options and can be used as a report writer as well as a query tool. It is, in fact, increasingly being looked upon as a productivity tool to replace traditional report writing programs. Another difference between SPUFI and QMF is that SPUFI has been designed for technically proficient users (i.e., application programmers, database administrators, and system administrators) while QMF is intended for a broad spectrum of users, including end users. In our own work, we have found both to be very useful.
IBM Mainframe Related Interview Questions
|IBM Lotus Notes Interview Questions||IBM-CICS Interview Questions|
|COBOL Interview Questions||Linux Interview Questions|
|IBM-JCL Interview Questions||IBM Mainframe Interview Questions|
|IBM AIX Interview Questions||IBM WAS Administration Interview Questions|
|IBM Lotus Domino Interview Questions||IBM Integration Bus Interview Questions|
|Mainframe DB2 Interview Questions||Unix Production Support Interview Questions|
Ibm Mainframe Tutorial
Introduction To Software Development
Introduction To Ibm Mainframes
Tso And Ispf
Jes2, ]es3 And Sms
Introduction To Job Control Language (jcl)
The Job Statement
The Exec Statement
The Job And Exec Statements
The Dd Statement
Procedures And Symbolic Parameters
Generation Data Groups (gdg), Compile/link-edit And Run Jcls
Access Method Services (ams)
Additional Vsam Commands
Introduction To Rexx
Overview Of Rexx
Introduction To Cics
Exception Handling In Cics
Developing A Cics Application
Cics Programming Techniques
Basic Mapping Support (bms)
Transient Data Control
Temporary Storage Control
Interval And Task Control
Cics Application Design
Recovery And Restart
System Security And Intersystem Communication
Cics Debugging Facilities And Techniques
Bms Map Definition Macros And Copylib Members
Cics Response And Abend Codes
Data, Information And Information Processing
Introduction To Database Management Systems
Introduction To Relational Database Management Systems
Database Architecture And Data Modeling
Overview Of Db2
Structured Query Language (sql)
Data Security And Access
Db2 Application Development
Qmf And Db2i
Db2 Performance Monitoring, Utilities And Recovery/restart
Overview Of Information Management System (ims)
Introduction To Vs Cobol Ii
Overview Of Application Development In Vs Cobol Ii
Overview Of The Cobol Program
Sorting And Merging Files
Coding Cobol Programs That Run Under Cics. Ims, Db2 And Ispf
Compiling The Program
Link-editing The Program
Executing The Program
Improving Program Performance
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.