On 03/10/2009, at 4:29 AM, smorrison@xxxxxxxxxxxxxxxxxxx wrote:

I've got CL program that needs to email a report to a user. The user's
email address is stored in the IBM system directory, visible by using
WRKDIRE. How can I retrieve this email address, so I don't need to hard
code the email address?

The correct way to retrieve this information is via the QOKSHCD API.

I see suggestions for DSPDIRE to outfile and reading QATMSMPTA directly. As Chuck pointed out reading an undocumented internal IBM file directly is risky. DSPDIRE will not always show the SMPT information. I don't recall the details but it has something to do with whether the SMPT names have been converted (via CVTNAMSMTP) to System Directory names. If not they won't appear in DSPDIRE. There are caveats on simply running CVTNAMSMTP---it's not reversible.

I think if you can see them with WRKNAMSMTP then DSPDIRE will not put them in the outfile.

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

Replies:

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

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