On 09/06/2008, at 11:46 PM, Lim Hock-Chai wrote:

Changing SNDMSG to use %str is probably not an option for me. This
procedure is being used by a lot of RPG applications already.

You should be able to make that change transparently. You are already using and op-desc to handle length. Change that bit of code to test for Null-terminate string and convert to fixed length or varying using %STR. The rest of the code should remain untouched and certainly will have no effect on the current consumers.


I might just need to call the QMHSNDPM api directly from the C program.
Does anybody already has prototype and example for QMHSNDPM that can
share?

IBM provides quite good prototypes and structure definitions for C in the H file in QSYSINC. See the QMH and QMHSNDPM members.

It's only the RPG and COBOL includes that are a bit crappy due to primarily due to them being converted automatically from the C includes but suffering from language limitations.


I'm a RPG programmer and is very weak in C language.


I dislike C (and absolutely HATE C++). It has too many weird behaviours that require the programmer to play compiler while writing code instead of just concentrating on the task.

I found three books very helpful:

o A Book on C by Al Kelley aand Ira Pohl
o Mastering C by Anthony Rudd
o Effective C by Scott Myers

Most of the plethora of C books are not worth purchasing because they only cover the basics.

The first book listed covers the basics and advanced topics such as concurrent processing (fork and spawn). interprocess communication (pipe) and signals.

The second has good examples and information on the Standard Library plus a chapter on portability and another on common C problems.

"Effective C" (and "Effective C++") is excellent at pointing out obscure behaviour of C and how to avoid most of the problems with C. Kernighan and Ritchie did us no favours by creating that language.

In addition the classic "The C Programming Language - 2nd Ed." is at times useful.

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

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




This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2019 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].