How application programs view the database

You control how an application program views your database.

An application program might not need use of all the segments or fields in a database record. And an application program may not need access to specific segments for security or integrity purposes. An application program may not need to perform certain types of operations on some segments or fields. For example, an application program needs read access to a SALARY segment but not update access.

You control which segments and fields an application can view and which operations it can perform on a segment by defining a program view. You can define program views in one of two ways. If support for SQL DDL and the IMS management of ACBs is enabled in your IMS system, you can define program views by using DDL statements. You can also define program views by coding and generating a PSB (program specification block) with the PSB Generation utility.

A PSB is a series of macro instructions that describe an application program's access to segments in the database. A PSB consists of one or more program communication blocks (PCB), and each PCB describes the application program's ability to read and use the database. For example, an application program can have different views and uses of the same database. An application program can access several different databases and can have several PCBs in its PSB.

A program view that is defined by using DDL is functionally the same as a program view that is defined by using PSB macro instructions. When defining a new program view with DDL, it might be helpful to understand that the PSBGEN macro instruction that is used to define a PSB is generally equivalent to the CREATE PROGRAMVIEW DDL statement. Similarly, the PSB macro instructions that define PCBs are generally equivalent to the CREATE SCHEMA DDL statement.

If you have the IBM® DB/DC Data Dictionary, you can use it to define an application program's access to the database. It can contain all the information needed to produce a program view.