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



On 6/22/2023 11:24 AM, tim ken wrote:
No, just got confused the link which I shared with the desired functions in
my previous email is the modified version of the program of the link which
you just prescribed here so the modified code is not getting compiled.

There are so many errors in both of these source members that it is very very difficult to work out how to address them all. Some are easy: you can't name the parameter ProgramInfo the same as LIKE(ProgramInfo).

The QCLRPGMI exists, but the parameter list in the code does not match the parameter list for the API: https://www.ibm.com/docs/en/i/7.4?topic=ssw_ibm_i_74/apis/qclrpgmi.html



Some issues are really hard.

The first call to CallProgramReferences looks like this:

callp CallProgramReferences(ReferenceList : NumReferences : DriverProgram);

if (NumReferences > 0);
dsply ('Referenced Programs:');
for i = 1 to NumReferences;
dsply ReferenceList(i).CalledProgram;
endfor;
else;
dsply 'No referenced programs found for ' + DriverProgram;
endif;


Seems reasonable enough until you look at the second call to it:

callp(E) CallProgramReferences(Receiver : ReceiverLength : NextProgram);

...which is inside of itself; a recursive call.
CallProgramReference is delcared thus:

dcl-proc CallProgramReferences;
dcl-pi *n;
Receiver likeds(CallDetails) dim(500);
ReceiverLength packed(10: 0);
ProgramName char(10) const;
end-pi;


So, the second one is correct, but what is to be done about the first one? Not only is the parameter list wrong, but the logic of the section is based on a return parameter that isn't set.


Maybe the thing that caused this entire meltdown is this:

callp(E) 'QBNRPRV' (ProgramName : %addr(ProgramInfo) : %size(ProgramInfo));

I have never heard of this API. The program is not on my 7.4 system, I can't find a reference in the IBM Knowledge Center's API finder, and Google has no references to it either. Unless you have a special PTF that installs this, I can't see how any of this would work even if you managed to scrub all of the compile-time errors.

Perhaps you need to go back to the source of the original code and find out what they did to make this work.

Good luck!


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.