The Business Component implements the services associated
with a Logical View. As it runs the service, it can detect errors.
In this case, it must send all the error information in its reply
message to the client so that the client can take the appropriate
action.
Principle
The following two types of errors
are possible:
- Standard errors detected after the standard accesses to Segments
or the validation of the Logical View data. You can modify the messages
associated with these errors.
- Specific errors, which correspond to errors you describe entirely
in source code.
:
When a Business Component detects an error, it immediately
performs a ROLLBACK operation before sending back
the reply containing the errors. It gives the control back to the
client without calling the next Business Component
Implementation
- Enter the following options on O-type lines,
in the -GO Lines of the following entities:
- ACCESERR and DATAERR in
the Business Component. These two options define the number of errors
that the Business Component can detect before giving the control back
to the calling program. For a TUI application, both these options
are required.
- ACCESERR, DATAERR, ERRLAB and ERRSERV in
the Server Dialog for single-view development.
- Describe in each Business Component and Logical View the error
messages associated with the codes of the errors specified with specific
code, These errors correspond to the errors set in the Business Component
with the ERU (user error), ERR (error
on Data Element) or ERL (logical lock or unlock
error) operators. You indicate the messages associated with these
errors on U-type lines in the -GE
Lines of the following entities:
- Business Component for the errors specified with ERU or ERL,
- Logical View for the errors on specified with ERR.
Note: You can also modify the messages associated with standard
errors. These errors are detected after standard accesses to Segments
or checks on Logical View data.
- Create and describe the error message server in order to access
the error message file.
To process the errors, the following four
variables are generated in the
WORKING-STORAGE SECTION of
the Business Component:
- IER: Number of errors on Segment access, initialized
by the ACCESERR option
- IED: Number of errors on Data Element, initialized
by the DATAERR option
- K50L: Work index of the number of errors on Segment
access
- K50D: Work index of the number of errors on Data
Element
- Generate the error message file. The generated file is a sequential
file from which you create the error message file for your application,
with the appropriate organization (relational table, VSAM file for
example). An error message file includes 100-character records whose
structure contains the following elements:
- An access key (ERKEY, 29 characters)
- A code for the severity of the error (one character: E for
error, W for warning)
- The message itself