Since I don’t know what the code in the RPGLE looks like, I can only guess. You say the error occurs before a line of code gets executed. If this is the case I would look at your D-specs to see if you are loading a data structure especially one using the program feedback area (SDS) or the local data area (*LDA). If you are defining a numeric subfield within a data structure and the system is trying to initialize it with character data this could be a cause. Use the INZ keyword on data structure definitions to initialize subfields at startup to the correct default values for the field type.
Do you have an *INZSR subroutine that is trying to initalize variables in your proram at startup? Check this as well.
Hope this helps.