IBM Support

CGI programming example

News


Abstract

CGI programming example

Content

You are in: IBM i Technology Updates  > Web Integration on i IBM HTTP Server for i > Introduction > CGI programming example

UTF-8 CGI programming example

This example contains instructions to install and execute a ILE RPG CGI program that takes standard input from the user and for each language at a time (Arabic, French, English, German, Hebrew, Japanese and Russian) and returns the input along with other environment variables. This sample tries to illustrate how to allow different languages with incoming UTF-8 to work with a single CGI program.

RPG CGI programming example

This example contains instructions to install and execute a ILE RPG CGI program that takes standard input from the user and returns the input along with other environment variables.

C CGI programming example

This example contains instructions to install and execute an ILE C CGI program that takes standard input from the user and returns the input along with other environment variables.

C CGI (compiled with locale object type *LOCALEUTF) programming example

HTTP Server (powered by Apache) is compiled with locale object type *LOCALEUTF. This example contains instructions for creating a C CGI also compiled with locale object type *LOCALEUTF.

Persistent C CGI programming example

This example contains instructions to install and execute a persistent ILE C CGI program that uses a global count variable to demonstrate how the server job stays alive.

C API programming example

This example contains source code for an ILE C program that calls configuration file APIs. Various APIs including QzhbOpenConfig, QzhbFindDirective, QzhbReplaceDirective are used as the program reads a configuration file and either replaces an existing directive or adds a new directive to a server configuration.

COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrates programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Component":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
30 January 2020

UID

ibm11171078