Vous êtes sur la page 1sur 2

What are the available contexts that you will find in an edit record and what ar e different contexts

used for in the edit record? KEY Key Screen DTL Detail Screen DB1 Database File PAR Parameters PGM Current Program JOB Current job information LCL Local work context WRK Global work context CND Conditions CON Constants Contexts are an interesting feature of Synon 2E. A context is a way to group fie lds together. For example, several fields can be placed in the parameter (PAR) context to send values into or out of a function. There can also be fields in a function that are placed into the local (LCL) context. Different contexts are available at different points in the function so it is important to understand w here you will need the value assigned to a field. If you place the field and va lue in the wrong context you may not have access to the value when you need it. In order to use a field the field must be defined in the model and it must be pl aced into a context that is used within a function.

Synon/CA 2E 2E and Commitment Control July 26, 2012 Mark No comments What is Commitment Control? Commitment control is a function that ensures data integrity. It defines and pro cesses a group of changes to resources, such as database files or tables, as a t ransaction. Commitment control ensures that either the entire group of individual changes oc cur on all systems that participate or that none of the changes occur. IBM DB2 Un iversal Database for iSeries uses the commitment control function to commit and ro llback database transactions that are running with an isolation level other than *NONE (No Commit). You can use commitment control to design an application so that the system can r estart the application if a job, an activation group within a job, or the system ends abnormally. With commitment control, you can have assurance that when the application starts again, no partial updates are in the database due to incomple te transactions from a prior failure. A program that implements the function runs under i OS Commitment Control and, i f so, whether it contains the main commit points. i OS commitment control provid es a means of automatically grouping a number of database updates into a single transaction for the purposes of recovery: either all or none of the updates take place. Commitment control ensures that either the entire group of individual changes oc curs on all systems that participate or that none of the changes occur. The *COMMIT built-in function enables you to add your own commit points to a pro gram that is executing under IBMi commitment control. Commitment control is a me thod of grouping database file operations that allow the processing of a databas e change to be either fully processed (COMMIT) or fully removed (ROLLBACK). Implementing Commitment Control in 2E

CA 2E implements the *COMMIT built-in function as an RPG COMMIT statement, and a s a COBOL COMMIT statement. There are two types of functions used in Commitment Control. The Master function. This function is an external function defined with the func tion Option:Commit control = M. The master function is a parent function of a t ransaction. It is used to define the beginning and ending of the transaction. The Slave function. This function is an external function that is contained with in the transaction. It is defined by the function Option: Commit control = S. The Slave is part of a transaction controlled the the parent Master function. Using Commitment Control in CA 2E Setup files with jounaling to use Commitment Control. Start with a Master. Enter a *commit at beginning of transaction. Enter a *commit at end of transaction. Enter *rollback if transaction fails. Master can contain multiple slave functions. Slaves cannot exist in a transaction without a master.

Vous aimerez peut-être aussi