80 pts.
 PDF Mapping Program Email Activity Log in iSeries
Using PDF Mapping program as the PDF User Program in a PSFCFG object. Modified program to write a log when an email with PDF attachment is created. Program is called from within PSFCFG twice each time - but I only need one record, anyone have any suggestions or has anyone resoved this problem in the past????  Since the program is called twice - I get two records per email.  I only need one record per email.  I call a program and that program writes the record to the log file.

Code at end of mapping program pdfnam = PDF attachment name

temail = To Email

femail = From Email

   if temail <> *blank;                        EmailLog (pdfnam:temail:femail);        endif;                                



Software/Hardware used:
iSeries
ASKED: February 8, 2010  11:41 PM
UPDATED: February 9, 2010  10:03 PM

Answer Wiki:
You should have a copy of <a href="http://www.redbooks.ibm.com/redpapers/pdfs/redp3752.pdf">IBM EserveriSeries Printing VII</a>. Note topic 6.8 -- How Infoprint Server and the PDF mapping program communicate -- where it discusses the potential for multiple calls to your mapping program. You might use the 'buffer size comparison' technique. Or you might simply save the parms and compare them on the next call. If they're the same between calls, then this is a second (or subsequent) call to your program for the same spooled file. When the parms change, it's a call for a new spooled file. You'll probably want your program not to run in a *NEW activation group. The *CALLER activation group may be best. You don't want your saved values to be reinitialized on every call. Tom
Last Wiki Answer Submitted:  February 9, 2010  8:53 pm  by  TomLiotta   108,330 pts.
All Answer Wiki Contributors:  TomLiotta   108,330 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


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


 

I understand that the mapping program is called multiple times. I have tried changing the activation group to *CALLER.
I don’t understand how to use the ‘buffer size comparison’ technique or what that technique is. Could you provide some clarification on an example of the ‘buffer size comparison’ technique.

 80 pts.