Error Handling For Smarties
-
Upload
saswati-sengupta -
Category
Documents
-
view
217 -
download
0
Transcript of Error Handling For Smarties
![Page 1: Error Handling For Smarties](https://reader031.fdocuments.in/reader031/viewer/2022021214/577d2c671a28ab4e1eac1d5e/html5/thumbnails/1.jpg)
8/7/2019 Error Handling For Smarties
http://slidepdf.com/reader/full/error-handling-for-smarties 1/13
"Error Handling For Smarties"
last updated on 5/5/2000 – lrb – Thanks to Paul K. for establishing the standard, Peter W. for following it
and Maria Richardson for supporting its use (having been burned by one too many “consumed servicefailed” messages)
Here is a code example which follows the standard Paul Kniskern has established for
1. naming the action diagrams in a typical application and
2. using exit states to support error handling
When an error occurs the user and the developer will know
1. what service failed
2. what attribute had a problem
3. the problem it had
============================================================================
First ... Here's a diagram that shows the standard for names of action diagrams from aservice test harness all the way down to the context string builder.
xx = mnemonic, v = version = 1, 001 = sequence #, 1 = operation version #
Hxxv0011_SPECTYPENAME_ACTION_T ->
eg. HOM10111_LEADINGZEROS_STRIP_T
(service test harness)
Ixxv0011_SPECTYPENAME _ACTION_S ->
eg. IOM10111_LEADINGZEROS_STRIP_S(I (interface) "guy")
Mxxv0011_IMPTYPENAME_ACTION ->eg. MOM10111_LEADINGZEROS_STRIP
(M (manager) "guy")
Cxxv0011_CHKIMPORTS
eg. COM10011_CHKIMPORTS(checks for mandatory imports etc – may set context string substitution values
and exit states)
Txxv0011_IMPTYPENAME
("TV to PV" - transient to persistent SETs)
Dxxv0011_IMPTYPENAME
(D "guy" - database logic)
Pxxv0011_IMPTYPENAME("PV to TV" - persistent to transient SETs)
Cxxv9971_EXTERNAL_EXITS
(optionally & typically, the setting of exit states for exceptions returned
by consumed op's or external ap's are done in M "guy")
Xxxv0011_COMPONENT_NAME
1 of 13
![Page 2: Error Handling For Smarties](https://reader031.fdocuments.in/reader031/viewer/2022021214/577d2c671a28ab4e1eac1d5e/html5/thumbnails/2.jpg)
8/7/2019 Error Handling For Smarties
http://slidepdf.com/reader/full/error-handling-for-smarties 2/13
(EAB s - external action blocks)
Sxxv0011_TRANSLATE_EXIT_STATE ->
eg. SOM10111_TRANSLATE_EXIT_STATE
(last thing done by M "guy" - translates exit states)
Cxxx9991_SETSERVIDeg. CCOM9991_SETSERVID
(sets origin server id)
Cxxv9981_CONTEXT_STRING ->
eg. COM19981_CONTEXT_STRING
(if no exception raised, does nothing. if context string not empty,returns this context string. otherwise, passes necessary info' to
final service (IEH10022) to pick up substitution values)
IEH10022_CONTEXT_STRING_BUILD
(context string builder - lowest level service called)
============================================================================
Second … the major benefit of using the error handling / exit state approach discussed here is the detailed
error message you see in both the result screen in a test harness and in the Event Viewer when you run theapplication using the Facet front end. See the screen captures below.
Here is what COOL:Gen - built hub test harness input and result screens look like: note the intentionally
bogus input value (ProductPolicyTypeTv) and the details in the error section of the result screen.
Run Hub11431 Show Operator Detail
ProductTv
Generated Identification Number582615111
ProductPolicyTypeTv
Generated Identification Number333333333
PolicyTv
Id502435725411
CountryTv
Code8A
StateProvinceTv
CodeGA
2 of 13
![Page 3: Error Handling For Smarties](https://reader031.fdocuments.in/reader031/viewer/2022021214/577d2c671a28ab4e1eac1d5e/html5/thumbnails/3.jpg)
8/7/2019 Error Handling For Smarties
http://slidepdf.com/reader/full/error-handling-for-smarties 3/13
ZipCodeTv
Code
TerritoryTv
Code A*
MarketTv
CodeA
CallTypeTv
CodeRT
PolicyDetailTv
Form Code 101
Ipl1QuoteVersion
Number1
Effective Date04/21/2000
Expiration Date04/21/2001
Reference Date04/20/2000
Transaction TypeNBQT
Sub Transaction TypeGNRL
PolicySubjectTv
Id701266266
SubjectTypeTv
Special Subject Type Code202
how Operator D
Reset
Run Hub11431 Show Operator Detail Result
3 of 13
![Page 4: Error Handling For Smarties](https://reader031.fdocuments.in/reader031/viewer/2022021214/577d2c671a28ab4e1eac1d5e/html5/thumbnails/4.jpg)
8/7/2019 Error Handling For Smarties
http://slidepdf.com/reader/full/error-handling-for-smarties 4/13
Processing ended with Rollback
To return to the previous form with the previously entered
information use your browsers "back" button
SubjectTypeParameterTv LhsFi
eld
s
PptSubjectTypeParameterTv
LhsField
s
PolicySubjectP
aramet
erTv
Ca
teg
or
y
Co
de
Ref
ere
nce
Co
de
Cur
renc
y
Indi
cato
r
Multi
Current
Value
Indicat
or
Negati
ve
Numb
er
Indica
tor
D
at
a
Le
ng
th
De
cim
al
Le
ngt
h
Dat
a60
M
axi
mu
m
Va
lue
Mi
ni
mu
m
Va
lue
N
a
m
e
Displa
y
Seque
nce
Numb
er
Hid
den
Indi
cato
r
Optio
ns
Exist
Indica
tor
Req
uire
me
nt
Cod
e
Pa
re
nt
re
fc
d
Is
pa
re
nti
nd
Lab
el
Ord
er
Nu
mbe
r
Seq
uen
ce
Nu
mb
er
SubjectTypeParameterTv LhsFields
Reference Code Data32 Code
SubjectTypeParameterTv LhsFields
Reference Code Parentansval
TrComponentR
egId
Tivoli DivisionCLS
Tivoli SystemDEFLT
Tivoli Sub SystemHDR
Help File Path
ImplementationInd
R
Ieh1ErrorProp
erties
Sys Error Nbr Id581
Origin Servid555555555555577
4 of 13
![Page 5: Error Handling For Smarties](https://reader031.fdocuments.in/reader031/viewer/2022021214/577d2c671a28ab4e1eac1d5e/html5/thumbnails/5.jpg)
8/7/2019 Error Handling For Smarties
http://slidepdf.com/reader/full/error-handling-for-smarties 5/13
Return Code-1060
Reason Code1001
Error Description Unable to View Prod Subject
Severity IndicatorW
System
Description
Error TextUnable to View Product Subject Types Product_Policy_Type not
found
Rollback
Indicator
Y
Tivoli LogIndicator
N
Tivoli Dsms
Indicator
N
Tivoli Email
Indicator
N
Help File Name
Error Help
Context
0
Symbolic Name000000000000581
Tivoli Page
Indicator
N
Raise IndicatorN
Log IndicatorY
Tivoli Error
Number
0
Handle At Host
Indicator
N
Logical Delete IndN
5 of 13
![Page 6: Error Handling For Smarties](https://reader031.fdocuments.in/reader031/viewer/2022021214/577d2c671a28ab4e1eac1d5e/html5/thumbnails/6.jpg)
8/7/2019 Error Handling For Smarties
http://slidepdf.com/reader/full/error-handling-for-smarties 6/13
Logical Delete
Date
12:00:00 AM
Context Return
Code
-10
Context Reason
Code
1044
Context Origin
Servid
555555555555578
Context Public
Op Id
IPDRL121
Context Private
Op Id
DPDRL251
Third … Here’s code from the beginning and the end of a remote hub. We include it here to show the use
of the new common component module iom10121_retrieve error details. This modules contains all of the
code formerly found at the end of all hubs (eg. the use of ieh10012_error_msg_retrieve). It also supports
things like invalid return codes of 0 (which can happen if there’s a view matching problem) and the
6 of 13
![Page 7: Error Handling For Smarties](https://reader031.fdocuments.in/reader031/viewer/2022021214/577d2c671a28ab4e1eac1d5e/html5/thumbnails/7.jpg)
8/7/2019 Error Handling For Smarties
http://slidepdf.com/reader/full/error-handling-for-smarties 7/13
situation where an Error Code is not found in the Error Code table. In addition to any hub-specific exports
and the two standard hub exports tr_component_reg_id and ieh1_error_properties, hubs now have the
additional work view export cde_error_return_message context string. When a hub uses a public operation
which fails, the local cde_error_return_message exported by the failing service is used as the import to
iom10121_retrieve error details.
============================================================================
1 +- HUB11371_SHOW_VEHICLE_DETAIL
456 | SET local cde_error_return_message return_code TO 1
457 | SET local subject_type_tv special_subject_type_code TO "201"
458 |459 | +- IF local cde_error_return_message return_code IS EQUAL TO 1
460 | |
461 | | USE isub0301_prepare_lhs_data
462 | | WHICH IMPORTS: Entity View import product_tv TO Entity View import product_tv
463 | | Entity View import product_policy_type_tv TO Entity View import
product_policy_type_tv
464 | | Entity View import country_tv TO Entity View import country_tv
465 | | Entity View import state_province_tv TO Entity View import state_province_tv466 | | Entity View import zip_code_tv TO Entity View import zip_code_tv
467 | | Entity View import territory_tv TO Entity View import territory_tv468 | | Entity View import market_tv TO Entity View import market_tv
469 | | Entity View import ipl1_quote_version TO Entity View import ipl1_quote_version
470 | | Entity View local subject_type_tv TO Entity View import subject_type_tv
471 | | WHICH EXPORTS: Group View local_married_group FROM Group View
export_married_group
472 | | Group View export_options_group FROM Group View export_options_group
473 | | Group View export_parent_options_group FROM Group View
export_parent_options_group474 | | Work View local cde_error_return_message FROM Work View export
cde_error_return_message
475 | |476 | | +- IF local cde_error_return_message return_code IS NOT EQUAL TO 1
477 | | |
479 | <------ESCAPE
480 | | |
834 | NOTE *****************************************************************
835 | Error Handling
836 | *****************************************************************
837 |
838 | USE iom10121_retrieve_error_details
839 | WHICH IMPORTS: Work View local cde_error_return_message TO Work View import
cde_error_return_message840 | WHICH EXPORTS: Entity View export tr_component_reg_id FROM Entity View export
tr_component_reg_id841 | Entity View export ieh1_error_properties FROM Entity View export
ieh1_error_properties
842 | Work View export cde_error_return_message FROM Work View export
cde_error_return_message
843 +--
=========================================================================
7 of 13
![Page 8: Error Handling For Smarties](https://reader031.fdocuments.in/reader031/viewer/2022021214/577d2c671a28ab4e1eac1d5e/html5/thumbnails/8.jpg)
8/7/2019 Error Handling For Smarties
http://slidepdf.com/reader/full/error-handling-for-smarties 8/13
Ok … Now let’s talk about the main topic: how public operations consume private operations and show
examples of C “guys” , S “guys” and how exit states are used.
Here is the M "guy" corresponding to the first service called by the hub above
1 +- MSUB0301_PREPARE_LHS_DATA
205 |
206 | NOTE *** PJW Added EXIT State Logic. ***
208 |
209 | EXIT STATE IS 00001_00000_succ_completion
210 | USE csub0301_chkimports
211 | WHICH IMPORTS: Entity View import product_tv TO Entity View import product_tv
212 | Entity View import product_policy_type_tv TO Entity View import
product_policy_type_tv
213 | Entity View import country_tv TO Entity View import country_tv
214 | Entity View import state_tv TO Entity View import state_tv
215 | Entity View import policy_subject_address_tv TO Entity View importpolicy_subject_address_tv
216 | Entity View import territory_tv TO Entity View import territory_tv217 | Entity View import market_tv TO Entity View import market_tv
218 | Entity View import quote_version_tv TO Entity View import quote_version_tv
219 | Entity View import subject_type_tv TO Entity View import subject_type_tv
220 | WHICH EXPORTS: Work View local itrv1_site FROM Work View out itrv1_site
221 | Work View local itrv1_context_string FROM Work View out itrv1_context_string
222 |
223 | +- IF EXITSTATE IS EQUAL TO 00001_00000_succ_completion
224 | |225 | | SET local_qv_ref quote_version_tv reference_date TO import quote_version_tv
226 | | reference_date
227 | |228 | | SET local product_tv generated_identification_number TO import product_tv id
229 | | SET local product_policy_type_tv generated_identification_number TO
230 | | import product_policy_type_tv id
231 | |
232 | | SET local territory_tv code TO "A*"233 | | SET local zip_code_tv code TO ""
234 | | SET local state_province_tv code TO import state_tv code
235 | | USE ipdrl121_view_product_subj_type
236 | | WHICH IMPORTS: Entity View import market_tv TO Entity View import market_tv
237 | | Entity View local territory_tv TO Entity View import territory_tv
238 | | Entity View local zip_code_tv TO Entity View import zip_code_tv
239 | | Entity View local state_province_tv TO Entity View import state_province_tv240 | | Entity View import country_tv TO Entity View import country_tv
241 | | Entity View import subject_type_tv TO Entity View import subject_type_tv242 | | Entity View local_qv_ref quote_version_tv TO Entity View import quote_version_tv
243 | | Entity View local product_policy_type_tv TO Entity View import
product_policy_type_tv
244 | | Entity View local product_tv TO Entity View import product_tv
245 | | WHICH EXPORTS: Work View local cde_error_return_message FROM Work View export
cde_error_return_message
246 | | Group View l_group_ppt FROM Group View group_export
8 of 13
![Page 9: Error Handling For Smarties](https://reader031.fdocuments.in/reader031/viewer/2022021214/577d2c671a28ab4e1eac1d5e/html5/thumbnails/9.jpg)
8/7/2019 Error Handling For Smarties
http://slidepdf.com/reader/full/error-handling-for-smarties 9/13
247 | |
248 | | +- IF local cde_error_return_message return_code IS NOT EQUAL TO 1
249 | | | SET local itrv1_context_string context_string TO
250 | | | local cde_error_return_message context_string
251 | | | EXIT STATE IS n1060_1001_sub_view_prd_sb_fail252 | | |
253 | <------ESCAPE
254 | | |
255 | | +- ELSE
256 | | |
257 | | | EXIT STATE IS 00001_00000_succ_completion
258 | | | NOTE ****************************************************************
259 | | | NOTE Create Options RGV
260 | | | NOTE ****************************************************************
261 | | |
262 | | | SET SUBSCRIPT OF local_group_import TO 0
263 | | | SET SUBSCRIPT OF local_group_trial_options TO 0
264 | | | SET local_save_ref_code aa_work text_length_5 TO ""265 | | |
266 | | | += FOR EACH l_group_ppt267 | | | |
268 | | | | +- IF l_grp_ppt_g_export ppt_subject_type_parameter_tv
269 | | | | | options_exist_indicator IS EQUAL TO "Y"
270 | | | | |
271 | | | | | +- IF l_grp_ppt_g_export subject_type_parameter_tv reference_code
272 | | | | | | IS EQUAL TO local_save_ref_code aa_work text_length_5
273 | | | |<-------NEXT
274 | | | | | +--275 | | | | |
276 | | | | | SET local_save_ref_code aa_work text_length_5 TO
277 | | | | | l_grp_ppt_g_export subject_type_parameter_tv278 | | | | | reference_code
279 | | | | |
280 | | | | | SET SUBSCRIPT OF local_group_import TO SUBSCRIPT OF
281 | | | | | local_group_import + 1
282 | | | | | SET g_import ppt_subject_type_parameter_tv283 | | | | | generated_identification_number TO
284 | | | | | l_grp_ppt_g_export ppt_subject_type_parameter_tv generated_identification_number
285 | | | | | SET g_import ppt_subject_type_tv generated_identification_number TO
286 | | | | | l_grp_ppt_g_export ppt_subject_type_tv
287 | | | | | generated_identification_number
288 | | | | |
289 | | | | | SET SUBSCRIPT OF local_group_trial_options TO SUBSCRIPT OF
290 | | | | | local_group_trial_options + 1291 | | | | | SET local_grp_trial_options_id1 ppt_subject_type_tv
292 | | | | | generated_identification_number TO293 | | | | | l_grp_ppt_g_export ppt_subject_type_tv generated_identification_number
294 | | | | | SET local_grp_trial_options_id2 ppt_subject_type_parameter_tv
295 | | | | | generated_identification_number TO
296 | | | | | g_import ppt_subject_type_parameter_tv generated_identification_number
297 | | | | | SET local_grp_trial_options_ref_code aa_work text_length_5 TO
298 | | | | | l_grp_ppt_g_export subject_type_parameter_tv
299 | | | | | reference_code
9 of 13
![Page 10: Error Handling For Smarties](https://reader031.fdocuments.in/reader031/viewer/2022021214/577d2c671a28ab4e1eac1d5e/html5/thumbnails/10.jpg)
8/7/2019 Error Handling For Smarties
http://slidepdf.com/reader/full/error-handling-for-smarties 10/13
300 | | | | +--
301 | | | +--
302 | | |
303 | | | +- IF local_group_import IS NOT EMPTY
304 | | | |305 | | | | USE ipdrl131_view_subj_type_parm_opt
306 | | | | WHICH IMPORTS: Entity View local_qv_ref quote_version_tv TO Entity View importquote_version_tv
307 | | | | Entity View local product_tv TO Entity View import product_tv
308 | | | | Entity View local product_policy_type_tv TO Entity View import
product_policy_type_tv
309 | | | | Group View local_group_import TO Group View group_import
310 | | | | WHICH EXPORTS: Group View local_group_export FROM Group View group_export311 | | | | Work View local cde_error_return_message FROM Work View export
cde_error_return_message
312 | | | |
313 | | | | +- IF local cde_error_return_message return_code IS NOT EQUAL TO 1
314 | | | | |
315 | | | | | SET local itrv1_context_string context_string TO
316 | | | | | local cde_error_return_message context_string
317 | | | | | EXIT STATE IS n1060_1002_sub_type_opt_fail
318 | <------------ESCAPE
319 | | | | |
320 | | | | +- ELSE
321 | | | | |
322 | | | | | EXIT STATE IS 00001_00000_succ_completion
323 | | | | |
324 | | | | | NOTE ****************************************************************
325 | | | | | NOTE See if we can pipe for a given ref code326 | | | | | NOTE ****************************************************************
327 | | | | |
(Code Intentionally Omitted )
750 |
751 | NOTE *****************************************************************
752 | Error Handling753 | *****************************************************************
754 | USE ssj19991_translate_exit_state
755 | WHICH IMPORTS: Work View local itrv1_site TO Work View in itrv1_site
756 | Work View local itrv1_context_string TO Work View in itrv1_context_string
757 | WHICH EXPORTS: Work View export cde_error_return_message FROM Work View out
cde_error_return_message
758 +--
==========================================================================
+- CSUB0301_CHKIMPORTS
|
1 | SET out itrv1_site private_operation_id TO "CSUB0301"
2 | +- IF import product_tv id IS EQUAL TO local_initialized product_tv id
3 | | EXIT STATE IS n0020_1000_sub_mandimpmissing
10 of 13
![Page 11: Error Handling For Smarties](https://reader031.fdocuments.in/reader031/viewer/2022021214/577d2c671a28ab4e1eac1d5e/html5/thumbnails/11.jpg)
8/7/2019 Error Handling For Smarties
http://slidepdf.com/reader/full/error-handling-for-smarties 11/13
4 | | SET out itrv1_context_string substitution_value_1 TO "product id"
2 | +- ELSE IF import product_policy_type_tv id IS EQUAL TO
2 | | local_initialized product_policy_type_tv id
5 | | EXIT STATE IS n0020_1000_sub_mandimpmissing
6 | | SET out itrv1_context_string substitution_value_1 TO "Product Policy Type ID"2 | +- ELSE IF import country_tv code IS EQUAL TO local_initialized country_tv code
7 | | EXIT STATE IS n0020_1000_sub_mandimpmissing8 | | SET out itrv1_context_string substitution_value_1 TO "Country Code"
2 | +- ELSE IF import state_tv code IS EQUAL TO local_initialized state_tv code
9 | | EXIT STATE IS n0020_1000_sub_mandimpmissing
10 | | SET out itrv1_context_string substitution_value_1 TO "State Code"
2 | +- ELSE IF import policy_subject_address_tv zip IS NOT EQUAL TO
2 | | local_initialized policy_subject_address_tv zip2 | | AND import territory_tv code IS NOT EQUAL TO
2 | | local_initialized territory_tv code
11 | | EXIT STATE IS 01020_1001_sub_both_zip_and_terr
2 | +- ELSE IF import territory_tv code IS EQUAL TO local_initialized territory_tv
2 | | code
2 | | AND import policy_subject_address_tv zip IS EQUAL TO
2 | | local_initialized policy_subject_address_tv zip
12 | | EXIT STATE IS 01020_1000_sub_terr_and_zip_miss2 | +- ELSE IF import market_tv code IS EQUAL TO local_initialized market_tv code
13 | | EXIT STATE IS n0020_1000_sub_mandimpmissing14 | | SET out itrv1_context_string substitution_value_1 TO "Market Code"
2 | +- ELSE IF import quote_version_tv reference_date IS EQUAL TO
2 | | local_initialized quote_version_tv reference_date
15 | | EXIT STATE IS n0020_1000_sub_mandimpmissing
16 | | SET out itrv1_context_string substitution_value_1 TO
16 | | "Quote Version Reference "
17 | | SET out itrv1_context_string substitution_value_2 TO "Date"
2 | +- ELSE IF import subject_type_tv special_subject_type_code IS EQUAL TO2 | | local_initialized policy_subject_address_tv zip
18 | | EXIT STATE IS n0020_1000_sub_mandimpmissing
19 | | SET out itrv1_context_string substitution_value_1 TO "Subject Type"20 | | SET out itrv1_context_string substitution_value_2 TO
20 | | "Special Subject Type Code"
2 | +--
21 |
+--
============================================================================
1 +- SSJ19991_TRANSLATE_EXIT_STATE
29 | SET out cde_error_return_message origin_servid USING csub9991_setservid
30 |
31 | +- CASE OF EXITSTATE32 | +- CASE n1060_1000_sub_stripper_failed
33 | | SET out cde_error_return_message return_code TO -106034 | | SET out cde_error_return_message reason_code TO 1000
35 | | SET out cde_error_return_message rollback_indicator TO "Y"
36 | +- CASE n1060_1001_sub_view_prd_sb_fail
37 | | SET out cde_error_return_message return_code TO -1060
38 | | SET out cde_error_return_message reason_code TO 1001
39 | | SET out cde_error_return_message rollback_indicator TO "Y"
40 | +- CASE n1060_1002_sub_type_opt_fail
11 of 13
![Page 12: Error Handling For Smarties](https://reader031.fdocuments.in/reader031/viewer/2022021214/577d2c671a28ab4e1eac1d5e/html5/thumbnails/12.jpg)
8/7/2019 Error Handling For Smarties
http://slidepdf.com/reader/full/error-handling-for-smarties 12/13
41 | | SET out cde_error_return_message return_code TO -1060
42 | | SET out cde_error_return_message reason_code TO 1002
43 | | SET out cde_error_return_message rollback_indicator TO "Y"
44 | +- CASE n1060_1003_sub_view_pol_sub_fail
45 | | SET out cde_error_return_message return_code TO -106046 | | SET out cde_error_return_message reason_code TO 1003
47 | | SET out cde_error_return_message rollback_indicator TO "Y"48 | +- CASE n1060_1004_sub_add_pols_fail
49 | | SET out cde_error_return_message return_code TO -1060
50 | | SET out cde_error_return_message reason_code TO 1004
51 | | SET out cde_error_return_message rollback_indicator TO "Y"
52 | +- CASE n1060_1005_sub_pad_lead_zeros_fa
53 | | SET out cde_error_return_message return_code TO -106054 | | SET out cde_error_return_message reason_code TO 1005
55 | | SET out cde_error_return_message rollback_indicator TO "Y"
56 | +- CASE n1060_1006_sub_update_pol_subj_f
57 | | SET out cde_error_return_message return_code TO -1060
58 | | SET out cde_error_return_message reason_code TO 1006
59 | | SET out cde_error_return_message rollback_indicator TO "Y"
60 | +- CASE n0020_1000_sub_mandimpmissing
61 | | SET out cde_error_return_message return_code TO -2062 | | SET out cde_error_return_message reason_code TO 1000
63 | | SET out cde_error_return_message rollback_indicator TO "Y"64 | +- CASE n0020_1001_sub_marriage_gp_empty
65 | | SET out cde_error_return_message return_code TO -20
66 | | SET out cde_error_return_message reason_code TO 1001
67 | | SET out cde_error_return_message rollback_indicator TO "Y"
68 | +- CASE 01020_1000_sub_terr_and_zip_miss
69 | | SET out cde_error_return_message return_code TO 1020
70 | | SET out cde_error_return_message reason_code TO 1000
71 | | SET out cde_error_return_message rollback_indicator TO "Y"72 | +- CASE 01020_1001_sub_both_zip_and_terr
73 | | SET out cde_error_return_message return_code TO 1020
74 | | SET out cde_error_return_message reason_code TO 100175 | | SET out cde_error_return_message rollback_indicator TO "Y"
76 | +- CASE 00001_00000_succ_completion
77 | | SET out cde_error_return_message return_code TO 1
78 | | SET out cde_error_return_message reason_code TO 0
79 | | SET out cde_error_return_message rollback_indicator TO "N"
82 | +- OTHERWISE
83 | | NOTE Condition for Unexpected results. Any data changes should be rolled
84 | | back.
85 | | SET out cde_error_return_message return_code TO -999
86 | | SET out cde_error_return_message reason_code TO 99999
87 | | SET out cde_error_return_message rollback_indicator TO "Y"
88 | +--89 |
90 | SET out cde_error_return_message context_string USING csj19981_context_string91 | WHICH IMPORTS: Work View in itrv1_site TO Work View in itrv1_site
92 | Work View in itrv1_context_string TO Work View in itrv1_context_string
93 | Work View out cde_error_return_message TO Work View in
cde_error_return_message
94 +--
============================================================================
12 of 13
![Page 13: Error Handling For Smarties](https://reader031.fdocuments.in/reader031/viewer/2022021214/577d2c671a28ab4e1eac1d5e/html5/thumbnails/13.jpg)
8/7/2019 Error Handling For Smarties
http://slidepdf.com/reader/full/error-handling-for-smarties 13/13
1 +- CSJ19981_CONTEXT_STRING
37 |
38 | NOTE If no exception has been raised, return to exit states translator 39 |
40 | +- IF in itrv1_context_string context_string IS EQUAL TO SPACES41 | | +- IF in cde_error_return_message return_code IS EQUAL TO 1
42<---------ESCAPE
43 | | +--
44 | |
45 | | NOTE An exception has occurred within one of the public operation's private
46 | | services
47 | | MOVE in itrv1_context_string TO local itrv1_context_string
48 | | SET local itrv1_context_string origin_servid TO in cde_error_return_message
49 | | origin_servid
50 | | SET local itrv1_context_string return_code TO in cde_error_return_message
51 | | return_code
52 | | SET local itrv1_context_string reason_code TO in cde_error_return_message
53 | | reason_code54 | |
| |58 | | NOTE Pick up any substitution values which may have been set by the private
59 | | operation which raised the exception.
60 | |
62 | | SET out cde_error_return_message context_string USING ieh10022_context_string_build
63 | | WHICH IMPORTS: Work View in itrv1_site TO Work View import itrv1_site
64 | | Work View local itrv1_context_string TO Work View import itrv1_context_string
65 | |
66 | +- ELSE67 | |
68 | | SET out cde_error_return_message context_string TO in itrv1_context_string
69 | | context_string70 | +--
71 |
72 +--
13 of 13