Insertion relative to the 05 hierarchical level in a Business Component
You can insert specific processing or replace standard processing in the generated blocks. These blocks have a 05 hierarchical level. These blocks are the Business Component initialization and end blocks, the SQL declarations block, and the Logical View blocks (available on a Macro only). The block and the action type that you select indicate where the specific processing is to be inserted.
You can declare or replace a specific processing in the Business Component. If the specific processing applies to the Logical View block (available on a Macro only), you must identify the impacted Logical View. The instructions must be written on hierarchically lower levels.
All these insertions are identified by ACTION=*C in the Macro code.
- Blocks
- The following blocks are generated with a 05 hierarchical
level:
- Business Component initialization: This
block retrieves the information that is contained in the communication
area and carries out initializations. It corresponds to the FSERVER block
in the code.
In the Macro code, the insertion relative to this type of block is identified by REF=BS.
- Logical View: This choice is available
on a Macro only.
If several Logical Views are declared in the Business Component, there are as many blocks as Logical Views. If you select this type of block, the Segment code field becomes available. You must enter or select the Logical View type Segment in which you want to insert or replace a processing. The Segment code identifies the position of the specific processing relatively to the standard processing.
In the Macro code, the insertion relative to this type of block is identified by REF=view (where view is the Logical View).
- Business Component end: This block returns
the information to the client. It corresponds to the FSERVER-END block
in the code.
In the Macro code, the insertion relative to this type of block is identified by REF=ES.
- SQL cursors declarations: This block describes
the clauses that are required for the SQL declarations. It corresponds
to the FSQL block in the code. You can insert specific processing at two levels:
- Relatively to the FSQL block itself, in a Business Component only.
- Relatively to a specific function that you attach to the FSQL block. You describe the instructions in subfunctions of this function. In the Business Component code, this type of insertion is identified by Fnn=FSQL (where nn is the code of the specific function).
In the Macro code, the insertion relative to this type of block is identified by REF=SQ.
- Business Component initialization: This
block retrieves the information that is contained in the communication
area and carries out initializations. It corresponds to the FSERVER block
in the code.
- Action type
- Specific processing is inserted in a Business
Component relatively to the standard generated processing. You can
then benefit from the generated processing and adapt it to your needs.
To add a specific processing, you must then insert the processing relatively to a standard processing of the block that you select in the Block field. You must select one of the following options to insert the specific processing:
- Insert before a standard processing. The
specific processing is inserted before the start tag of the standard
processing.
In the Macro code, the positioning of this specific processing is identified by the letter A after the block code (REF=BS A for example). In the Business Component code, it is identified by @BEFORE after the block code.
- Insert after a standard processing. The
specific processing is inserted before the end tag if the hierarchical
level is greater than the level of the standard processing. It is
generated after the end tag if the hierarchical level is identical
to the level of the standard processing.
In the Macro code, the positioning of this specific processing is identified by the letter P after the block code in the Macro code (REF=BS P for example). In the Business Component code, it is identified by @AFTER after the block code.
- Replace a standard processing.
In the Macro code, the positioning of this specific processing is identified by the letter R after the block code in the Macro code (REF=BS R for example). In the Business Component code, it is identified by @REPLACE after the block code.
- None. This option is specific to an insertion
in the Logical View block or the SQL
cursors declarations block. You select it to manage the
positioning of the function in the specific code. For the SQL
cursors declarations, it is used to attach the specific
function to the FSQL standard function.
In the Macro code, the positioning of this specific processing is not identified by any letter. In the Business Component code, it is identified by a COBOL comment line at the beginning of the PROCEDURE DIVISION. This comment includes the @ATTACH tag (for example *@ATTACH F03=FSQL, where F03 is the specific function that is associated with the FSQL function).
- Insert before a standard processing. The
specific processing is inserted before the start tag of the standard
processing.