void

HTTPD_LINKAGE write(

unsigned char *handle, unsigned char *data, unsigned long *length, long *return_code);

This function processes the data and calls the server’s write function with the new or changed data. The application must not attempt to free the buffer passed to it nor expect the server to free the buffer it receives.

void

HTTPD_LINKAGE close(

unsigned char *handle, long *return_code);

This function performs any cleanup (such as flushing and freeing the buffer) required to complete processing the data for this stream.

Log

void

HTTPD_LINKAGE Log(

unsigned char *handle, long *return_code);

This function is called after each request is processed and the communication to the client is closed, regardless of the success or failure of the request processing. Only HTTPD_extract() and HTTPD_set() are valid during this step.

Error

void

HTTPD_LINKAGE Error(

unsigned char *handle, long *return_code);

This function is called only when an error is encountered and provides an opportunity to customize the response.

PostExit

void

HTTPD_LINKAGE PostExit(

unsigned char *handle, long *return_code);

This function is called, regardless of the success or failure of the request, so that you can clean up any resources that are allocated by your application to process the request.

Server Termination

void

HTTPD_LINKAGE ServerTerm(

unsigned char *handle, long *return_code);

This function is processed when an orderly shutdown or restart of the server occurs. It allows you to clean up resources that are allocated during the Server Initialization step. Do not call any HTTP_* functions in this step (the results are unpredictable). If you have more than one Server API directive in your configuration file for Server Termination, they will all be called.

HTTP return codes and values

These return codes follow the HTTP specification that is published by the World Wide Web Consortium at URL: http://www.w3.org/pub/WWW/Protocols/. Your application functions should return one of these values.

Chapter 7. Writing Server API programs 113

Page 123
Image 123
IBM AS/400E manual Http return codes and values, Log, Error

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.