← All errors

MCH

MCH3601 Pointer not set

Most common cause

Use of a null pointer. In RPG the typical case is a parameter the caller did not pass and the callee uses.

Other causes

  • An OPTIONS(*NOPASS) parameter used without checking %PARMS.
  • An OPTIONS(*OMIT) parameter used without checking that %ADDR(parameter) is not *NULL.
  • Storage allocated with %ALLOC and already freed.

How to fix it

Check %PARMS for optional parameters and %ADDR for omitted ones. Align the number of parameters between caller and callee: always use prototypes in a shared /COPY. In RPG it arrives as RNQ0222.

Related errors