× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



How nasty was it? Nasty enough to corrupt some of MY memory on the incident.
[smile].

In thinking about this now remember it was an array associated with the
MODS (logically associated, not overlapping memory)

"Steve Moland" <steve@xxxxxxxxxxx> wrote in
message news:fcmani$nk8$1@xxxxxxxxxxxxxxxx
If you're really, really stuck, have a look at all the parameter lists.
Make sure the called programs' definitions match the calling programs.
It seems bizarre, but it can happen that mis-mapped parameters can
cause memory corruption and not just around a 'CALL' operation.

Bizarre, but quite understandable when you find the problem. I've seen
this happen a number of times

where:

field B100 in program A (a parm on a call to Prog B) is clobbered after a
call to program B

where:

the programmer "knows" that program B did NOT touch field field B100, so
program B is not suspect and not examined.

What can happen is that the length of field B100 was increased in Prog A
but since the programmer "knew" prog B didn't use that field, Prog B never
got changed.

Let's say field B100 in program A is 100 bytes long, but in prog B it is
still an original 80 bytes. If field B100 is in D spec (in both programs)
and is follow by a data field B20 20 bytes long (in both programs) and
field B20 is changed in program B, then data gets corruupted because the
20 bytes of field B20 are addressing the same bytes in memory as bytes 81
to 100 of field B100 in program A.

The nastiest time I've had with this involved a MODS where I changed the
number occurrances. Mine was harder to find because the failure was on a
customers machine where the customer forgot to make the change to the
number of occurrences in their copy of program B. Drove me nuts trying to
figure out why their application failed and my copy worked fine.

Program B was essentially a USER EXIT program which I didn't write.

Steve






--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.