I was adding a couple of parameters and monmsg mch3601 to a CLLE function called from many and unspecified programs.
To avoid it falling over I was being careful to ensure that the first executable code was a
Chgvar / monmsg mch3601
of the parameter which may have been omitted on a call from an unchanged CL.
When I was frightened by finding the clipping below, from Barbara Morris no less.
Does this still apply?
Can anyone improve on the technique?
Surely i5 is too grown up to allow a bad program to corrupt data.
- - - - - - - - - - - - - - - - - - -
You can monitor for MCH3601 to check for unpassed parameter.
CLLE parameter checking like %Parms in RPGLE
Posted by Guest.Visitor - 2000/10/10 06:43
Gene, that's not reliable. There's no guarantee that you will get a MCH3601 if
the parameter isn't passed; there may occasionally be a valid pointer where the
CLLE program/procedure is looking for the parameter. If you use that
"parameter"'s value, your program won't run properly, and if you change that
"parameter", you will corrupt some storage, who knows where (possibly different
every time, depending on what calls were made before the CLLE was called ).
When you corrupt storage, if you're lucky you'll get a nice noisy exception; if
you're unlucky you'll corrupt more storage, and possibly your database will get
Barbara Morris, IBM Toronto Lab, RPG Compiler Development
May 5, 2009 2:37 PM
July 24, 2009 4:02 PM