|
Hello Folks, I face a strange problem while trying to execute a message API. Following is the code Purpose of this program is 1. Send a break (*INQ) message to a user asking for some information 2. Receive the reply from the user 3. Store This Reply in a Database File along with user ID and Date of receipt The steps 1 & 2 are successful if I don't code for the 3rd step. For example the following code executes fine and the reply by the user appears In the variable MSGRCV. FMESSAGEPF O E DISK DMSGLEN S 9B 0 DUSRQTY S 9B 0 DMSGWAI S 9B 0 DMSGQUE S 20 DRCVM100 DS 256 DMSGID 12 18 DMSGKEY 21 24 DMSGSNDUSR 66 75 DMSGRCV 177 236 DDATEISO S D DATFMT(*ISO) C TIME DATEISO C EVAL %SUBST(MSGQUE : 1 : 10) = 'MESSAGEQ' C EVAL %SUBST(MSGQUE : 11: 10) = 'MYLIB' C EVAL MSGTXT = 'PLEASE GIVE ME THE INFORMATION' *************************************************************** sends break message to the user DANIEL **************************************************************** C CALL 'QEZSNDMG' C PARM '*INQ ' MSGTYP 10 C PARM '*BREAK' MSGMOD 10 C PARM MSGTXT 256 C PARM MSGTXT 256 C PARM 256 MSGLEN C PARM 'DANIEL' MSGLST 10 C PARM 1 USRQTY C PARM MSGSTS 1 C PARM MSGFNC 4 C PARM ERRCOD 1 C PARM 'N' MSGSHW 1 C PARM MSGQUE C PARM '*USR' MSGTP2 4 ***************************************************************** Receives the reply from the user ***************************************************************** C EVAL MSGTYP = '*RPY' C CALL 'QMHRCVM' C PARM MSGINF 256 C PARM MSGLEN C PARM 'RCVM0200' MSGFOR 8 C PARM MSGQUE C PARM MSGTYP C PARM MSGKEY 4 C PARM -1 MSGWAI C PARM '*REMOVE' MSGACT 10 C PARM ERRCOD C MOVEL MSGINF RCVM100 C SETON LR Now if I just add Code for the 3 rd step as highlighted in blue below ....That is to write the file MESSAGEPF with the Data I just received, I find the CALL to Program "QMHRCVM' goes in error for reasons I cannot Fathom. The program does not crash but it returns an error code CPF24A9 - which means MSGACT parameter is wrong (????).Also *blank is returned in MSGINF FMESSAGEPF O E DISK DMSGLEN S 9B 0 DUSRQTY S 9B 0 DMSGWAI S 9B 0 DMSGQUE S 20 DRCVM100 DS 256 DMSGID 12 18 DMSGKEY 21 24 DMSGSNDUSR 66 75 DMSGRCV 177 236 DDATEISO S D DATFMT(*ISO) C TIME DATEISO C EVAL %SUBST(MSGQUE : 1 : 10) = 'MESSAGEQ' C EVAL %SUBST(MSGQUE : 11: 10) = 'MYLIB' C EVAL MSGTXT = 'PLEASE GIVE ME THE INFORMATION' *************************************************************** sends break message to the user DANIEL **************************************************************** C CALL 'QEZSNDMG' C PARM '*INQ ' MSGTYP 10 C PARM '*BREAK' MSGMOD 10 C PARM MSGTXT 256 C PARM MSGTXT 256 C PARM 256 MSGLEN C PARM 'DANIEL' MSGLST 10 C PARM 1 USRQTY C PARM MSGSTS 1 C PARM MSGFNC 4 C PARM ERRCOD 1 C PARM 'N' MSGSHW 1 C PARM MSGQUE C PARM '*USR' MSGTP2 4 ***************************************************************** Receives the reply from the user ***************************************************************** C EVAL MSGTYP = '*RPY' C CALL 'QMHRCVM' C PARM MSGINF 256 C PARM MSGLEN C PARM 'RCVM0200' MSGFOR 8 C PARM MSGQUE C PARM MSGTYP C PARM MSGKEY 4 C PARM -1 MSGWAI C PARM '*REMOVE' MSGACT 10 C PARM ERRCOD C MOVEL MSGINF RCVM100 C EVAL MSGDAT = DATEISO C EVAL MSGUSR = MSGSNDUSR C EVAL MSGDTA = MSGRCV C WRITE MESSAGE C SETON LR Request someone of you to please solve this mystery Thanks & Regards, S.Chand DISCLAIMER: This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.
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.