/* <form action="/cgi-bin/samplec" method="POST">

*/

/* <input type="Text" maxsize=80 size=20 name="Sample">

*/

/* <input type="Submit" name="SampleData" value="Submit CGI script">

*/

/* <br>Sample CGI program written in AS/400 ILE/C.<br>

*/

/* Type data and Click Submit to run a Sample program using ILE/C.

*/

/* </form>

*/

/*

.

*/

/*

.

*/

/*

.

*/

/* Change the form method to "GET" when input data for sample CGI

*/

/* program comes from the QUERY_STRING environment variable.

*/

/*

 

*/

/* HTTP Server configuration:

*/

/* # Pass the html document in a library

*/

/* Pass /sampledoc /qsys.lib/websamp.lib/htmlfile.file/samplec.mbr

*/

/* # Allow CGI program to run.

*/

/* Map

/cgi-bin/* /cgi-bin/*.pgm

*/

/* Exec /cgi-bin/* /qsys.lib/websamp.lib/*

*/

/*

 

*/

/* This program is invoked by a URL from a browser in the form:

*/

/* http://hostname/sampledoc

*/

/*

 

*/

/* Functions tested: Calls to Standard input and output using

*/

/*

standard i/o c calls. This program uses

*/

/*

fread(), putchar(), and printf(). It is

*/

/*

designed to run on the AS/400 HTTP Server.

*/

/*

 

*/

/**********************************************************************/

#include <stdio.h>

/* C-stdio library.

*/

#include <string.h>

/* string functions.

*/

#include <stdlib.h>

/* stdlib functions.

*/

#include <errno.h>

/* errno values.

*/

#define LINELEN 80

/* Max length of line.

*/

/**********************************************************************/

/*

 

 

*/

/* Function Name: writeData()

*/

/*

 

 

*/

/* Descriptive Name: Function is used to print the data to the

*/

/* browser.

The data is printed 80 characters/line to provide

*/

/* a neat and readable output.

*/

/*

 

 

*/

/* HTTP Server Environment variables:

*/

/* ----------------------------------

*/

/*

 

 

*/

/* Standard Input:

*/

/* ---------------

*/

/*

 

 

*/

/* Standard Output:

*/

/* ----------------

*/

/* All data directed to Standard output is sent using printf() or

*/

/* putchar().

Standard output is written with html text.

*/

/*

 

 

*/

/*

 

 

*/

/* Input: ptrToData : A pointer to the data to write to stdout.

*/

/*

dataLen : Length of data buffer.

*/

/*

 

 

*/

/* Output: Data buffer written to stdout.

*/

/*

 

 

*/

/* Exit Normal:

*/

/*

 

 

*/

Chapter 6. Sample programs (in Java, C, and RPG) 95

Page 105
Image 105
IBM AS/400E manual Sample programs in Java, C, and RPG

AS/400E specifications

The IBM AS/400E, now more commonly known as IBM i, is a robust and versatile midrange server that has been designed to provide a comprehensive computing solution for businesses of all sizes. First introduced in the late 1980s, the AS/400 series has undergone multiple enhancements and rebranding, with the AS/400E being one of the notable iterations. This powerful platform is closely associated with IBM's commitment to reliability, scalability, and integrated business solutions.

One of the main features of the AS/400E is its highly integrated architecture that combines hardware and software into a cohesive system. This integration allows for seamless operations, reducing the complexity typically associated with managing disparate systems. The system is powered by IBM's proprietary OS/400 operating system, which has evolved into IBM i, featuring advanced capabilities like object-oriented programming, integrated database management, and security features that are essential for enterprise environments.

A key characteristic of the AS/400E is its robust database support, primarily through the use of DB2 for i. This integrated database management system enables efficient data handling and retrieval, facilitating real-time business analytics and reporting. Furthermore, the platform supports a variety of programming languages, including RPG, COBOL, and Java, making it flexible for developers who require diverse tools for application development.

The AS/400E is also known for its exceptional reliability and uptime, making it a preferred choice for critical business applications in industries such as finance, healthcare, and manufacturing. This reliability is backed by advanced error detection and correction mechanisms, as well as redundancy features that help prevent data loss and minimize downtime.

In terms of scalability, the AS/400E can effortlessly expand to accommodate growing business demands. Organizations can increase processing power by adding more resources without significant disruption. This scalability, combined with the system’s built-in virtualization capabilities, allows businesses to optimize resource usage and streamline operations.

Security is another defining feature of the AS/400E. The platform incorporates various layers of security measures, including user authentication, encryption, and comprehensive auditing capabilities, ensuring that sensitive business data is protected against unauthorized access.

Overall, the IBM AS/400E remains a powerful tool in the enterprise computing landscape, providing businesses with an integrated, reliable, and secure solution for their technological needs. Its enduring popularity is a testament to its capability to evolve with changing business requirements while maintaining its core attributes of high performance and stability.