Vous êtes sur la page 1sur 3

PROCOPT

There are two situations where the enqueue/dequeue routines of program isolation are not used in processing a database call: 1. If PROCOPT=GC (read only) is specified for the referenced segment (s) of the call. 2. If PROCOPT=E (exclusive) is specified for the referenced segment (s) in the call. 3.Even when PROCOPT=E is specified, dynamic logging will be done for database changes. The ultimate way to limit the length of the dynamic log chain in a BMP is by using the XRST/CHKP calls. The chain is deleted at each CHKP call because it constitutes a synchronization point.

Database PCB
The database PCB for an MPP or BPP is basically the same discussed above. Two additional processing intent options can be specified with the PROCOPT=keyword of the PCB and/or SENSEG statement. Additional processing intent options The PROCOPT=keyword is extended with two additional processing intent options, O AND E. Their meanings are: >>O Read only: no dynamic enqueue is done by program isolation for calls against this database. Can be specified with only the G intent option, as GO or GOP. This option is only valid for the PCB statement. >>E Forces exclusive use of this database or segment by the MPP/BMP. No other program which references this database/segment will be scheduled in parallel. No dynamic enqueue by program isolation is done, but dynamic logging of database updates will be done. E can be specified with G, I, D, B, and A. CAUTION:If the O option (read-only) is used for a PCB, IMS does not check the ownership of the segments returned. This means that the read-only user might get a segment that had been updated by another user. If the updating user should then abnormal terminate, and he backed out, the read-only user would have a segment that did not (and never did) exist in the database. Therefore, the O option user should not perform updates based on data read with that option. An ABEND can occur with PROCOPT=GO if another program updates pointers when this program is following the pointers. Pointers are updated during insert, delete and backout functions 2.Inquiry-only. transactions should be simple transactions. These should be normally implemented as non-conversational transactions. Also, they can be defined as non-recoverable inquiry-only. If in addition, the associated MPPs specify PROCOPT= GO in all their database PCBs, no dynamic enqueue and logging will be done for these transactions. Loading databases

Basically the load program inserts segments into the database from some kind of input. It builds the segments and inserts them in the database in hierarchical order. Quite often the data to be stored in the database already exists in one or more files, but merge and sort operations may be required to present the data in the correct sequence. The process of loading database is different than updating a database with segments already in the it. A database must be initialized before it can be used by most application programs. A database can be initialize in several ways: Data reloaded by the database recovery utility Data loaded by a database reload utility Data loaded by a program with the PROCOPT of L Once the database is initialize it will remains so until it has been deleted and redefined. Therefore is it possible to have an empty initialize database. A database which is not empty can not be used by a PSB with a PROCOPT of L nor can it be recovered or loaded with the reload utility. If the database has no secondary indices or logical relationship, then the load process is very straight forward. Any program with a PROCOPT of L can load it. Once that program has completed and close the database, the database can then be used by any program for read or update. Loading a HIDAM database When loading a HIDAM database initially, you must specify PROCPT=LS in the PCB. Also, the database records must be inserted in ascending root sequence, and the segment must be inserted in their hierarchical sequence. Loading an HDAM database When initially loading an HDAM database, you should specify PROCOPT=L in the PCB. There is no need for DL/I to insert the database records in root key order, but you must still insert the segments in their hierarchical order. For performance reasons it is advantageous to sort the database records into sequence. The physical sequence should be the ascending sequence of the block and root anchor point values as generated by the randomizing algorithms. This can be achieved by using a tool from the IMS/ESA System Utilities/Database Tools. This tool provides a sort exit routine, which gives each root key to the randomizing module for address conversion, and then directs SORT to sort on the generated address + root key value. Status Codes for Database Loading

Access intent.
There are four processing intent attributes. They are listed below in reverse order, from the highest access intent (the most restrictive), to the lowest (the least restrictive): 1. Exclusive (EX) The subsystem requires exclusive access of the database and no sharing is allowed regardless of the share options registered in DBRC. PROCOPT of L or xE (batch) (where x = A,D,G,I,D) ACCESS of Ex (online) 2. Update (UP) The subsystem may update the database. Even if no updates actually take place the database is held in update mode. Any logs created with actual changes during this process are required for recovery or change accumulation. PROCOPT of A,I,R,D (batch)

ACCESS of UP online 210 IMS Primer 3. Read with integrity (RD) The subsystem only reads the database but it also checks any enqueue or lock held by other subsystems. It waits the lock to be released before processing. PROCOPT of G (batch) ACCESS of RD (online) 4. Read without integrity (RO) The subsystem only reads the database and it does not check any lock or enqueue held by other subsystems. PROCOPT of GO (batch) ACCESS of GO (online)

Vous aimerez peut-être aussi