This section provides an example of modifying a customizable parser
to add more complete error messages to the userid.SCLMERR.LISTING
data set. This support can be added to all of the customizable parsers.
The COBOL parser, FLMLRCBL, will be used in this example.
The error_listing routine is used to place the error_string1 and error_string2 strings
into the error messages data set. error_string1 and error_string2 are
set before invoking error_listing. The following list identifies,
in order, the routine, the expanded English error message, and the
error string to be changed in FLMLRCBL.
- Routine
- Change Required
- initialization
- Change:
error_string1 = miss_parm1 ' ' ||,
miss_parm2 ' ' ||,
miss_parm3
to error_string1 = 'MISSING PARAMETER(S): ' ||,
miss_parm1 ' ' ||,
miss_parm2 ' ' ||,
miss_parm3
- initialization
- Change:
error_string1 = 'LISTSIZE=',
||sclm_dep_array_size
error_string2 = ' LISTSIZE < ',
DEP_ELEM_SIZE
to error_string1 = 'LISTSIZE PARAMETER MUST BE AT LEAST',
DEP_ELEM_SIZE
error_string2 = '
- initialization
- Change:
error_string1 = 'LISTSIZE=',
||sclm_dep_array_size
to error_string1 = 'LISTSIZE PARAMETER MUST BE A '||,
'POSITIVE WHOLE NUMBER'
- initialization
- Change:
error_string1 = 'LISTINFO=',
||sclm_dep_addr
to error_string1 = 'LISTINFO PARAMETER MUST BE A '||,
'POSITIVE WHOLE NUMBER'
- initialization
- Change:
error_string1 = 'STATINFO=',
||sclm_stats_addr
to error_string1 = 'STATINFO PARAMETER MUST BE A '||,
'POSITIVE WHOLE NUMBER'
- process_line
- Change:
error_string1 = token
to error_string1 = 'DEPENDENCY 'token' EXCEEDS 8 '||,
'CHARACTERS ON LINE '||,
stats.total_lines
- add_dep
- Change:
error_string1 = name
to error_string1 = 'DEPENDENCY ARRAY CAPACITY EXCEEDED '||,
'WITH DEPENDENCY 'name
- termination
- Change:
error_string1 = SINGLE_QUOTE state.single_line
to
error_string1 = 'MISMATCHED SINGLE QUOTE ON ' state.single_line
- termination
- Change:
error_string1 = DOUBLE_QUOTE state.double_line
to
error_string1 = 'MISMATCHED DOUBLE QUOTE ON ' state.double_line
- termination
- Change:
error_string1 = END_KEYWORD
to
error_string1 = 'DEPENDENCY ARRAY CAPACITY EXCEEDED,'
error_string2 = 'NOT ENOUGH SPACE TO WRITE END-OF-LIST KEYWORD'