The Common Gateway Interface (CGI) is an industry-standard interface that enables a Web server to invoke an application program such as Net.Data. Net.Data's support for CGI lets you use Net.Data with your favorite Web server.
Configure the Web server to invoke Net.Data by adding directives to the HTTP configuration file so that Net.Data gets invoked.
For example, assuming the Net.Data program object resides in library CGI, then the following directives redirect Net.Data requests to /QSYS.LIB/CGI.LIB/DB2WWW.PGM:
Map /cgi-bin/db2www/* /QSYS.LIB/CGI.LIB/DB2WWW.PGM/* Map /CGI-BIN/DB2WWW/* /QSYS.LIB/CGI.LIB/DB2WWW.PGM/* Exec /QSYS.LIB/CGI.LIB/*
The Map directives map entries using the format /cgi-bin/db2www/* to the library where the Net.Data program resides on your system. (The asterisk (*) at the end of the string refers to anything that follows the string.) Both upper- and lower-case map statements are included, because the directives are case sensitive. In this example, both Map statements point to the same location.
The Exec directive enables the Web server to execute any CGI programs in the CGI library. Specify the library where the program resides (not the program itself) on the directive.
Pass directives are not used by Net.Data. If you want to simplify your URL, then use the MACRO_PATH statement in a Net.Data initialization file, discussed in the following section.