Program Specification Block (PSB)

Program Specification Block (PSB) controls the access to IMS databases, and each PSB has one or more Program Control Blocks (PCBs) that define the access to specific databases and database segments within the IMS subsystem. To enable SQL access, a PSB must exist or be built that contains PCBs with the necessary access to the IMS data mapped in virtual tables. The source for IMS PSBs is extracted using the Data Studio tool and related to IMS virtual tables for SQL access.

While executing an SQL query, a client connection to the server defines an implicit database transaction. In IMS, a PSB schedule defines an IMS transaction. For update transactions, only one PSB can be scheduled at any point of time to ensure transactional consistency. When auto-commit is on, every SQL statement is committed, PSB is terminated, and IMS transaction is completed. When auto-commit is off, any updates issued, which are a part of a transaction, must be supported by the PSB scheduled for the transaction. Attempts to perform an update within a single transaction that would require a different PSB (from one already scheduled) returns an error.

If you are updating multiple IMS databases within a single transaction (with auto-commit off), all virtual tables participating in the transaction must use the same PSB and that PSB must include PCBs for all databases to be updated by the transaction.

The implicit database connection is ended under the following conditions:

  • After each SQL statement execution when auto-commit is on. In this case, each execute instruction commits the transaction.
  • After commit/rollback request when auto-commit is off.
  • After the client is disconnected when auto-commit is off. In this case, a commit is issued.
Note: The auto-commit flag is set in the application code and not set within Data Virtualization Manager.
When you extract the PSB, remember the following considerations:
  • Segment sensitivity considerations. Access is allowed to all segments contained in the first PCB for a PSB.
  • Field sensitivity considerations. If field sensitivity is defined, WHERE clauses are allowed in the query.
  • PCB considerations. Based on the SQL statement, the first DB PCB that has the necessary segment sensitivity and the processing options is selected for database access.