|
>D #Error PR ExtPgm('PC0901CLMS') >D ErrorMsg 510A > >The call.. >#Error('Test'); > >If I do it this way I get an error message on >compile that "Parameter 1 is not valid as a >parameter passed by reference". Right. The prototype says that it wants a 510 byte string and the call supplies a 4 byte literal. Not a match. Ordinarily you would add the VALUE keyword to the parameter. Unfortunately, CL can only accept calls by reference. You could prototype the QMHSNDPM API and roll your own ILE-callable. If you're not up for that, consider wrappering the CL call inside a procedure of your own that DOES accept a string by value. The following isn't tested - it's straight from my fingertips to the email. You WILL need to work on it! d #error pr d errorMsg 510a value d PC0901CLMS pr extpgm('PC0901CLMS') d errorMsg 510a * mainline #error('Test'); *inlr = *on; p b d #error pi d errorMsg 510a value PC0901CLMS(errorMsg); p b That's the idea, anyway. --buck
As an Amazon Associate we earn from qualifying purchases.
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.