Some functions or subfunctions are independent of any automatic
functions or subfunctions. Others are inserted relatively to automatic
functions or subfunctions that are specific to a model: Standard
or client Dialog or Business Component (available
only in a Macro). The information that is displayed in the wizard
varies accordingly.
The insertion of the various types of functions and subfunctions
depends on the entities in which you want to insert them:
- The insertions of functions or subfunctions that are associated
with the two models are impossible in the same Macro.
- An insertion in absolute mode is always available. For a Program,
this insertion type is the only available type.
- In a standard or client Screen, an insertion relative to the Business
Component model is impossible.
- In a Business Component, an insertion relative to the Standard
or client Dialog model is impossible.
- Function code
- This code is required. It is constituted of two characters, which
can be digits or letters only.
You can parameterize
it by entering $ followed by a digit or a letter.
A
function code cannot be modified if at least one line depends on this
function
It determines the placement of the source lines in
the sequence of functions.
The automatic functions have preset
codes. So, if you select a model in the Model field,
you must choose the new function code relatively to the codes of the
automatic functions.
Note: See the
VisualAge Pacbase documentation site for information
about the automatic functions. All the automatic functions of a Program
are documented in the
Batch Applications manual, chapter
Example
of a generated Program. All the automatic functions of a Business
Component are documented in the
Pacbench C/S Applications Business
Logic manual, chapter
Appendix.
For
the
Standard or client Dialog model, you must
enter one of the following automatic functions:
- 20: Data Element validations
- 25: Segment access for validation
- 30: Data Element transfer
- 35: Segment access for update
- 60: Segment access for display
- 65: Data Element transfer
- 80: Physical access to Segments
- Subfunction code
- This code is constituted of two characters. In a Macro, you can
enter digits or letters. In a Program, Screen, or Business Component,
you must enter letters only
You can parameterize
it by entering $ followed by a digit or a letter.
This
code determines the placement of the source lines in the sequence
of functions.
For the Standard or client Dialog model,
the subfunction code is required.
For the Business
Component model, the subfunction code cannot be entered
for an Insertion relative to the 05 hierarchical level.
However, it is required for an Insertion relative to the
SQL processing, an Insertion relative to the
Logical View processing and an Insertion relative
to the physical access level. It is optional for an Insertion
relative to the logical access level.
- Level
- The level is constituted of two digits.
You can parameterize
it by entering $ followed by a digit or a letter.
It is displayed differently
according to the entity:
- For a Macro, it is displayed in the tree of the Macro
code structure view, on the node that represents the function
or subfunction. In the Macro code, it is identified as LV=nn (where nn represents
the level).
- For a Program, Screen, or Business Component it
is displayed from the column 73 as lvnn (where nn is
the level).
The level value depends on the created element. For a
function, the level is 05. For a subfunction,
the level must be between 06 and 98.
The default level of subfunctions is 10.
Within
a function, a subfunction with a level n is part
of the preceding subfunctions whose levels are lower than n.
For example, a subfunction with a level 15 is part
of any preceding subfunction whose level is included between 06 and 14.
A dependent subfunction is run only if the function or all the subfunctions
it depends on are run.
- Title
- You can optionally enter the title of the function or subfunction.
For
an insertion in a Program, Screen, or Business Component, the character
string you enter will constitute the title of a function or a comment
on the first line of the subfunction. The default value is a series
of dashes. If you leave the default value and if you want to modify
it in the code, double-click it and enter another value.
- Condition
- This field is available for a function or subfunction that is
not related to a model (value None in the Model field).
Note: For
an insertion in a Macro, all the conditions are available. However,
for an insertion in a Program, Screen, or Server, only the conditions None, IT, DU,
and DW are available.
You indicate
whether the execution of the function or subfunction is conditioned
in one of the following ways:
- None: The function or subfunction is always
run.
Note: To create this type of function or subfunction, you can
also insert a snippet: Subfunction without condition.
- IT: The function or subfunction is run
if the condition is met.
After you insert the function or subfunction,
create a line without any line number directly in the code and enter
the condition. You can enter code on the following lines by creating
lines that start with a line number.
Note: To create a function
or subfunction with an IT condition, you can
also insert a snippet: Subfunction with condition.
The
COBOL statements IF THEN condition and NEXT
SENTENCE GO TO Fffnn-FN are automatically generated after
the generation of the instance that calls the Macro.
- EL: This condition cannot
be selected for a function.. The subfunction is run if the
preceding subfunction with an IT condition
was not run.
After you insert the subfunction, create
a line without any line number directly in the code and enter the
condition. You can enter code on the following lines by creating lines
that start with a line number
The COBOL statements Fffnn-900 and GO
TO Fffnn-FN are automatically generated after the generation
of the instance that calls the Macro. ffnn is
the associated subfunction that contains the IT condition.
- DO: This condition cannot
be selected for a function. The
subfunction is run in a repetitive way between two bounds, according
to an increment interval. The bounds are required whereas the interval
is optional.
After you insert the subfunction, create a line without
any line number directly in the code and enter the condition. Enter,
in order, the start bound, the end bound, and the increment interval.
Separate each with a space. The bounds can be a value or a number
(signed or unsigned).
A JffnnR index, where ffnn is
the subfunction code, is automatically generated. To generate another
index, you must enter I=index bound1 bound2 interval,
where index is a numeric work area. You can
also insert a snippet Indexes insertion to
easily declare another index.
The COBOL statements Fffnn-900 and GO
TO Fffnn-A are automatically generated after the generation
of the instance that calls the Macro.
- DW: This condition cannot
be selected for a function. The
subfunction is run only while the condition is met.
After you insert the subfunction, create
a line without any line number directly in the code and enter the
condition. You can enter code on the following lines by creating lines
that start with a line number
The COBOL statements Fffnn-900 and GO
TO Fffnn are automatically generated after the generation
of the instance that calls the Macro.
- DU: This condition cannot
be selected for a function. The
subfunction is run in a repetitive way until the condition is met.
It is then run at least once.
After you insert the subfunction, create
a line without any line number directly in the code and enter the
condition. You can enter code on the following lines by creating lines
that start with a line number
No
COBOL statement is automatically generated.
Specific positioning
- Model
- The information that you must enter in the wizard varies according
to the model that is selected in this field. Three values are possible:
- None: The functions and subfunctions that
are created in the wizard are not inserted relatively to automatic
functions or subfunctions.
- Standard or client Dialog: You can create
subfunctions only. These subfunctions are inserted relatively to the
automatic subfunctions of the model.
- Business Component: The functions and subfunctions
that are created in the wizard are inserted relatively to the automatic
functions and subfunctions of the model. This insertion type is available
in a Macro only.
- Insertion type
- This field is associated with a Business Component model.
It is available in a Macro only.
You must indicate the automatic
processing relative to which your specific processing is to be inserted.
The following insertions are possible:
- Insertion relative to the 05 hierarchical level:
Insertion relative to the Business Component initialization and end
blocks, the SQL declarations block, and the Logical View blocks.
- Insertion relative to SQL processing: Insertion
relative to the SQL processing in the SQL declarations block with
a 10 hierarchical level. These insertions are relative
to the SQL statements DECLARE CURSOR and WHENEVER.
- Insertion relative to the Logical View processing:
Insertion in the body of the program or in the elementary processing
that is run by PERFORM.
- Insertion relative to the logical access level:
Insertion in the Segment access processing for check, update, or selection.
- Insertion relative to the physical access level:
Insertion in function 80.