Loading ...
Sorry, an error occurred while loading the content.

RE: [Easy400Group] RPG XML parser

Expand Messages
  • michael.haston@mmbb.org
    Antoon - I m wondering why you needed the CONST keyword with that LIKEDS spec? Is it because you gave a DIM? I haven t used XML-INTO all that often, but I
    Message 1 of 15 , Mar 1, 2012
    • 0 Attachment

      Antoon -

      I'm wondering why you needed the CONST keyword with that LIKEDS spec?  Is it because you gave a DIM?  I haven't used XML-INTO all that often, but I did a fairly complex parse with many loops using LIKEDS and didn't seem to need CONST.

      Just curious.


      Mike






      Antoon van Os <Antoon.van.Os@...>
      Sent by: Easy400Group@yahoogroups.com

      02/28/2012 04:58 AM

      Please respond to
      Easy400Group@yahoogroups.com

      To
      Easy400Group yahoogroups.com <easy400group@yahoogroups.com>
      cc
      Subject
      RE: [Easy400Group] RPG XML parser





       

      I have recently finished an RPG ILE program that parses XML directly with the XML INTO support,
      works perfectly, it's available as of V5R4. However : beware of IBM's examples, there is a keyword missing in the Ref. manual.
      This is an example that compiles and works :

      d getDetailRecord...                                            
      d                 pr            10i 0                          
      d rc                             1                              
      d record                              dim(10) likeDs(rec) const
      d numberOfRecords...                                            
      d                               10u 0 value                    

      In IBM's example the CONST keyword is missing. Without it you cannot even get it to compile...
      Jon Paris pointed me in the right direction on this.
      Just thought I'd let you know.

      Good parsing,

      Antoon


      To: Easy400Group@yahoogroups.com
      From: kevin.turner@...
      Date: Tue, 28 Feb 2012 09:07:21 +0000
      Subject: RE: [Easy400Group] RPG XML parser

       

      Just Google "rpgle xml parser" to learn about XML-INTO or XML-SAX or a non-RPG conversion of EXPAT by Scott Klement that you can use with RPG: http://www.scottklement.com/expat/

      -----Original Message-----
      From:
      Easy400Group@yahoogroups.com [mailto:Easy400Group@yahoogroups.com] On Behalf Of rng5000
      Sent: 28 February 2012 03:25
      To:
      Easy400Group@yahoogroups.com
      Subject: [Easy400Group] RPG XML parser

      Greetings:

      Can anyone suggest a good and free RPG XML parser program that will allow to read and extract info from any xml file?

      Thanks

      ------------------------------------

      Yahoo! Groups Links

      NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.

      ----------------------------------------------------------

      CoralTree Systems Limited
      25 Barnes Wallis Road
      Segensworth East, Fareham
      PO15 5TT

      Company Registration Number 5021022.
      Registered Office:
      12-14 Carlton Place
      Southampton, UK
      SO15 2EA
      VAT Registration Number 834 1020 74.










      This message is for the use of the intended recipient only. It may be privileged,
      confidential, or otherwise protected from disclosure. If you are not the
      intended recipient, please immediately delete all copies of this message and
      its attachments and contact us at service@... so we can take steps to
      avoid such transmission errors in the future. Thank you.


       







    • Jon Paris
      The CONST is required by the compiler so you have no choice but to supply it. The reason it is required is that the parser is passing you a pointer to its own
      Message 2 of 15 , Mar 1, 2012
      • 0 Attachment
        The CONST is required by the compiler so you have no choice but to supply it.

        The reason it is required is that the parser is passing you a pointer to its own buffers and wants to be sure that you cannot make changes to that buffer.



        Jon Paris


        On Mar 1, 2012, at 6:46 AM, michael.haston@... wrote:

        Antoon - 

        I'm wondering why you needed the CONST keyword with that LIKEDS spec?  Is it because you gave a DIM?  I haven't used XML-INTO all that often, but I did a fairly complex parse with many loops using LIKEDS and didn't seem to need CONST. 

        Just curious. 


        Mike
         
      • Jon Paris
        Just to further clarify. This arises when you are using XML-INTO with %Handler. It is a requirement for the handler s prototype. ... Jon Paris
        Message 3 of 15 , Mar 1, 2012
        • 0 Attachment
          Just to further clarify. 

          This arises when you are using XML-INTO with %Handler.  It is a requirement for the handler's prototype.


          On Mar 1, 2012, at 6:46 AM, michael.haston@... wrote:

          I'm wondering why you needed the CONST keyword with that LIKEDS spec?  Is it because you gave a DIM?  I haven't used XML-INTO all that often, but I did a fairly complex parse with many loops using LIKEDS and didn't seem to need CONST. 

          Just curious. 


        • Antoon van Os
          Mike, Were you using %handler at the time ? My remark applies to %handler only. ( I was on V5R4 and 64K was not enough for the XML I had to parse ). Antoon To:
          Message 4 of 15 , Mar 1, 2012
          • 0 Attachment
            Mike,
             
            Were you using %handler at the time ?
            My remark applies to %handler only.
             
            ( I was on V5R4 and 64K was not enough for the XML I had to parse ).

            Antoon 

            To: Easy400Group@yahoogroups.com
            CC: easy400group@yahoogroups.com
            From: michael.haston@...
            Date: Thu, 1 Mar 2012 06:46:50 -0500
            Subject: RE: [Easy400Group] RPG XML parser

             

            Antoon -

            I'm wondering why you needed the CONST keyword with that LIKEDS spec?  Is it because you gave a DIM?  I haven't used XML-INTO all that often, but I did a fairly complex parse with many loops using LIKEDS and didn't seem to need CONST.

            Just curious.


            Mike






            Antoon van Os <Antoon.van.Os@...>
            Sent by: Easy400Group@yahoogroups.com

            02/28/2012 04:58 AM

            Please respond to
            Easy400Group@yahoogroups.com


            To
            Easy400Group yahoogroups.com <easy400group@yahoogroups.com>
            cc
            Subject
            RE: [Easy400Group] RPG XML parser





              I have recently finished an RPG ILE program that parses XML directly with the XML INTO support,
            works perfectly, it's available as of V5R4. However : beware of IBM's examples, there is a keyword missing in the Ref. manual.
            This is an example that compiles and works :

            d getDetailRecord...                                            
            d                 pr            10i 0                          
            d rc                             1                              
            d record                              dim(10) likeDs(rec) const
            d numberOfRecords...                                            
            d                               10u 0 value                    

            In IBM's example the CONST keyword is missing. Without it you cannot even get it to compile...
            Jon Paris pointed me in the right direction on this.
            Just thought I'd let you know.

            Good parsing,

            Antoon

            To: Easy400Group@yahoogroups.com
            From: kevin.turner@...
            Date: Tue, 28 Feb 2012 09:07:21 +0000
            Subject: RE: [Easy400Group] RPG XML parser

             

            Just Google "rpgle xml parser" to learn about XML-INTO or XML-SAX or a non-RPG conversion of EXPAT by Scott Klement that you can use with RPG: http://www.scottklement.com/expat/

            -----Original Message-----
            From:
            Easy400Group@yahoogroups.com [mailto:Easy400Group@yahoogroups.com] On Behalf Of rng5000
            Sent: 28 February 2012 03:25
            To:
            Easy400Group@yahoogroups.com
            Subject: [Easy400Group] RPG XML parser

            Greetings:

            Can anyone suggest a good and free RPG XML parser program that will allow to read and extract info from any xml file?

            Thanks

            ------------------------------------

            Yahoo! Groups Links

            NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.

            ----------------------------------------------------------

            CoralTree Systems Limited
            25 Barnes Wallis Road
            Segensworth East, Fareham
            PO15 5TT

            Company Registration Number 5021022.
            Registered Office:
            12-14 Carlton Place
            Southampton, UK
            SO15 2EA
            VAT Registration Number 834 1020 74.










            This message is for the use of the intended recipient only. It may be privileged,
            confidential, or otherwise protected from disclosure. If you are not the
            intended recipient, please immediately delete all copies of this message and
            its attachments and contact us at service@... so we can take steps to
            avoid such transmission errors in the future. Thank you.


             








          • Rothwell, Jim (NBCUniversal)
            Of course, the strictly technical reason you have to use CONST here is because the called entry point s prototype was defined with the CONST parameter, and the
            Message 5 of 15 , Mar 1, 2012
            • 0 Attachment
              Of course, the strictly technical reason you have to use CONST here is because the called entry point's prototype was defined with the CONST parameter, and the binder (not really the compiler) enforces the attribute match between the caller and the called.
              ------Original Message------
              From: Jon Paris
              To: Easy400Group
              ReplyTo: Easy400Group
              Subject: Re: [Easy400Group] RPG XML parser
              Sent: Mar 1, 2012 7:03 AM

                The CONST is required by the compiler so you have no choice but to supply it.

              The reason it is required is that the parser is passing you a pointer to its own buffers and wants to be sure that you cannot make changes to that buffer.


              Jon Paris

              On Mar 1, 2012, at 6:46 AM, michael.haston@... wrote: Antoon - 

              I'm wondering why you needed the CONST keyword with that LIKEDS spec?  Is it because you gave a DIM?  I haven't used XML-INTO all that often, but I did a fairly complex parse with many loops using LIKEDS and didn't seem to need CONST. 

              Just curious. 


              Mike
               
            • Rothwell, Jim (NBCUniversal)
              Sorry, Jon. When I saw your first reply I thought it could use a little clarification. I should have checked first for more recent messages. ... From: Jon
              Message 6 of 15 , Mar 1, 2012
              • 0 Attachment
                Sorry, Jon. When I saw your first reply I thought it could use a little clarification. I should have checked first for more recent messages.
                ------Original Message------
                From: Jon Paris
                To: Easy400Group
                ReplyTo: Easy400Group
                Subject: Re: [Easy400Group] RPG XML parser
                Sent: Mar 1, 2012 7:05 AM

                  Just to further clarify. 

                This arises when you are using XML-INTO with %Handler.  It is a requirement for the handler's prototype.

                On Mar 1, 2012, at 6:46 AM, michael.haston@... wrote: I'm wondering why you needed the CONST keyword with that LIKEDS spec?  Is it because you gave a DIM?  I haven't used XML-INTO all that often, but I did a fairly complex parse with many loops using LIKEDS and didn't seem to need CONST. 

                Just curious. 
                Jon Paris
                www.partner400.com www.SystemiDeveloper.com
              • michael.haston@mmbb.org
                No I wasn t. That s the difference. My statement was: xml-into request %xml( xmlfile : options ); Thanks for the explanation. Antoon van Os
                Message 7 of 15 , Mar 1, 2012
                • 0 Attachment

                  No I wasn't.  That's the difference.  My statement was:

                  xml-into request %xml( xmlfile : options );


                  Thanks for the explanation.






                  Antoon van Os <Antoon.van.Os@...>
                  Sent by: Easy400Group@yahoogroups.com

                  03/01/2012 10:12 AM

                  Please respond to
                  Easy400Group@yahoogroups.com

                  To
                  Easy400Group yahoogroups.com <easy400group@yahoogroups.com>
                  cc
                  Subject
                  RE: [Easy400Group] RPG XML parser





                   

                  Mike,

                  Were you using %handler at the time ?
                  My remark applies to %handler only.

                  ( I was on V5R4 and 64K was not enough for the XML I had to parse ).

                  Antoon


                  To: Easy400Group@yahoogroups.com
                  CC: easy400group@yahoogroups.com
                  From: michael.haston@...
                  Date: Thu, 1 Mar 2012 06:46:50 -0500
                  Subject: RE: [Easy400Group] RPG XML parser

                   


                  Antoon -


                  I'm wondering why you needed the CONST keyword with that LIKEDS spec?  Is it because you gave a DIM?  I haven't used XML-INTO all that often, but I did a fairly complex parse with many loops using LIKEDS and didn't seem to need CONST.


                  Just curious.



                  Mike






                  Antoon van Os <Antoon.van.Os@...>
                  Sent by: Easy400Group@yahoogroups.com

                  02/28/2012 04:58 AM

                  Please respond to
                  Easy400Group@yahoogroups.com


                  To
                  Easy400Group yahoogroups.com <easy400group@yahoogroups.com>
                  cc
                  Subject
                  RE: [Easy400Group] RPG XML parser







                   I have recently finished an RPG ILE program that parses XML directly with the XML INTO support,
                  works perfectly, it's available as of V5R4. However : beware of IBM's examples, there is a keyword missing in the Ref. manual.
                  This is an example that compiles and works :

                  d getDetailRecord...                                            
                  d                 pr            10i 0                          
                  d rc                             1                              
                  d record                              dim(10) likeDs(rec) const
                  d numberOfRecords...                                            
                  d                               10u 0 value                    

                  In IBM's example the CONST keyword is missing. Without it you cannot even get it to compile...
                  Jon Paris pointed me in the right direction on this.
                  Just thought I'd let you know.

                  Good parsing,

                  Antoon

                  To: Easy400Group@yahoogroups.com
                  From: kevin.turner@...
                  Date: Tue, 28 Feb 2012 09:07:21 +0000
                  Subject: RE: [Easy400Group] RPG XML parser

                   
                  Just Google "rpgle xml parser" to learn about XML-INTO or XML-SAX or a non-RPG conversion of EXPAT by Scott Klement that you can use with RPG:
                  http://www.scottklement.com/expat/

                  -----Original Message-----
                  From:
                  Easy400Group@yahoogroups.com [mailto:Easy400Group@yahoogroups.com] On Behalf Of rng5000
                  Sent: 28 February 2012 03:25
                  To:
                  Easy400Group@yahoogroups.com
                  Subject: [Easy400Group] RPG XML parser

                  Greetings:

                  Can anyone suggest a good and free RPG XML parser program that will allow to read and extract info from any xml file?

                  Thanks

                  ------------------------------------

                  Yahoo! Groups Links

                  NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.

                  ----------------------------------------------------------

                  CoralTree Systems Limited
                  25 Barnes Wallis Road
                  Segensworth East, Fareham
                  PO15 5TT

                  Company Registration Number 5021022.
                  Registered Office:
                  12-14 Carlton Place
                  Southampton, UK
                  SO15 2EA
                  VAT Registration Number 834 1020 74.









                  This message is for the use of the intended recipient only. It may be privileged,
                  confidential, or otherwise protected from disclosure. If you are not the
                  intended recipient, please immediately delete all copies of this message and
                  its attachments and contact us at service@... so we can take steps to
                  avoid such transmission errors in the future. Thank you.

                   
















                  This message is for the use of the intended recipient only. It may be privileged,
                  confidential, or otherwise protected from disclosure. If you are not the
                  intended recipient, please immediately delete all copies of this message and
                  its attachments and contact us at service@... so we can take steps to
                  avoid such transmission errors in the future. Thank you.


                   







                • Jon Paris
                  Hate to contradict you Jim - but no it doesn t. The binder (sadly) has no mechanism by which it can check _any_ attribute of a called interface. Not even
                  Message 8 of 15 , Mar 1, 2012
                  • 0 Attachment
                    Hate to contradict you Jim - but no it doesn't.

                    The binder (sadly) has no mechanism by which it can check _any_ attribute of a called interface. Not even something as simple as the number of parms. The OS will check to some extent the number of parms on a program call but that is it.

                    All const, value, data types, size, etc. is completely enforced by the compilers. If you doubt me check it yourself and use a different proto in the caller to the callee. You'll find it will "work" just fine.

                    This is the reason why we always tell people to use protos in a /Copy file and never clone them manually into both caller and callee.


                    On Mar 1, 2012, at 10:35 AM, Rothwell, Jim (NBCUniversal) wrote:

                    > Of course, the strictly technical reason you have to use CONST here is because the called entry point's prototype was defined with the CONST parameter, and the binder (not really the compiler) enforces the attribute match between the caller and the called.

                    Jon Paris

                    www.partner400.com
                    www.SystemiDeveloper.com
                  • Rothwell, Jim (NBCUniversal)
                    Well, you obviously know compiler internals better than I, Jon, having lived there, right? ;-) I was going by supposition - since at the time of a compile of
                    Message 9 of 15 , Mar 1, 2012
                    • 0 Attachment

                      Well, you obviously know compiler internals better than I, Jon, having lived there, right?  ;-)  I was going by supposition – since at the time of a compile of a module the compiler can’t know anything about the modules you’re going to “attach” to, how can the compiler enforce a match of “const”, for instance?  Now I admit, I was thinking of “normal” API calls, and in contrast, an XML-INTO is an opcode for which the compiler must set up the call for you, so it has been given the smarts to construct the call to match what the XML API expects, and can therefore identify when the coder hasn’t defined the proper attributes, but when you’re coding an API call yourself, and setting up the prototype yourself, there’s no cross-module enforcement, right?  The compile is occurring in a relative vacuum isn’t it?  Since I always define my prototypes once, and use conditional compiler directives to include them into calling modules, it’s been many years since I got a mismatch error, so I suppose I’ve forgotten whether the error occurred during the bind or at runtime, but I don’t see how it could occur at compile time.

                       

                      From: Easy400Group@yahoogroups.com [mailto:Easy400Group@yahoogroups.com] On Behalf Of Jon Paris
                      Sent: Thursday, March 01, 2012 8:13 AM
                      To: Easy400Group@yahoogroups.com
                      Subject: Re: [Easy400Group] RPG XML parser

                       

                       

                      Hate to contradict you Jim - but no it doesn't.

                      The binder (sadly) has no mechanism by which it can check _any_ attribute of a called interface. Not even something as simple as the number of parms. The OS will check to some extent the number of parms on a program call but that is it.

                      All const, value, data types, size, etc. is completely enforced by the compilers. If you doubt me check it yourself and use a different proto in the caller to the callee. You'll find it will "work" just fine.

                      This is the reason why we always tell people to use protos in a /Copy file and never clone them manually into both caller and callee.

                      On Mar 1, 2012, at 10:35 AM, Rothwell, Jim (NBCUniversal) wrote:

                      > Of course, the strictly technical reason you have to use CONST here is because the called entry point's prototype was defined with the CONST parameter, and the binder (not really the compiler) enforces the attribute match between the caller and the called.

                      Jon Paris

                      www.partner400.com
                      www.SystemiDeveloper.com

                    • Jon Paris
                      Comments in-line Jim. ... Correct - it can t and doesn t - it just assumes the prototype is correct and validates accordingly. ... In absolute terms it can t.
                      Message 10 of 15 , Mar 1, 2012
                      • 0 Attachment
                        Comments in-line Jim.

                        On Mar 1, 2012, at 12:03 PM, Rothwell, Jim (NBCUniversal) wrote:

                        Well, you obviously know compiler internals better than I, Jon, having lived there, right?  ;-)  I was going by supposition – since at the time of a compile of a module the compiler can’t know anything about the modules you’re going to “attach” to

                        Correct - it can't and doesn't - it just assumes the prototype is correct and validates accordingly.

                        , how can the compiler enforce a match of “const”, for instance? 

                        In absolute terms it can't. In the case of a prototyped call the compiler enforces whatever the proto says. 

                        Now I admit, I was thinking of “normal” API calls,

                        Same situation. Try calling any bindable API with the wrong parms and I guarantee that the binder won't complain. 

                        and in contrast, an XML-INTO is an opcode for which the compiler must set up the call for you, so it has been given the smarts to construct the call to match what the XML API expects, and can therefore identify when the coder hasn’t defined the proper attributes,

                        This is true. Just as you can't code DIM(nn) on a DS without the QUALIFIED keyword the compiler has syntactic requirements for the handler interface.

                        but when you’re coding an API call yourself, and setting up the prototype yourself, there’s no cross-module enforcement, right? 

                        Correct. It is up to you to get the proto correct. IBM issue some API protos these days - but it is up to you.  

                        The compile is occurring in a relative vacuum isn’t it? 

                        It can only check what it "sees" at the time - yes. The rules for handler are always the same though - there is no variation from one handler to another. The only parms that can effectively vary are the first two (the communications area and the -INTO target. Both of these can vary in definition but since they are passed by reference only a pointer is actually passed so the compiler is free to pass other details (length, field names, occurrences, etc.) under the covers. 

                        Since I always define my prototypes once, and use conditional compiler directives to include them into calling modules, it’s been many years since I got a mismatch error, so I suppose I’ve forgotten whether the error occurred during the bind or at runtime, but I don’t see how it could occur at compile time.

                        Trust me - it happened at compile time. I really, really wish that was not true but it is. Test it if you don't believe me - easy enough to do.


                         
                        From: Easy400Group@yahoogroups.com [mailto:Easy400Group@yahoogroups.com] On Behalf Of Jon Paris
                        Sent: Thursday, March 01, 2012 8:13 AM
                        To: Easy400Group@yahoogroups.com
                        Subject: Re: [Easy400Group] RPG XML parser
                        < p class=MsoNormal>  

                         

                        Hate to contradict you Jim - but no it doesn't.

                        The binder (sadly) has no mechanism by which it can check _any_ attribute of a called interface. Not even something as simple as the number of parms. The OS will check to some extent the number of parms on a program call but that is it. 

                        All const, value, data types, size, etc. is completely enforced by the compilers. If you doubt me check it yourself and use a different proto in the caller to the callee. You'll find it will "work" just fine.

                        This is the reason why we always tell people to use protos in a /Copy file and never clone them manually into both caller and callee.

                        On Mar 1, 2012, at 10:35 AM, Rothwell, Jim (NBCUniversal) wrote:

                        > Of course, the strictly technical reason you have to use CONST here is because the called entry point's prototype was defined with the CONST parameter, and the binder (not really the compiler) enforces the attribute match between the caller and the called. 

                        Jon Paris

                        www.partner400.com
                        www.SystemiDeveloper.com





                      • Rothwell, Jim (NBCUniversal)
                        I see what you re saying now, Jon. I think we re on the same page...now that you ve reminded me that the binder doesn t give a hoot. From:
                        Message 11 of 15 , Mar 1, 2012
                        • 0 Attachment

                          I see what you’re saying now, Jon.  I think we’re on the same page…now that you’ve reminded me that the binder doesn’t give a hoot.

                           

                          From: Easy400Group@yahoogroups.com [mailto:Easy400Group@yahoogroups.com] On Behalf Of Jon Paris
                          Sent: Thursday, March 01, 2012 9:22 AM
                          To: Easy400Group@yahoogroups.com
                          Subject: Re: [Easy400Group] RPG XML parser

                           

                           

                          Comments in-line Jim.

                           

                          On Mar 1, 2012, at 12:03 PM, Rothwell, Jim (NBCUniversal) wrote:



                          Well, you obviously know compiler internals better than I, Jon, having lived there, right?  ;-)  I was going by supposition – since at the time of a compile of a module the compiler can’t know anything about the modules you’re going to “attach” to

                           

                          Correct - it can't and doesn't - it just assumes the prototype is correct and validates accordingly.



                          , how can the compiler enforce a match of “const”, for instance? 

                           

                          In absolute terms it can't. In the case of a prototyped call the compiler enforces whatever the proto says. 



                          Now I admit, I was thinking of “normal” API calls,

                           

                          Same situation. Try calling any bindable API with the wrong parms and I guarantee that the binder won't complain. 



                          and in contrast, an XML-INTO is an opcode for which the compiler must set up the call for you, so it has been given the smarts to construct the call to match what the XML API expects, and can therefore identify when the coder hasn’t defined the proper attributes,

                           

                          This is true. Just as you can't code DIM(nn) on a DS without the QUALIFIED keyword the compiler has syntactic requirements for the handler interface.



                          but when you’re coding an API call yourself, and setting up the prototype yourself, there’s no cross-module enforcement, right? 

                           

                          Correct. It is up to you to get the proto correct. IBM issue some API protos these days - but it is up to you.  



                          The compile is occurring in a relative vacuum isn’t it? 

                           

                          It can only check what it "sees" at the time - yes. The rules for handler are always the same though - there is no variation from one handler to another. The only parms that can effectively vary are the first two (the communications area and the -INTO target. Both of these can vary in definition but since they are passed by reference only a pointer is actually passed so the compiler is free to pass other details (length, field names, occurrences, etc.) under the covers. 



                          Since I always define my prototypes once, and use conditional compiler directives to include them into calling modules, it’s been many years since I got a mismatch error, so I suppose I’ve forgotten whether the error occurred during the bind or at runtime, but I don’t see how it could occur at compile time.

                           

                          Trust me - it happened at compile time. I really, really wish that was not true but it is. Test it if you don't believe me - easy enough to do.

                           



                           

                          From: Easy400Group@yahoogroups.com [mailto:Easy400Group@yahoogroups.com] On Behalf Of Jon Paris
                          Sent: Thursday, March 01, 2012 8:13 AM
                          To: Easy400Group@yahoogroups.com
                          Subject: Re: [Easy400Group] RPG XML parser

                          < p class=MsoNormal> 

                           

                           

                          Hate to contradict you Jim - but no it doesn't.

                          The binder (sadly) has no mechanism by which it can check _any_ attribute of a called interface. Not even something as simple as the number of parms. The OS will check to some extent the number of parms on a program call but that is it. 

                          All const, value, data types, size, etc. is completely enforced by the compilers. If you doubt me check it yourself and use a different proto in the caller to the callee. You'll find it will "work" just fine.

                          This is the reason why we always tell people to use protos in a /Copy file and never clone them manually into both caller and callee.

                          On Mar 1, 2012, at 10:35 AM, Rothwell, Jim (NBCUniversal) wrote:

                          > Of course, the strictly technical reason you have to use CONST here is because the called entry point's prototype was defined with the CONST parameter, and the binder (not really the compiler) enforces the attribute match between the caller and the called. 

                          Jon Paris

                          www.partner400.com
                          www.SystemiDeveloper.com

                           

                           

                           

                        Your message has been successfully submitted and would be delivered to recipients shortly.