Example of an exit program of type 2 (RPGLE)
In the type 2 example program, the exit program EXITSNDEML uses a type 2 parameter list (*TYPE2).
It shall be called up for every newly created data stream file in order to immediately and automatically send it to the designated client via email.
EXITPGM(*LIBL/EXITSNDEML *TYPE2)
It is assumed that option EXITPGMPRM(*POS) or EXITPGMPRM(*KEY) is used to extract the costumer number from the report. This costumer number serves to determine the costumer address in the costumer database. The i-effect®command SNDEMAIL is then used to send the data stream file to the respective costumer. The source file of the following example program as well as the CUSTFILE source file can be found in the i-effect®working library in the QRPGLESRC and QDDSSRC files.
Example-of-a-Type-2-Exit-Program-RPGLE.pdf