|
Ravi, I would start by coding the error parameter a little differently. It should be at least 8 characters long so that you can determine whether you have an error. I would make it 256. It also appears as though the binary parameters are defined as 2 long. I would change it to 9b 0 or better yet 10i 0. Once you have an error structure you can determine whether the problem is in sending the message or displaying the message. If you are interested in doing this a little differently by sending the messages using sub-procedures I could send you some source. There was also a description of using the message APIs in Midrange Computing back in October 1998. I would really recommend that you consider looking into this. David Morris >>> Rowthu Ravichandra <Rowthu.Ravichandra@metamorgs.com> 03/23/99 02:26AM >>> I have used API's for subfile messages. Interestingly, On one run I find the messages displayed in the 24th line and on the other run, there are no messages. I am attaching the source code for the RPGLE program I have used. Can anyone explain why this happens?? I am now forced to write a CLP for the same task. FItempf uf a e k disk Fitemdsp cf e workstn D@stk s 4b 0 DPdate s d datfmt(*usa) D@len s 4b 0 D@err s 4b 0 C* C @AddItem Begsr C *IN03 DowEq *OFF C write msgctl C Exfmt itemmain * *Clearing Program Message Queue * C MoveL *BLANKS @Key C call 'QMHRMVPM' @Parm1 * *Validations * C If #itmcod = *Blanks C move 'MSG0001' @msgid C call 'QMHSNDPM' @parm2 C Iter C Else C Move #itmcod Itmcod C Itmcod Chain ItemRec 90 C If *IN90 = *On C Exsr @Add C Exsr @clear C Else c move 'MSG0002' @msgid c call 'QMHSNDPM' @parm2 C Exsr @clear1 C Endif C Endif C enddo * C @Add Begsr C Eval Desc = #Desc C Eval Sdesc = #Sdesc C Eval Uom = #Uom C Eval Rtlprc = #Rtlprc C Eval Wslprc = #Wslprc C If (Desc <> *Blanks) and C (Sdesc <> *Blanks) and C (Uom <> *Blanks) and C (Rtlprc <> *zeros) and C (Wslprc <> *zeros) C Write ITEMREC C Else C move 'MSG0001' @msgid C call 'QMHSNDPM' @parm2 C Endif C Endsr C @Clear Begsr C Move *Blanks #Itmcod C Exsr @Clear1 C Endsr * C @Clear1 Begsr C Move *Blanks #Desc C Move *Blanks #Sdesc C Move *Blanks #Uom C Move *Zeros #Rtlprc C Move *Zeros #Wslprc C Endsr * C *inzsr begsr C* C *Entry Plist C Parm #Opt 3 C* C Movel Udate Pdate C Movel Pdate #date C movel '*' @Pgmq C movel '*DIAG' @type C movel '*LIBL' @lib 10 C move @lib @msgf 20 C movel 'STOCKMSGF' @MSGF C movel '*ALL' @rmv 10 C move *blanks @key 4 C @parm1 plist C parm @pgmq C parm @stk C parm @key C parm @rmv C parm @err * C @parm2 plist C parm @msgid 7 C parm @msgf C parm @dta 80 C parm @len C parm @type 10 C parm @pgmq C parm @stk C parm @key C parm @err C Exsr @AddItem C endsr Thanks in advance Ravi Chandra +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.