× 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.



Hi,



someone has an idea what happens?



If have to call a procedure written in RPG (but by a C-Programmer).

Within this procedure a local data structure is defined with based(Pointer).

The first statement within this procedure calls the procedure malloc to
allocate storage and to get a pointer on this storage.

After memset is used to initialize this storage.



D MyDS DS
Based(MyDS_p)

D . . . Datastructure Subfields



D MyPtr S *

/Free

MyDS_p = malloc(%Size(MyDS));

memset(MyDS_p: 0: %Size(MyDS));

?..



/End-Free



In an specific environment it works the first time I call the procedure, but
for all subsequent calls MyDS_p is returned as *NULL-Value (and I have no
idea why, there is no joblog entry either ).

If I call the same procedure from an other program within the same job it
works without problems, even for repeated calls.



I know it would be easier to define the data structure directly without
based, but it is an old procedure and I cannot change it.



Someone has an idea what happened.

My colleague assumes it is because I?m using named activation groups, while
all other programs and service program (also this one where the procedure is
located) run in the QILE default activation group.

But I cannot imagine that different activation groups may cause this
problem.



Mit freundlichen Grüßen / Best regards



Birgitta Hauser



"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)

"If you think education is expensive, try ignorance." (Derek Bok)

"What is worse than training your staff and losing them? Not training them
and keeping them!"




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.