Debugging
CACHEINFO
Definition
Prints information about cached table records to SYSPRINT
.
Prototype
VOID CACHEINFO()
Returns
VOID
Example
INSMSG
Definition
Inserts a message. When the message text contains variables, their values must be passed to the PARM
list.
Prototype
VOID INSMSG(STR CODE)
VOID INSMSG(STR CODE, LST PARM)
Returns
VOID
Parameters
CODE
: Message codePARM
: List with message parameters that are of typeSTR
Example
The function uses the messages that are defined under JCK-MSG
. Each message has a CODE
, a SEVERITY
and a MESSAGE
that can contain variables.
INSMSGEX
Definition
Inserts a message with an explicit severity. When the message text contains variables, their values must be passed to the PARM
list.
Prototype
VOID INSMSGEX(STR CODE, NUM SEVERITY)
VOID INSMSGEX(STR CODE, NUM SEVERITY, LST PARM)
Returns
VOID
Parameters
CODE
: Message codeSEVERITY
: Message severity0
-> Info4
-> Warning8
-> Error12
-> Fatal error
PARM
: List with message parameters that are of typeSTR
Example
For this example, the same messages are being used as in INSMSG.
SAY
Definition
Prints a value to SYSPRINT
. Optionally, a prefix can be defined that is appended in front of the value.
Prototype
VOID SAY(STR VALUE)
VOID SAY(STR PREFIX, STR VALUE)
VOID SAY(BOOL VALUE)
VOID SAY(STR PREFIX, BOOL VALUE)
VOID SAY(LST VALUE)
VOID SAY(STR PREFIX, LST VALUE)
VOID SAY(VOID VALUE)
VOID SAY(STR PREFIX, VOID VALUE)
VOID SAY(OBJ VALUE)
VOID SAY(STR PREFIX, OBJ VALUE)
Returns
VOID
Parameters
VALUE
: Printed valuePREFIX
: Appended value in front
Example
Using a prefix can be useful, if a variable is being used that changes depending on the context (e.g. a different system). This could also be achieved via concatenation.
Last updated