×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




Hi all,

I'd like to know why this code crashes on the SECOND call to mysp :
In mysp, at the execution of "eval parmError = blank", I'm getting MCH3601 'pointer not defined for referenced memory position'

If I do : "%OCCUR ( myMODS ) = 1;" before the call to mysp, the problem does not occur.

The code in module2 was just to encapsulate the rpgIII that returned a MODS. But note the parameter definitions : in module2, parmMods is NOT a MODS.
How does it work?

Thanks in advance!


********************************************
Module 1

D myMODS DS likeds(ref_mods)
D occurs(20)

DOU condition

mysp ( parm : myMODS : Error );

FOR wJ = 1 TO %ELEM ( myMODS );
%OCCUR ( myMODS ) = wJ;
// do stuff
ENDFOR;

ENDDO;

**********************************************
Module 2
D ref_mods e ds extname(a_file)
d mysp pi
d parm 6
d parmMods like(ref_mods)
d parmerror


c call 'rpgiii'
c parm parm
c parm parmMods
c parm rpgIIIerror

c eval parmError = blank

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