Copy header files

You can follow the instructions in this topic to copy header files from your iSeries™ server to an AIX® machine.

i5/OS™ PASE augments standard AIX run time with header files for i5/OS system-unique support. These are provided by i5/OS PASE and the i5/OS operating system.

Copy the header files from your iSeries server to an AIX machine 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.

Copy i5/OS PASE header files

The i5/OS PASE header files are located in the following i5/OS directory:

/QOpenSys/QIBM/ProdData/OS400/PASE/include

i5/OS PASE provides the following header files:

Header file Explanation
as400_protos.h This header file provides miscellaneous i5/OS PASE system-unique functions to ILE.
as400_types.h This header file declares unique i5/OS 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 i5/OS messages.

Copy i5/OS header files

If you plan to access other i5/OS functions in your i5/OS PASE application, you might find it helpful to copy to your development machine the header files for the i5/OS functions that you are using. Note that generally you cannot run an i5/OS program or procedure directly from an i5/OS PASE application. See Call i5/OS programs and procedures from your i5/OS PASE programs for more information.

i5/OS system-provided header files are located in the /QIBM/include directory:

If your application needs any of the i5/OS 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 i5/OS PASE Rfile utility.

The following example uses the i5/OS PASE Rfile utility to read i5/OS header file /QIBM/include/qusec.h, convert the data to the i5/OS PASE 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

Related concepts
Database
Call i5/OS programs and procedures from your i5/OS PASE programs
Related tasks
Call ILE procedures
Related reference
Copy the i5/OS PASE program to your iSeries server