Showing posts with label IMS-Interview-Questions. Show all posts
Showing posts with label IMS-Interview-Questions. Show all posts

Mainframe IMS Interview Questions and Answers

1/20/2010 No Comment

IBM Mainframe IMS DB Interview Questions and Answers.

I need to load production size tables into a test region, should I have my indexes dropped before I load the tables, then request the indexes be recreated?
Answer : No. It is usually more efficient to define all indexes before using the LOAD utility. The LOAD utility uses an efficient algorithm to build the DB2 indexes.

In QMF, I only want the top ten rows from my QMF Query. What is the easiest way to do this?

Answer : Use the ROWLIMIT option on your RUN command: RUN queryname (ROWLIMIT=10

In QMF, how can I see what the Global Variables are set to?

Answer : Enter SHOW GLOBALS on the QMF command line.

How can I tell if my IMS database is broken?

Answer : Records in an IMS database are accessed by using pointers. There are forward and backward pointers in the data portion of the database. During update, insert, delete transaction that abends in-flight, pointers may become corrupted. An unload of the database using BMC Unload plus will tell you if you have pointer errors because this follows the forward pointer chain.

To recover from this situation you will need to go back to your last good image copy and recover. CICS or batch processing will have to be rerun or recovered with logs to get the data back to the point before the in-flight transaction abended. An image copy does NOT indicate if a database has invalid pointers.

What is the difference between an HDAM and HIDAM IMS database?

Answer : A HIDAM database uses a separate index file based on the keyfield of the root segment. This file contains the pointer information that points to the data record. An HDAM file has no separate index file, however, the key field for each record is put thru a randomizer which puts the record to a specific location in the database.

What does DBCTL do?

Answer : DBCTL is an address space, which accesses IMS files on behalf of CICS Transactions. IMS files, PSBs, DBDs, and ACBs are genned into DBCTL for file access. When a CICS program issues an IMS call, the IMS processing is transferred to DBCTL to be executed with a result set being sent back.

Explain what is the significance of a secondary index in IMS?

Answer : A secondary index is an alternate path into you IMS database. Fields from an IMS segment are put together to form a key into that segment. A secondary index file may be used as a file itself to get pertinent data.

I have an IMS program that currently reads and prints information from an IMS database. I now need to update the database from this program. What needs to be done apart from the program changes?

Answer : You need to request the DB group to change the segment sensitivity of the PSB. Also, if any different segments on the database need to be processed, we need to know so that the appropriate access may be granted.

Why do we need to code COMMITS in our batch programs?

Answer : You want to have commit statements in your programs because when you COMMIT you release locks held for that unit of work and allow for a new unit of work to Ans: begin. If you didn't code commits and your program abends well into the processing, instead of just trying to roll back a few inserts since the last commit it has to roll back all the inserts made during the entire run of the program. Usually figure about 2 to 2.5 times the amount of time to rollback that it took to get to the point of abend. There are some exceptions to the above rule.

How do I communicate with DB2?

Answer : There are three methods of communicating with DB2. They are static SQL, embedded dynamic SQL, or the Call Level Interface (CLI).
Static SQL: SQL statements, embedded within a program that are prepared during the program preparation process (before that program is executed). After being prepared, the SQL statement does not change (although values of host variables specified by the statement might change).
Dynamic SQL: SQL statements that are prepared and executed within an application program while the program is executed. In dynamic SQL, the SQL source is contained in host language variables rather than being coded into the application program. The SQL statement can change several times during the application program's execution.

CLI: A callable application program interface (API) for database access, which is an alternative to using embedded SQL. In contrast to embedded SQL, DB2 CLI does not require the user to precompile or bind applications, but instead provides a standard set of functions to process SQL statements and related services at run time.

What is a deadlock or timeout in DB2?

Answer : A deadlock occurs when two separate processes compete for resources held by one another. A timeout is caused by the unavailability of a given resource. The sqlcode for a deadlock is -911 or -913.

What is DRDA?

Answer : Distributed Relational Database Architecture (DRDA) is a connection protocol for distributed relational database processing that is used by IBM and vendor relational database products. DRDA comprises protocols for communication between an application and a remote relational database management system (RDBMS), and communication between RDBMSs. DRDA provides the connections for remote and distributed processing.

How do I find SQL performance problems prior to migrating programs to production?

Answer : SQL Performance analysis should start as early as possible in the development cycle. Performance problems can reside within the SQL statements itself as well as the access paths. Prior to moving to production, you should run an Explain on each program and the access paths should be checked for possible performance problems. The PLAN_TABLE identifies where work is being performed within each access path. You can also use Platinum's Plan Analyzer tool to do the Explain and get an interpreted report back instead of looking at the PLAN_TABLE entries and interpreting them manually.

How can I tell if my SQL statement is using an index?

Answer : Do an explain on the statement or program which will give details as to the access path the optimizer has chosen.

Why do we have to run runstats in our test environment?

Answer : If you don't the catalog columns will have default values in them, which may not reflect the real picture. By using the default values the DB2 optimizer will not pick the best access path.

IMS DB Interview Questions Answers

1/17/2010 No Comment

Mainframe IMS DB Interview Questions. for Beginner Level Intermediate Advanced Level.

This questions can be expected in a Mainframe Interview.

What is PCB?
Answer : Program Communication Block defines which database the program will access and the type of access allowed. It is defines the programmer's view of the database.

What information does a DBD contain?

Answer : DBD information includes: 
  • Database name, Access method 
  • Dataset name 
  • Segment name, length, parent
  • Key field name, length, location, type
  • Search field name, length, location, type
Explain DBDGEN process?
Answer : DBDGEN control statements consists of Assembler Language macro statements. The macros are supplied by IBM in a library named IMSVS.MACLIB. DBDGEN control statements are normally coded by the DBA and submitted to the system with JCL. That invokes a cataloged procedure usually called DBDGEN. 

The DBDGEN procedure causes the DBDGEN control statements to the processed by the assembler producing the object module. The object module is then passed to the linkage editor which, in turn, stores a load module in another IMS Library called as IMS.DBDLIB or IMSVS.DBDLIB. The DBD process is normally preformed only once for a database. All applications use the DBD in accessing the information on the database. A new DBD is normally created only if the physical nature of the database changes.

Which languages does IMS support / application program languages?

Answer : COBOL, PL/1, C, VS Pascal, REXX, Ada and Assembler.

What is a segment?

Answer : Segment is the smallest unit of information that IMS transfers to and from database. Segment may contain one or more fields.

What are the two types of fields available in IMS DB?

Answer : Key Fields - (PROCOPT=K)
  • Used to sequence the database and can't be changed
  • It’s the field within a segment, used to identify the occurrence of the segment
  • Used to maintain the IMS segments in ascending sequence. Search Fields - (PROCOPT=G)
  • Used to search for a segment, without the segment being sequenced on that field
  • A segment need not have a key or search field. Both types of fields can be used to search the database.
What information does a PSB contain?
Answer : PSB information includes:
  • PCB - defines the database to be accessed by the application program.
  • SENSEG - defines the segment types to which the application program will be sensitive.
  • SENFLD - defines the fields in the segment type to which the application program will be sensitive.
  • PROCOPT - defines the types of access to the database or segment.
Explain PSBGEN process?
Answer : PSBGEN control statements consists of Assembler Language macro statements. The macros are supplied by IBM in a library named IMSVS.MACLIB. That invokes a cataloged procedure usually called PSBGEN and stored in PSBLIB. Each PSB consists of one or more control blocks called Program Control Block (PCB). Each PCB within a PSB defines one logical structure. 

All the PCBs within a PSB are collectively knows as an Application Data Structure. IMS allows a PSB to define more than one logical data structure because a program is allowed to access to more than one database. A program us also allowed to concurrently access different parts of the same database. IMS allows the DBA to define any number of logical data structure in a single PSB.

What is the advantage of IMS over DB2?

Answer : IMS is much faster than DB2, despite the improvements in DB2 since the mid 80's, and is still used heavily for high-speed transaction processing - airlines, banks, and tracking systems. The number of IMS installations throughout the world is still increasing.

IMS Interview Questions and Answers

1/03/2010 No Comment

Mainframe IMS DB Interview Questions and Answers asked in IBM.

A very basic question, what is a Database and a DBMS?
Answer : A database is nothing but a collection of related data items organized in such a way that it can be processed by application programs. And a Database Management System is used to define and maintain the structure of the database.

Explain in brief what are the main objectives of a DBMS?

Answer : The main objectives of a database are listed below.
  • Increasing the data independence
  • Reducing the data redundancy
  • Providing indexing capabilities
  • Reducing the data maintenance
  • Providing data communication facilities
  • Providing data integrity and security

Explain about IMS (DB/DC).
Answer : IMS (Information Management System) is IBM’s hierarchical database management system. It has got two main components: IMS DB and IMS DC (also know as IMS TM) IMS DB - IMS/Database Manager as the name implies manages the IMS databases. It is used for physical storage creation and management and data retrieval. IMS DC / IMS TM - IMS/Data Communications or IMS/Transaction Manager handles online transaction processing system.

Explain in brief about DL/I?

Answer : DL/I is a command-level language to manipulate IMS databases. DL/I forms a bridge between application program and IMS database. It is used in batch and online programs to access data stored in IMS databases. Every access to an IMS database is through DL/I. The DL/I interface must be called to update or read a IMS database. DL/I allows both sequential and random processing of a database.

Name the five main components of a IMS Software Environment.

Answer : IMS Software Environment consists of the below five main components:
• IMS DB • DL/I • DL/I Control Blocks • IMS DC • Application Programs

Can you tell me what are the main control blocks available in IMS DB?

Answer : There are three control blocks (also known as DL/I control blocks) 
  • Database Description (DBD) 
  • Program Specification Block (PSB) 
  • Application Control Block (ACB)
What do you mean by DBD?
Answer : DBD (Database Definition) is used to define the physical structure of the database. One DBD for each database Created by a series of control statements – by a process called DBDGEN used by DL/I whenever database is used.

What do you mean by PSB?
What is Application Control Block?
Answer : PSB or Program Specification Block defines the programs view of the database and application programs access authority to database. It defines the logical data structure. A PSB is made up of one or more PCBs. Application Control Block is an internal control block consisting of combined information from the DBD and PSB.

Explain what you mean by a Hierarchical Database?
  • It follows inverted tree structure
  • Data relationship is predefined by it's structure
  • Program accesses the data through predefined paths.
List the advantages and disadvantages of a Hierarchical Database?
Answer : The main advantages of a hierarchical database is the Speed of accessing the data, the access is faster because of the predefined data paths.The disadvantages: are its Complex implementation, the Predefined tree structure that reduces flexibility.to a great extent and finally it is very difficult to manage the database.

IMS Interview Questions

1/03/2010 No Comment

IBM Mainframe IMS DB Interview Questions, Professionals are invited to share the answers.

  1. What do you mean by DBD in IMS DB?
  2. What is the difference between an online and batch program in IMS environment?
  3. What is the DL/I function used in CICS-IMS program?
  4. Define IMS and explain?
  5. Explain how does one reorg an HDAM IMS database when changing Root Anchor points?
  6. Explain in brief what do you know about DBDGEN? 
  7. What are common DLI functions? 
  8. What are common status codes that you come across in IMS? 
  9. Name some of the common codes and their importance? 
  10. Can you tell me what are the parameters used in CBLTDLI call? 
  11. What are qualified and unqualified SSA's in IMS? 
  12. Explain what do you mean by MFS? 
  13. Why is procopt used? Can you name some of them?
  14. What do you mean by multi positioning in IMS?
  15. Explain what is secondary indexing in IMS.
  16. Can you tell how many PCB's can be coded within a PSB 
  17. What is PSB, PCB and ACB in IMS. Explain.

Mainframe IMS Interview Questions

12/26/2009 No Comment

Mainframe IMS Interview Questions, IMS Questions asked in top companies.

Professionals are asked to share the answers.

  1. Explain what are the advantages and disadvantages of a hierarchical database?
  2. What is the physical nature of a database called?
  3. Is it always necessary that all the segments in a DI/I database need to have key fields?
  4. How many key fields and search fields can a segment have in IMS?
  5. Is it necessary condition that the key field in a DI/I database be unique?
  6. What is a key field in an IMS database?
  7. Cn you explain in brief what is a Root in IMS DB?
  8. What is a database record?
  9. What do you mean by Hierarchy Chart?
  10. Give the definition of the terms Parent and Child.
  11. What are the control block in IMS? Explain its usage.
  12. Which is the first statement in COBOL-IMS programs?
  13. What is the return code you get after a successful IMS call? 
  14. Explain what is a hierarchy path in IMS?
  15. What do you mean by a Segment in IMS?
  16. What are the limitation on the no. of levels in a DL/I database ?
  17. What do you mean by Twins in IMS DB?
  18. Explain what are the control blocks available in IMS DB?
  19. How many segment types can you have in a DL/I database?
  20. What do you mean by a Segment type in IMS?
 

Aired | The content is copyrighted and may not be reproduced on other websites. | Copyright © 2009-2016 | All Rights Reserved 2016

Contact Us | About Us | Privacy Policy and Disclaimer