You can insert specific code in a Macro which is called in a Business Component of server type at different levels (relative to the general processing, relative to the Logical View processing, for the logical access, or for the physical access). This page gives you the general principle for inserting special processing. It also indicates the types of values you can enter under REF= on the lines retrieved from the dialog and server models.
This option corresponds to the insertion relative to the 05 hierarchical level of processing
Processing (function level) | Type | Actions |
---|---|---|
Server initialization | BS | A, P, R |
Logical View | vulo * | A, P, R, blank |
Server end | ES | A, P, R |
SQL declare cursor | SQ | A, P, R, blank |
Processing (function level) | Type | Actions |
---|---|---|
SQL WHENEVER statement | SQLW | A, P, R |
SQL DECLARE CURSOR statement | SQLD vulo | A, P, R |
In the Logical View block, either in the program body or on the performed elementary levels, you find all the standard procedures related to the implementation of services in the Logical View. Each one of these standard procedures is associated with only one Logical View. A Logical View processing is inserted after a label that is generated automatically or after a condition. This section presents the principles applied to each service. To add specific procedures to a Logical View, you must first identify it. To do so, create a function with the following information:
REF=TypeProcessing Category Service TrtElémentaire
You find all the standard procedures related to the implementation of the services for this Logical View, and other information related to the type of processing.
Type of processing | Comment | Other information to be indicated |
---|---|---|
BEGV: Logical View beginning | Type of Insertion | |
CCNX: Connect to database | Type of Insertion | |
CHKD: Check data | A check service is needed when you want to check only the data entered by the user and to send him/her an error message if the value entered is incorrect. The data in the Logical View is not transferred to the database. The check and update service performs the data transfers from the Segment to the Logical View. The Segment used as reference for the check must be associated with the Logical View. So you must indicate the Segment code. | Data Element code, Category, Type of Insertion |
CHUP: Check or update, check, and update | The check or update service processing is used to check the user data, to present the information in the Business Component in the specified format. It is also used to refresh the information by the user input, through database updates. If you insert specific code at a level 10, 15, or 20, , it is used for all the check/update services of the Logical View. It is the most generic specific code. | Service, Type of Insertion |
CLOS: Close | Type of Insertion | |
DCNX: Disconnect from database | Type of Insertion | |
ENDV: Logical View ending | Type of Insertion | |
LOCK: Lock | The Lock/Unlock service blocks the update of a set of data to avoid simultaneous updates. It prevents inconsistency. | Type of Insertion |
OPEN: Open | It opens the indexed files in the View. You must indicate the file code (Data Structure code). | Type of Insertion |
SELC: Selection | To replace the selection processing service on the Logical View in the category of your choice. You must also choose the type of service and the type of elementary processing. | Service, Elementary processing type, Category, Type of Insertion |
TRDT: Transfer View -> Segment | For the transfer of data from the Logical View toward the access Segments. | Category, Type of Insertion |
TRER:Errors transfer | Retrieval of errors when calling a second-level Business Component. You must enter the code of the Segment where the error is detected, in the dedicated field. | Segment code , Type of Insertion |
TRVW: Transfer Segment -> View | The second-level Business Component starts the data transfer from the Segment to the Logical View. | Category, Type of Insertion |
UNLK: Unlock | Insertion of an unlock service in the Business Component. | Type of Insertion |
USER:User service | Possibility for a client component to call a
special service (called "User service"), other than a selection
or check/update service. Example: Counter
to count the number of customers per day who have issued an order,
print service
The Business Component retrieves, through the
communication area, the name, and code of the User service called
by the client component. |
User service code, Type of Insertion |
Generated services | None: no elementary processing | INIT: initialization | CHCK: check | TRAN: Transfer | UPDT: Update | DONE: end | SELC: Selection |
---|---|---|---|---|---|---|---|
SRVE: Check service | * | * | * | * | |||
SRVL: Read service | * | * | * | * | * | ||
SRVM: Check/update service | * | * | * | * | * | * | |
SRVT: check/update and selection service | * | * | * | * | * | * | |
SRVX: Check/selection service | * | * | * | * | |||
SRVA: Selection service | * | * | * | * | * | ||
None | * | * | * | * | * |
REF=TypeProcessing Segment Category TrtElémentaire