Using the #include Directive When Compiling Source in an Integrated File System File

You can use the SRCSTMF keyword to specify an Integrated File System file at compile time. The #include processing differs from source physical file processing in that the library list is not searched. The search path specified by the INCLUDE environment variable (if it is defined), and the compiler’s default search path are used to resolve header files.

The compiler’s default include path is /QIBM/include.

#include files use the delimeters " " or <>.

When attempting to open the include file, the compiler searches in turn each directory in the search path until the file is found or all search directories have been exhausted.

The algorithm to search for include files is:

if file is fully qualified (a slash / starts the name) then
  attempt to open the fully qualified file
else
  if "" is delimeter, check job's current directory
  if not found:
     loop through the list of directories specified in the INCLUDE
          environment variable and then the default include path
     until the file is found or the end of the include path is encountered
  endif

For more information, refer to Using the ILE C/C++ Stream Functions with the IBM® i Integrated File System in Websphere Development Studio: ILE C/C++ Programmer’s Guide .



[ Top of Page | Previous Page | Next Page | Contents | Index ]