vNo new line character after HTTP response header

vNo data after HTTP response header.

Solution: Write the data to stdout with “Content-type: ” line with two new line characters (“\n”) and the data to be returned to the client. For example:

Content-type: text/plain\n \n

This data is returned to the client

Cause: CGI program caused an exception message that was not handled by the CGI program.

Solution: Look at the active server job logs in Figure 1 on page 139. If the system does not indicate a message in the joblog for the active server jobs, do a WRKSPLF QTMHHTTP. Check for server jobs that ended when the system ran the CGI program. Change the program to monitor for the unhandled message.

Cause: The program being called does not exist in the library.

Solution: Check the library for the correct name.

Cause: There is a bug in your user-created CGI program.

Solution: You need to set up a scaffolding environment to debug the CGI application prior to integration with server:

1.Issue the command ENDTCPSVR *HTTP HTTPSVR(server_instance)

2.Issue the command STRTCPSVR *HTTP HTTPSVR(server_instance '-minat 1 -maxat 1')

Note: You also may need to change script_timeout and output_timeout to be larger. If you are stepping through your code, it may take too long and script_timeout or output_timeout may expire. This causes the server to terminate the job you are debugging.

Ending and starting the server ensures that only one worker job is running.

a.Issue the command WRKACTJOB JOB(server_instance)

Three active jobs are displayed for this server instance. The first job in the list is always the server instance server job (Function PGM-QZHBHTTP). The second and third jobs in the list are the CGI program jobs. One is for single thread-capable CGI programs, and the other is for multithread-capable CGI programs (Java).

Select option 10 to display the job log.

If your CGI program is single thread capable (not written in Java language), message HTP2001 will be in the job log. If your CGI program is multithread capable (Java), message HTP2002 will be in the job log.

Record the Number:, User:, and Job: values for your CGI program job. Press F12.

Issue the command STRSRVJOB <Number/User/Job>.

b.For the user CGI program, issue the command STRDBG <usercgilib/cgipgm>

If the program accesses a database file on the AS/400, you must specify UPDPROD(*YES). See the help for the STRDBG command.

140Web Programming Guide V4R5

Page 150
Image 150
IBM AS/400E manual Web Programming Guide V4R5

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.