16,755 pts.
 Transferring AS/400 spool files and emailing to a relevant address
A question emailed to us We have a situation where a number of client have requested a way of emailing Debtor Statements from As/400 spool file. Within the spool file entry there could be any number of statements. We are able to include the Email address of each debtor within each individual statement. We are looking for a way of transferring the spool file and them emailing each statement to the relevant email address.

Software/Hardware used:
ASKED: February 11, 2008  4:07 PM
UPDATED: February 14, 2008  10:01 AM

Answer Wiki:
There are various system APIs available to help in this area. A general overview of what is available can be found in the <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/apis/print1.htm">i5/OS Information Center</a>. Some of the system support is directly targeted to the e-mailing of spooled files and/or <i>subsets</i> of spooled files. One example is <a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/apis/xpsf400email.htm">the Mapping Exit Program</a>support which allows you to route/distribute a report (along with attributes such as subject, encryption, etc). This relies however upon information in the spool file to direct the system processing. In the case of this exit and sending <i>subsets</i> of the spool file, the use of the DDS keyword STRPAGGRP (or similiar support) is needed. If you wanted the <i>entire</i> spool file sent, the USRDFNDTA attribute of the print file could be used, but that isn't your current request. To take an arbitrary spooled file and then parse it with the result being individual statements to be e-mailed you are most likely looking at having to supply your own processing program. The alternative would be modifying the program and print file currently being used to generate your debtor statements such that PSF/400 can recognize the individual debtor statements. I hope this helps, Bruce Vining <a href="http://www.brucevining.com/">http://www.brucevining.com/</a>
Last Wiki Answer Submitted:  February 14, 2008  10:01 am  by  bvining   6,055 pts.
All Answer Wiki Contributors:  bvining   6,055 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _