Progress
Programming
Handbook
Block Properties
Progress provides a different set of default processing services for each type of block. Table 3–1 shows what properties Progress associates with each type of block. Implicit properties are those that come by default. Explicit properties are those that you can associate with the block by adding Progress keywords, phrases, or statements to the block definition. The properties in this table represent the basic properties associated with the type of block. Progress provides additional properties depending on the block type.
Table 3–1: Block Properties Property REPEAT FOR DO Procedure or Trigger Implicit Explicit Implicit Explicit Implicit Explicit Implicit Explicit Looping YES WHILE TO/BY YES5 WHILE TO/BY NO WHILE TO/BY NO NO Record reading NO NO YES Record Phrase NO NO NO NO Frame scoping YES WITH FRAME YES WITH FRAME NO WITH FRAME YES NO Record scoping YES FOR YES NO NO FOR YES1 NO UNDO YES TRANS ACTIONON ERROR YES TRANS ACTIONON ERROR NO TRANS ACTIONON ERROR YES N0 ERROR processing YES ON ERROR YES ON ERROR NO ON ERROR YES NO ENDKEYprocessing YES ON ENDKEY YES ON ENDKEY NO ON ENDKEY YES NO STOP processing YES2 ON STOP YES2 ON STOP NO ON STOP YES NO QUIT processing YES2 ON QUIT YES2 ON QUIT NO ON QUIT YES NO System transaction YES2 TRANS ACTION3 YES2 TRANS ACTION3 NO TRANS ACTION3ON ERROR2 YES2 NO ParameterPassing NO NO NO NO NO NO NO YES1
- A record is scoped to the containing .p unless you explicitly define the buffer in a trigger or internal procedure
- Only if the block contains database updates or reads with exclusive locks and there is no higher level transaction active.
- Only for procedure blocks.
- Only for procedure blocks.
- Using the EACH option.
Scope is one of the basic properties of all blocks. Scope is the duration that a resource is available to an application, and blocks determine the scope of certain resources. For example, records and certain types of frame definitions are automatically scoped to certain blocks (see Table 3–1). Although you can place them in other blocks, local data and widget definitions are always scoped to the smallest enclosing procedure block (internal or external). Similarly, the compiler accepts a trigger or internal procedure block in most other blocks. However, trigger definitions are scoped to the enclosing trigger or procedure block (internal or external) in which they are defined, and internal procedure definitions are always scoped to the enclosing external procedure block in which they are defined. Thus, an internal procedure defined in a REPEAT block is actually defined only once (not for the number of times the block repeats), and is available for execution anywhere in the external procedure.
The following sections explain the looping, record reading, frame scoping, and record scoping block properties. For information on the UNDO, ERROR, ENDKEY, STOP, and QUIT properties, see Condition Handling and Messages." For information on transactions, see Transactions."
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |