× 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.




I have a dilemma and I know that one of you can help me out. For the
simplicity sake lets say I have a section of code and three sub
procedures that took the place of subroutines and now my message subfile
does not work.

Nothing else has change except for making the subroutines.

Please lets not get into why I changed them but why it is not working.

Below is a snippet of code from the program.

Through debug I can watch it perform the sndmsg but when the format is
displayed now error message is displayed.

I tried it with Subroutines and it works.

WHY????

Thanks Guys. 

     d******************************************************************
     d  msgid          s              7a
     d  msgloc         s             20a   inz('FRX001A   *LIBL     ')
     d  msgRplDta      s             20a   inz('                    ')
     d  msgRplDtaLen   s             10i 0 inz(0)
     d  msgType        s             10a   inz('*DIAG')
     d  msgQueue       s            276a   inz('*')
     d  msgCallStack   s              4b 0 inz(0)
     d  msgKey         s              4a   inz(' ')
     d  msgErr         s              4b 0 inz(0)
     d  msgRmv         s             10a   inz('*ALL')
     d*************************************
     d* Send Messages to Message Queue
     d*************************************
     D SendMsg         pr                    ExtPgm('QMHSNDPM')
     D  msgid                         7a
     d  msgloc                       20a
     d  msgRplDta                    20a
     d  msgRplDtaLen                 10i 0
     d  msgType                      10a
     d  msgQueue                    276a
     d  msgCallStack                  4b 0
     d  msgKey                        4a
     d  msgErr                        4b 0
     d*************************************
     d* Remove Messages
     d*************************************
     D ReceiveMsg      pr                   ExtPgm('QMHRMVPM')
     d  msgQueue                    276a
     d  msgCallStack                  4b 0
     d  msgKey                        4a
     d  msgRmv                       10a
     d  msgErr                        4b 0    
                                                  
     D SndMsg          PR
     D RcvMsg          PR
     D Main            PR

      /free

        Main();
        
        *inlr = *on;

        /end-free



     p Main            e
      /free
         msgid = 'PK00001';
         SndMsg();
         write msgctl; // Message Subfile
         exfmt pkd00201; 
      /end-free
     p Main            e               


     p SndMsg          b
      /free

                Callp SendMsg(msgid:msgLoc:msgRplDta:msgRplDtaLen:
 
msgType:msgQueue:msgCallStack:msgKey:msgErr);

      /end-free
     p SndMsg          e
       //
******************************************************************
       // * Receive Message to Subfile Routine
       //
******************************************************************

     p RcvMsg          b
      /free
               Callp
ReceiveMsg(msgQueue:msgCallStack:msgKey:msgRmv:msgErr);
      /end-free
     p RcvMsg          e    

                        
Bruce "Hoss" Collins
IBM Certified Specialist - eServer i5 iSeries System Administrator V5R3
Cisco Certified Network Associate
AAA Cooper Transportation
Dothan, AL 36303
(334)793-2284 x2434


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.