IBM OS/2 Developer's Toolkit: OS/2 tools for e-business
Running a successful e-business requires more than a splashy Web page and an easy-to-remember URL. Customers require availability and quick response time from the server. Developers require stability, easy maintenance and efficient performance. The latest OS/2 server release, OS/2 Warp Server for e-business, features enhancements to help meet these requirements, including:
- TCP/IP enhancements
- Journaled File System availability
- Dynamic Domain Name Server (DDNS) for Windows 95 and Windows NT Clients
- Dynamic Host Configuration Protocol (DHCP)
To keep things running smoothly and to help developers take advantage of these enhancements, IBM OS/2 Developer's Toolkit version 4.5 has been updated to be compatible with OS/2 Warp Server for e-business and is now available through IBM Developer Connection, Release 2, Volume 3 at the Advanced level.
Retaining consistent strengths
As in previous versions of the Toolkit, this version continues to provide the following resources for developers who want to write or enhance OS/2 applications:
- Sample programs that can be compiled using IBM VisualAge C++ compiler
- Header files
- Programming libraries
- Programming tools
- Online technical documentation
Also, as in previous versions, these resources cover the following topics:
- File and Print Client
- LAN Distance (client portion)
- Multiple Protocol Transport Services (MPTS), also known as LAN Transports
- TCP/IP
- OpenGL
- Problem Determination
- C Runtime
Providing e-business building blocks
Enhancements to the Toolkit include the following:
- TCP/IP Toolkit enhancements
- New APIs in OS/2 Warp Server for e-business
- Debugging and serviceability enhancements
TCP/IP Toolkit
The TCP/IP Toolkit has been upgraded to version 4.21. Enhancements to the Toolkit complement the enhancements made to TCP/IP in OS/2 Warp Server for e-business. (Read more about these enhancements in the article, "TCP/IP enhancements to OS/2 Warp Server for e-business" on page 18 in this issue of Developer Connection Technical Magazine.) The TCP/IP Toolkit includes:
- New APIs:
- accept_and_recv()
- send_file
- A new 32-bit version of the ring-0 library (R0LIB32), which enables device drivers to call the new 32-bit networking kernel (socket.sys) without the 16-bit to 32-bit thunk layer.
- New TCP/IP sample programs that demonstrate the use of the new APIs and the new ring-0 library as follows:
- ACCXRECV sample program. The server opens a socket to which it binds and then listens on that socket. It starts the number of specified threads and does accept_and_recv on each of them. The client opens a socket, connects to the server and sends the data. As the timeout option is set (by using setsockeopt), whenever the client connects but doesn't send any data, the server times out.
- SENDFILE sample program. The client sends a file to a server.
- R0LIB32 sample program. The client sends 1KB of data (all 'a'). Then the server modifies the data (changes 'a' to 'b') and sends the modified data to the client. The client prints the data received from the server. The client sends a string to the server using a sendmsg() call. The server receives it (by recvmsg() call) and sends another string to the client. The client receives the string and prints it. The client program is a ring3 program. The server program accesses the socket calls through r0lib32.
New APIs in OS/2 Warp Server for e-business
OS/2 Warp for e-business includes some new and some revised APIs. These APIs relate to control programming functions, particularly those that are affected by the new Logical Volume Manager in OS/2 Warp Server for e-business.
The Logical Volume Manager (LVM) provides flexibility for configuring and managing the disk drives on a system that is running OS/2 Warp Server for e-business. LVM replaces FDISK as the disk management tool. Disk drives and partitions are configured as logical volumes (usually referred to as drives in previous versions of OS/2). Features such as persistent drive letters, dynamic drive letter assignment, disk spanning and dynamic volume expansion can greatly reduce the downtime when disk configuration changes are made on the server.
Other new and revised APIs relate to performance and RAS functions. These APIs are thoroughly documented in a new book, OS/2 Programming Guide and Reference Addendum for OS/2 Warp for e-business, that is in the Toolkit library.
Debugging and serviceability enhancements
Major enhancements to the system diagnostic tools (RAS Enhancements) are provided in FixPak 35 for OS/2 Warp 3.0, FixPak 10 for OS/2 Warp 4.0 and OS/2 Warp Server for e-business. The major functional enhancements to the Process Dump and the System Trace facilities are summarized below.
Process Dump
Process Dump provides the means to capture data from the system or an application for problem analysis. Dumps may be triggered automatically as the result of a trap, or they may be produced on demand from the command line.
The data that is captured can be selected and customized per application. Dump data is analyzed using the PM Dump Formatter (PMDF), which is distributed with the base OS/2 operating system. The advantages of using Process Dump over System Dumps are:
- They do not force a system outage to capture the data.
- The data dumped can be customized according to need.
Process Dump provides a mechanism that allows problem analysis to be done without the need to recreate a problem in a development environment. This is useful when dealing with pervasive production system problems.
There are three command line utilities that allow Process Dump to be customized according to need:
- PROCDUMP: This command enables and disables Process Dump. It also allows the user to specify the directory path that will be used for the dump data file. Process Dump settings may be queried with this command. Specific application dump requirements may be specified though PROCDUMP.
- PDUMPUSR: This command allows the user to customize the default data to be captured for application-related dumps.
- PDUMPSYS: This command allows the user to customize the default data to be captured for system-related dumps.
System Trace
System Trace provides a means of capturing the occurrence of a sequence of events in the System Trace Buffer. Data that is captured with each may be customized using either the Dos16SysTrace API or the Dynamic Trace facility, which does not require modification of the program source. The System Trace facility has been enhanced to include the following:
- Dynamic customization - CONFIG.SYS updates are not required to use or customize System Trace.
- The 63KB System Trace Buffer size limit has been removed. There is now no limit imposed other than by RAM availability.
- Trace data may be captured and spooled to a series of files using the TRSPOOL utility. This capability allows the total volume of traced data to extend to many megabytes and over many hours.
- The Dynamic Trace Customizer (TRCUST) has been updated to comply with VisualAge C++ Version 3.0 debugging information.
- MAKETSF and DEBDEL utilities have been provided to aid the automated generation of dynamic trace definitions from a MAKEFILE.
Low-level access to the Dynamic Trace facility has been provided through the DTRACE tool. This access provides a means of capturing data conditionally and also a means of activating other debugging facilities (Kernel Debugger, Application Debugger, Process and System Dump) based on data present when a trace event occurs.
Full details of these enhancements may be found in the following documents distributed with the operating system:
- OS2\SYSTEM\RAS\TRACE.DOC
- OS2\SYSTEM\RAS\DTRACE.DOC
- OS2\SYSTEM\RAS\PROCDUMP.DOC
- OS2\SYSTEM\RAS\TRSPOOL.DOC
Detailed information on debugging techniques and the use of system debugging also may be found by referring to The OS/2 Debugging Handbook (SG244640.INF), which is provided in the Toolkit library.
Helping make the e-business transformation
e-business is about transforming your existing business with new technologies. If you've used previous versions of OS/2 Warp Server, you know it provides stability and reliability you can count on. If you're new to the OS/2 Warp family, you'll soon discover what makes it a powerful, mission-critical foundation for e-business. Either way, OS/2 Warp Server for e-business and the IBM OS/2 Developer's Toolkit version 4.5 give you the performance and tools to help you make the e-business transformation.
Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation