Skip to main content  
  Easy400   |       iSeries home   |   RSS feed
Freeware
 
Introduction
5250 utility
Windows utility
Other utilities
Service program
Sample code
Commands
CGI support
FAQ
WEBMail
Self maintenance
 
Download
 
 

 
Search   
CGI support

CGI programs based on the CGIDEV2 ILE-RPG CGI Development Toolset may also take advantage of MIME & Mail services, thus providing integration between WEB and E-mail.

As any other ILE-RPG programs, a CGI's may

Equipping a CGI library with the SENDMAIL service program
For a CGI library to be able to use MIME & Mail service program, the following is needed:

  • Service program SENDMAIL must be duplicated in the CGI production library
  • The binding directory TEMPLATE2 in the CGI production (object) library must be added an entry pointing to the SENDMAIL service program
  • Member MAILPROTO must be copied from MMAIL/QRPGLESRC to the QRPGLESRC file of the CGI development (source) library
All this can be done through command mmail/setcgilib.

/COPY statements to include in a CGI
The following /COPY statements are needed (assume that MYLIB is the name of your CGI source library):
 /copy MYLIB/qrpglesrc,hspecs
 /copy MYLIB/qrpglesrc,hspecsbnd
 * F-SPECS go here
 /copy MYLIB/qrpglesrc,prototypeb
 /copy MYLIB/qrpglesrc,usec
 /copy MYLIB/qrpglesrc,variables3
 * D-SPECS go here

Execution of MMAIL commands within CGI's
Library MMAIL must be in the CGI job library list before any MMAIL command is executed. This can be obtained through the doCmd subprocedure. Example:
C                   eval      rc = docmd('addlible mmail')
C                   eval      rc = docmd('emlspl ...')
C                   eval      rc = docmd('rmvlible mmail')

Spool file management within CGI's


    Contact