|
Simon, To a certain degree you can use a fixed name. By default, I send all user messages for interactive jobs to a single program queue. In a batch job I send them to *PRV. I also do this with a standard set of procedures I wrote a few years back. Those procedures hide many of the ugly details of PEPs etc. They do allow you to override this behavior. The procedures I use are available free and are open source. Anyone can download them as part of the iSereis-toolkit at http://www.iseries-toolkit.org. The documentation page for the project contains an example showing how the message procedures are used. David Morris >>> shc@flybynight.com.au 02/22/02 22:15 PM >>> ...You'll probably find that it was sent to the _QRNP_PEP_mod-name procedure (where mod-name is the name of the main module). You can use the prefix '_QRNP_PEP_' and concatenate the contents of the *PROC field from the Program Status Data Structure to derive the name of the entry procedure and send the mesage to 1 above that. For example: D PSDS DS D PSDS_Pgm *PROC C callp SndPgmMsg('CPF9898': C 'QCPFMSG *LIBL ': C MsgTxt: C %Len(MsgTxt): C '*INFO': C '_QRNP_PEP_' + PSDS_Pgm : C 1: C KeyVal: C dsEC) NOTE: While prototyping the API directly is a good idea you should also encaspulate it in a procedure that can determine most of the input parameters itself. Doing this properly will simplfy the interface immensely. (Of course if the compiler used a fixed entry name like CLLE and C do you wouldn't have to stuff around with building a call stack entry name and could simply encapsulate the target call stack queue in the procedure) Regards, Simon Coulter.
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.