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...
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...
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.
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
href="http://www.freshpoint.com">color="#408080"> The Fresh Produce Experts Michael Daly, Sr. P/A (972) 392-8169
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.
If you will email me at harriman@lpsi.com with your fax number, I will send you an example.
Look at Harbinger
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 ....
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.