|
Developments tools and utilities
IBM Application development tools
For a detailed description of application development tooling alternatives for C and C++, see the Internet-based presentation "Porting C/C++ Applications to an iSeries server".
Porting team tools that run on the iSeries
In addition to the iSeries compilers and development tools, the iSeries Porting Team has developed a few tools that you may find useful. Generally, the tools below are not an officially supported part of OS/400 or any other IBM software product. They are intended solely for use in porting applications to iSeries.
These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of this code. All program code and programming advice contained herein is provided to you "AS IS". THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED.
cpp2c
CPP2C is a utility written in C which will transform C++ comments to C comments. It accepts 2 or more parameters, the first of which is an existing directory into which you want to place "C" copies of source files, taken from the current directory. For example,
cpp2c NewDir *.c
Will make copies of all files that match "*.c" in an existing sub-directory called "NewDir" where all C++ comments are transformed to C comments. Only C source code is provided.
demangle
Demangle is a program that is useful for debugging C++ programs. Demangle takes as input a mangled C++ name and returns a readable function name.
Debug Heap
Many of the Unix or Windows applications being ported to the iSeries today have memory leaks. These (perhaps small) leaks are simply unacceptable when trying to get the applications to run for days, weeks or months without restart on a system that provides more mission critical services.
In order to help debug these problems, it is very useful to have a heap tool that allows tracing, dumping, and other memory check operations.
Utilities for qshell
A UNIX-style shell, qshell exists on the iSeries. In addition to the system-supplied utilities, the IBM Rochester lab has port several GNU UNIX utilities and written some iSeries specific utilities. For more information on these unsupported utilities, send us an e-mail at rchgo400@us.ibm.com, or download them here.
Cross platform connectivity
To connect to an iSeries, several connectivity options are available. One option is IBM's iSeries Access. Additionally, the companies listed below are sources which offer, at least, 5250 emulators for UNIX or PC operating systems. IBM does not endorse nor intend to recommend the following companies over any others that may exist. They are listed here for your convenience.
starquest
eXport Ventures
WRQ
Unipress
Cross platform scripts
The following shell scripts were developed before the iSeries had a rich environment in which to natively run UNIX shell scripts (i.e. qshell and PASE shells). None the less, the following are still useful examples, and may be called from any UNIX shell command line, etc. You can download and customize these scripts to best suit your requirements.
setup_c400
This script sets up a new C programmer to use the iSeries transparently from the UNIX environment. It creates a user library, a C source file (QCSRC), and a .h header source) file (H) on the iSeries. Finally, it creates, in the user's current UNIX directory, a configuration file which identifies both the iSeries and the user's source library on the iSeries.
rc400
This general-purpose ksh script uses the remote command feature of FTP to send any iSeries command to the iSeries from the UNIX environment. If there is an error in the processing of the command, the script returns an error code of 1.
cc400
This ksh script transfers the source file specified on the command line to the iSeries, using FTP, storing it in the user's source library, in the file QCSRC. The script then compiles the source code, creating an ILE module. If an error occurs during processing, the script returns an error code of 1. If the operation completes successfully, a fake .o file in the UNIX file system is updated to fool the make process to signify compilation.
link400
Since linking on the iSeries is simply a single command of creating a program, this script builds the CRTPGM command. It then uses the remote command feature of FTP to send the CRTPGM command to the iSeries. If the operation completes successfully, a fake executable file in the UNIX environment is updated using 'touch' to fool the make process to prevent unnecessary linking. If an error occurs during processing, the script returns an error code of 1, and the UNIX fake executable file is not updated/created.
Makefile
This is an example makefile to illustrate how these scripts can be used from UNIX workstations to create an application/programs on iSeries.
|