IBM Support

IBM i Debugger reserved keywords

Question & Answer


Question

What are the list of debugger reserved keywords to avoid when defining variable names in an application programs?

Cause

There are some keywords in debugger which if used as variable names in application programs may cause unpredictable results when using the debugger to evaluate expressions.
For example, "PGM" is a reserved word for the debugger.
When evaluating  EVAL PGM you will get “CPF7E15 - Syntax error occurred”.
 

https://www.ibm.com/docs/en/i/7.4?topic=expressions-using-debug-built-in-functions

ILE RPG Programmer's Guide documents:
Use the %VARS debug built-in function when the variable name conflicts with any of the debug

command names. For example, EVAL %VAR(EVAL) can be used to evaluate a variable named EVAL, whereas EVAL EVAL would be a syntax error.

Use EVAL %VAR(PGM) to display the value.

 

Answer

Reserved keywords in IBM i Debugger
For ILE RPG:
1: OF   
2: OR  
3: AND  
4: NOT  
5: PGM
6: EVAL  
7: QUAL  
8: STEP  
9: INTO  
10: OVER
11: ATTR
12: WHEN  
13: USER  
14: BREAK  
15: CLEAR  
16: %ADDR  
17: watch  
18: WATCH  
19: outof  
20: OUTOF
21: %INDEX
22: SBREAK  
23: TBREAK  
24: _LSOFF  
25: %OCCURS
26: %LOOKUP
27: %SUBSTR

For ILE C:
1: at   
2: AT  
3: int  
4: pgm  
5: PGM
6: char  
7: enum  
8: eval  
9:  EVAL  
10: into
11: INTO
12: list  
13: LIST  
14: long  
15: over  
16: OVER  
17: qual  
18: QUAL  
19: step  
20: STEP
21: void
22: when  
23: WHEN  
24: attr  
25: ATTR
26: USER
27: user
28: break  
29: BREAK  
30: class
31: clear  
32: CLEAR
33: float
34: short  
35: union
36: watch  
37: WATCH  
38: errno
39: outof
40: OUTOF
41: double  
42: signed  
43: struct  
44: _LSOFF  
45: TBREAK
46: tbreak
47: SBREAK  
48: sbreak  
49: __ptr64
50: unsigned
51: __ptr128
52: __THREADID
53: _Decimal32  
54: _Decimal64
55: _Decimal128
56: __EXPBASECLSON_  
57: __EXPBASECLSOFF  
58: somDumpToString  
59: somPrintToString

For JAVA:
1:  LIST   
2: list  
3: EVAL  
4: eval  
5: QUAL
6: qual  
7: BREAK  
8: break  
9: WHEN  
10: when
11: SBREAK
12: sbreak  
13: USER  
14: user  
15: CLEAR  
16: clear  
17: PGM  
18: pgm  
19: ATTR  
20: attr
21: STEP
22: step  
23: OVER  
24: over  
25: into
26: INTO
27: outof
28: OUTOF  
29: TBREAK  
30: tbreak
31: watch  
32: WATCH
33: this
34: super  
35: byte
36: short  
37: int  
38: long
39: char
40: float
41: double  
42: null  
43: true  
44: false  
45: boolean
46: instanceof
47: __JavaThreadName  
48: _DCODETRACE  
49: __THREADID

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000C4BAAU","label":"IBM i"}],"ARM Case Number":"TS010951671","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]

Document Information

Modified date:
26 October 2022

UID

ibm16832248