Monday, October 6, 2014

What is an IMS Database

Information Management System (IMS) is a database and transaction management system for IBM mainframes. This article gives a basic overview of IMS Databases.

IMS is the granddaddy of all transaction management and database systems. It is made up of a hierarchical database and an online transaction processing system. To know more about online systems, you may want to read one of my previous articles (Types of Processing on the Mainframe: Batch and Online). THIS ARTICLE IS COPYRIGHTED. IF YOU CAN READ THIS, THE ONE WHO POSTED THIS STOLE MY

IMS Hierarchical Database

The more popular databases today are relational databases. These are made up of tables related to other tables based on specific columns. Examples of relational databases are DB2, Oracle, MySQL and PostgreSQL. IMS is hierarchical in structure. An IMS database is made up of segments arranged in hierarchical order. An example of hierarchical arrangement of data is in XML.

In an IMS database, the topmost segment is called the root segment. Information relevant to the root segment are stored in child segments. For example, you want to store information about a client with many accounts. The top most segment will probably be information about your client (PERSON), such as name, address, contact number, etc.

The second level of segments might be the accounts they have. Each account will be one segment. Under accounts, you probably will have tra
nsactions for each account segment.

In this structure, the account segments would be children segments of the parent, the client segment. However, the account segments are parents of the transaction segments.

Data Base Definition (DBD)

In relational databases, you create your tables using SQL statements. IMS uses a process called DBDGen. To create a DBD, the database administrator has to code a set of assembler macros that are expanded to build control blocks to define the database. You need to code this and then assemble the code. The generated code has to be placed in a DBD library. IMS uses the DBD to determine the physical structure of the database.

Program Specification Block (PSB)

In relational databases, you can restrict views to columns within your tables by creating logical views. IMS requires logical views to be created. The process to create a PSB is called a PSBGen. Similar to the DBDGen, a PSBGen is coded using a set of assembler macros that create control blocks. The generated control block is placed in a PSB library.

The PSB contains one or more Program Control Blocks (PCB). PCB's contain segments of a database accessed by the program. The number of PCB's depends on the number of databases to be used by the program. You need to define a PCB for every database you want to access in the program. You can also define the access allowed to a program in the PSB. The allowed accesses are GET, REPLACE, INSERT and DELETE or GRID for short.

Access Control Block (ACB)

When an IMS program executes, IMS has to merge the information in the DBD and PSB. The merged information is called an Application Control Block (ACB). For online applications, the merging of DBD and PSB information needs to be done quickly. This is why there is a need to perform an ACB gen. For Batch processing, there is no need to do an ACB gen since there is no need for fast response time.

Naming Conventions

As in everything on the mainframe, the naming convention for the DBD, PSB, field names and ACB will follow the mainframe naming convention. No more than 8 alphabetic and numeric characters with the first character being alphabetic character.

Accesing IMS Databases

Programs access relational databases through SQL statements. In IMS, you access the database through DL/1. DL/1 is basically a module that a program calls (similar to an API). You pass the access you want, the PCB you will use and search parameters. The DL/1 interface will interpret what you passed and will access the database for you and return the result.

Each programming language has its own way of calling the DL/1 interface.

To read a database segment, you use the GET function. There are several variations of the GET function. You can do a GET UNIQUE (GU), which means you get the first occurrence of the segment that matches your search criteria. You can do a GET NEXT (GN), that means you get the next segment. GET NEXT WITHIN PARENT (GNP) means you will get the next segment within the same parent.

To update a segment, you need to read it and hold on to the segment. You do this by using the GET HOLD UNIQUE (GHU), GET HOLD NEXT (GHN) and GET HOLD NEXT WITHIN PARENT (GHNP).

You can also insert a segment using the insert (ISRT) function. To replace fields within a segment, use the replace (REPL) function. And to delete a segment, use the delete (DLET) function.


IMS logs all updates to your database by using a log. The log can be used to recover the database to a certain point in time. The log basically contains the before and after image of a segment so it can be used to backout updates or forward recover from an image copy.

What Languages Can Work with IMS

Aside from the traditional mainframe languages like COBOL, Assembler and PL/1, you can also use Java to access an IMS database.

If you want to learn more about IMS database programming, you can read the Programming for IMS manual.


  1. Aluminium Composite Panel or ACP Sheet is used for building exteriors, interior applications, and signage. They are durable, easy to maintain & cost-effective with different colour variants.

  2. Thanks for sharing an informative blog keep rocking bring more details.I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here! Good luck for the next!
    Web Designing Training Institute in Chennai | web design training center in chennai | web designing course in chennai with placement
    Mobile Application Development Courses in chennai
    Data Science Training in Chennai | Data Science courses in Chennai

  3. You are providing a post is very useful for develop my knowledge and I learn more info from your blog.
    Digital Marketing Course In Kolkata
    Web Design Course In Kolkata
    SEO Course In Kolkata

  4. The development of artificial intelligence (AI) has propelled more programming architects, information scientists, and different experts to investigate the plausibility of a vocation in machine learning. Notwithstanding, a few newcomers will in general spotlight a lot on hypothesis and insufficient on commonsense application. machine learning projects for final year In case you will succeed, you have to begin building machine learning projects in the near future.

    Projects assist you with improving your applied ML skills rapidly while allowing you to investigate an intriguing point. Furthermore, you can include projects into your portfolio, making it simpler to get a vocation, discover cool profession openings, and Final Year Project Centers in Chennai even arrange a more significant compensation.

    Data analytics is the study of dissecting crude data so as to make decisions about that data. Data analytics advances and procedures are generally utilized in business ventures to empower associations to settle on progressively Python Training in Chennai educated business choices. In the present worldwide commercial center, it isn't sufficient to assemble data and do the math; you should realize how to apply that data to genuine situations such that will affect conduct. In the program you will initially gain proficiency with the specialized skills, including R and Python dialects most usually utilized in data analytics programming and usage; Python Training in Chennai at that point center around the commonsense application, in view of genuine business issues in a scope of industry segments, for example, wellbeing, promoting and account.


Follow by Email

Total Pageviews