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




On 02/10/2004, at 2:52 AM, Hatzenbeler, Tim wrote:

Whats the best way? The text I have seen recommends GENCSRC for versions
5.1 and higher. But I like the #pragma idea more...


Any thoughs, were at version 5.2

The #pragma mapinc method is a much better idea. It guarantees that the file definitions in the program match the definitions in the file.


However, last I knew, the Unix dweebs in charge of the AIX C++ compiler port could not fathom how useful that is and did not put support for #pragma mapinc in the compiler. I understand they were also intending to remove it from the C compiler (I recall some note to that effect in the Memo To Users or similar document). That's why the GENCSRC command was created as a crappy work around for lost function.

The 530 C-C++ Programmers Guide still shows #pragma mapinc supported for C and I could find no mention of it being dropped. However, C++ still does not support it.

On version 5 C compilers it seems you can continue to use #pragma mapinc. If you intend to convert the C to C++ at some future stage or start using C++ (though why anyone in their right mind would do that is beyond me) then you should start using GENCSRC. You will have to remember to regenerate the include source whenever you change the underlying database file.

Appendix A of the C-C++ Programmers Guide says that #pragma mapinc cannot generate include files in the IFS. I think that is meant to be a warning that if you are using the IFS to hold C-C++ source then you should use GENCSRC because #pragma mapinc won't work. I think that is probably crap and that creative use of the INCLUDE environment variable or symbolic links will solve this but I've had no need to prove that supposition.

Regards,
Simon Coulter.
--------------------------------------------------------------------
   FlyByNight Software         AS/400 Technical Specialists

   http://www.flybynight.com.au/
   Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\
   Fax:   +61 3 9419 0175                                   \ /
                                                             X
                 ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.