Porting Central
Skip to main content

Porting Central

API analysis tool

Introduction

API analysis is the first step in feasibility study and assessment of the portability of a UNIX C/C++ application to iSeries. The API analysis filters the interfaces used within the application which are not industry standard and not supported on iSeries and the ones which are standard compliant but supported differently due to different architecture of iSeries compared to UNIX machines.

API analysis tool consists of a front-end and a back-end. The front-end scans the executables of the application to extract the interfaces (or function calls) used by the C application and generates a list of all those interfaces. The back-end of the tool takes this list of interfaces as input and compares them with our database of apis.

The front-end of the API analysis tool is a UNIX shell script and uses nm or dump command to find symbol information from the external symbol table of the executable(s). The shell script runs on one of the following operating systems, which is passed as a parameter to the script:

  • AIX
  • HP-UX
  • SCO UNIX
  • SCO OpenServer
  • SUN Solaris
  • Digital UNIX
  • OS/400
  • Linux

What you need to do

  1. Download the API analysis tool front-end.
  2. Save to your local disk in a file (for example, shifter3acquire.sh).
  3. Move the script file to the system and directory where the application is installed.
  4. Change the script mode to 'executable' with the following command:
    
    
    
    chmod +x shifter3acquire.sh
    
    
    
    
  5. Run this script against the executables of your application. You need to supply a file or directory name as a parameter. The script will generate an output file named symbols.s3.dat.

    ./sifter3acquire.sh [file-name|directory-name]

While running the tool make sure:

  • The executable(s) of the application are not stripped of symbol table information.
  • You have write permission in the current directory as the tool will create some temporary files.
  • If file name is supplied, it should be an executable file with read permission.
  • If directory name is supplied, it should be a searchable directory. The tool drills down to all the subdirectories to find all the executable files starting from the directory specified
  • To redirect the output (which is list of function calls) to a file.
  • If you are running on Solaris, and you find that the output file lists the files scanned but not APIs, you should verify that you are using the shipped Solaris command "nm" rather than the GNU version of the "nm" command. GNU output is different, and does not work with this script.

When you have completed this front end process, please put your output file(s) in an email to rchgo400@us.ibm.com along with the following information:

  • Name
  • Company Name
  • Application name that the output files apply to

This information will help our porting team identify future correspondence with you. We will run the back end of the analysis tool and send your response by email.

If you face any problem using the shell script, send us an email (rchgo400@us.ibm.com).