View Full Version : OPNQRYF with RPGILE
01-01-1995, 02:00 AM
I converted and RPGIII program to ILE. The CL has an OPNQRYF command in it. The RPG does not utilize the ODP from the OPNQRYF. Please help...
07-14-1999, 02:46 PM
On Wednesday, July 14, 1999, 01:22 PM, Charles Domeracki wrote: I converted and RPGIII program to ILE. The CL has an OPNQRYF command in it. The RPG does not utilize the ODP from the OPNQRYF. Please help. <hr>Charles, Is the CL an OPM (CLP) or ILE (CLLE) program? When you compiled the RPGLE source, what actication group did you give it? The problem you are having is because the RPGLE program is not running in the same activation group as the CL which calls it. Michael <hr><a > href="http://www.freshpoint.com"><imgsrc="http://www.freshpoint.com/graphics/f ooterlogo.GIF"border="0" width="162" height="48"></a><font > color="#408080"> The Fresh Produce Experts Michael Daly, Sr. P/A (972) 392-8169</font>
07-22-1999, 04:54 AM
I apologise because this has nothing to do with this thread, but how did you guys get the previous post into your answers? I tried copy and paste but that didn't work.
07-22-1999, 06:12 AM
If you will email me at email@example.com with your fax number, I will send you an example.
07-23-1999, 09:23 AM
Look at Harbinger (http://www.harbinger.com/resource/X12/)
08-06-1999, 01:21 AM
First thing first : A big thank you to Gene Gaunt. Here is the function you can use to retrieve previous commands. This function is based on the MSGTKT by David Morris. The only problem with this function is if you want to retreive a command from your rpg program your must call a little CL in order to place and receive the command in the *EXT pgmq before calling QCMDEXEC.... The CL look like : PGM PARM(&CMD) DCL &CMD *CHAR 6000 DCL &ERRCOD *CHAR 4 VALUE(X'00000000') DCL &MSGKEY *CHAR 4 DCL &MSGTYP *CHAR 40 VALUE('*COMP *DIAG *ESCAPE *INFO') DCL &NBRTYP *CHAR 4 VALUE(X'00000004') DCL &PGMQUE *CHAR 10 VALUE('*') DCL &STKCNT *CHAR 4 VALUE(X'00000000') /* Send the command to the job as a request message */ SNDPGMMSG MSG(&CMD) TOPGMQ(*EXT) MSGTYPE(*RQS) KEYVAR(&MSGKEY) RCVMSG PGMQ(*EXT) MSGKEY(&MSGKEY) RMV(*NO) /* Move msgs received by this program to the caller */ CHGVAR &MSGKEY VALUE(' ') CALL QMHMOVPM PARM(&MSGKEY &MSGTYP &NBRTYP &PGMQUE &STKCNT &ERRCOD) ENDPGM If any one can suggest a way to do that within a RPG program, that would be great ....
08-06-1999, 05:45 AM
Yes, an RPG program can send itself the *RQS message. Call the QMHSNDPM API, specify call stack entry "*" and call stack counter "0" (which is equivalent to SNDPGMMSG TOPGMQ(*SAME)), capture the message key, then input that message key into QMHRCVPM API. You can also specify call stack entry "*EXT" (which is equivalent to SNDPGMMSG TOPGMQ(*EXT)), but be aware that receiving a message from *EXT changes the message key, because you have moved the message from the *EXT message queue to the receiving program's message queue. If for some reason you need to reference that message again by key, perhaps to remove it from the job log, then you need to extract the new message key from QMHRCVPM API's receiver variable.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.