Copying header files

Use this information to copy header files from the system running IBM i to the system running AIX®.

PASE for i augments standard AIX run time with header files for IBM i system-unique support. These are provided by PASE for i and the IBM i operating system.

Copying the header files from IBM i to AIX in the header file search path

You can copy the header file into the /usr/include AIX directory, or to any other directory on the header file search path for your compiler.

If you use a directory other than /usr/include, you can add it to the header file search path with the -I option on the AIX compiler command.

Copying PASE for i header files

The PASE for i header files are located in the following IBM i directory: /QOpenSys/QIBM/ProdData/OS400/PASE/include

PASE for i provides the following header files.

Header file Explanation
as400_protos.h This header file provides miscellaneous PASE for i system-unique functions to ILE.
as400_types.h This header file declares unique IBM i parameter types for calls to ILE.

This header file declares type ILEpointer for 16-byte machine interface (MI) pointers, which relies on type long double to be a 128-bit field.

Other types declared in as400_types.h rely on type long long to be a 64-bit integer. AIX compilers must be run with options -qlngdbl128, -qalign=natural, and -qlonglong to ensure proper size and alignment of types declared in as400_types.h.

os400msg.h This header file declares the functions to send and receive IBM i messages.

Copying IBM i header files

If you plan to access other IBM i functions in your PASE for i application, you might find it helpful to copy to your development machine the header files for the IBM i functions that you are using. Note that generally you cannot run an IBM i program or procedure directly from an PASE for i application.

IBM i system-provided header files are located in the /QIBM/include directory.

If your application needs any of the IBM i API header files, you must first convert them from EBCDIC to ASCII before you copy the converted files to an AIX directory.

One way to convert an EBCDIC text file to ASCII is to use the PASE for i Rfile utility.

The following example uses the PASE for i Rfile utility to read IBM i header file /QIBM/include/qusec.h, convert the data to the PASE for i coded character set identifier (CCSID), strip trailing blanks from each line, and then write the result into byte stream file ascii_qusec.h:

Rfile -r /QIBM/include/qusec.h > ascii_qusec.h