× 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 see other lines in the code like
    D AsciiCodePage   S             10U 0 INZ(819)
    D CodePage        S             10U 0 INZ(37)
I'm a bit hesitant to paste any more code.  It's from a program available
for download from iseriesnetwork.com.  It was written by Dave Leland.  The
site requires a password.  Some of these magazines offer a bounty to
people who turn in copyright violators and I don't want to push that
envelope.

Things I hate about the way SNDEMAIL was written:

a) He uses variables where he should've used constants (the value of AsciiCodePage shouldn't change!) -- this would make sense only if he were manually passing them on a CALLB statement, but he doesn't do that anywhere.

b) He manually null-terminates strings instead of letting the system do it with options(*string). (His code doesn't work on V3R2 anyway, so why do that?)

c) Uses GOTO/TAG statements.

d) Uses the "B" data type instead of "I"

e) It uses Codepage 819 when the API lists 367 as being required.

f) Despite that API's documentation that the addresses passed as parms need to be in EBCDIC CCSID 500, he doesn't bother to translate them, and assumes that whatever your local EBCDIC is is "good enough"

g) He uses a CALLB statement for one API, but uses prototypes for others. (One of those things that makes you go "whaaaaaaaaa?")

h) Includes everything in one big monolithic source member instead of putting IFS definitions in a /copy file, QtmmSendMail defs in a /copy file, and writing the various routines as reusable subprocedures.

It frustrates me that so many people use this program as an example -- but there's little I can do aside from complain ;)

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.