× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Why are you using API's for subfile messages. Can't subfile messages be
coded without the use of API's?

                -----Original Message-----
                From:   Rowthu Ravichandra
[mailto:Rowthu.Ravichandra@metamorgs.com]
                Sent:   Tuesday, March 23, 1999 9:26 AM
                To:     MIDRANGE-L@midrange.com
                Subject:        API for subfile messages.

                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
                +---
+---
| 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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.