> in an SQL ILE/C pgm. I do not get the message when I run the > pgm in debug! This 'in production mode but not in debug' generally hints at one of two things; (i) An variable that is not initialised. It could be one used in the call, or one that is on the stack 'next to' one of the variables used in the call and the function is reading the garbage in this uninitialised variable. (ii) A null terminated variable, that's not null terminated. This often happens if you allocate memory for a variable but don't allocated enough for the null terminator. The function you call my be using the null terminator as a 'stopper' and as it's missing is running over the end of the variable and using data from the 'next' variable in memory. Although it's more work and seems redundant given that other languages do it for you, in C/C++ you should try to get into the habit of explicitly initialising variables (where you can) when you declare them - it will help reduce these kind of issues where it will take hours/days to track down. Also some of these issues like this seem worse on various releases than others and so while without explicitly initialising them it 'works' on your system when you move the code to another system it could start failing. --phil
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.