You can insert specific code in a Macro which is called in a Business Component of server type. To do so, you must open the Macro in a PDP Macro editor in a server model. Then, you can use the insertion wizards which help you insert specific code at different levels of the Business Component (in the general process, in the Logical Views, in the Logical access, and the physical access).
This option corresponds to the insertion relative to the 05 hierarchical level processing
The wizard which opens when you select Insertion in a Logical View process is used to insert specific procedures in the elementary procedures called by PERFORM. The insertion of specific procedure is done just after the tag which is automatically generated.
Process type | Comments | Other fields to complete |
---|---|---|
BEGV: Logical View beginning | Insert type | |
CCNX: Connect to database | Insert type | |
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 code of the Segment. | Data Element code, Category, Insert type |
CHUP: Check or update, check and update | The check or update processing is used to check the user data, to present the information in the Business Component in the specified format, and to refresh the information by user input, through database updates. If you insert specific code at this level, it is used for all the check/update services of the Logical View. It is the most generic specific code. | Service, Insert type |
CLOS: Close | Insert type | |
DCNX: Disconnect from database | Insert type | |
ENDV: Logical View ending | Insert type | |
LOCK: Lock | The Lock/Unlock service helps you to prevent the update for a set of data to avoid simultaneous update, that is to avoid inconsistency. | Insert type |
OPEN: Open | Open indexed files in the View. You must indicate the file code (Data Structure code) in the dedicated field of the wizard | Insert type, File code |
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 process type, Category, Insert type |
TRDT: Transfer View -> Segment | For the transfer of data from the view toward the access Segments. | Category, Insert type |
TRER: Errors transfer | Retrieval of errors during the call of a second-level Business Component. You can enter the code of the Segment where the error is detected, in the dedicated field. | Segment code, Insert type |
TRVW: Transfer Segment -> View | The second-level Business Component starts the data transfer from the Segment to the Logical View. | Category, Insert type |
UNLK: Unlock | Insertion of a lock service in the Business Component. | Insert type |
USER: User service | Possibility for a client component to call a special service (called 'User service'), other than a selection or check/update service (for 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, Insert type |
Generated services | None: no elementary process | 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 | * | * | * | * | * |