ILE C/C++ Programmer's Guide

Pitfalls to Avoid

Any source file created on the workstation with an ASCII editor that deposits an EOF marker at the end of a text file will generate an invalid character warning message when it is compiled with the ILE C/C++ compiler. This includes your main source file. The problem arises when the source file is copied to, or saved in, the root(/) file system on the iSeries . This is because of the translation between ASCII and EBCDIC codepoints.

If you receive an invalid character message referring to the last character of a file, it is likely that you have an EOF marker in the file. One way to avoid this problem is to use an editor which does not add the EOF marker.

Alternatively you can use a File Transfer Protocol (FTP) utility. FTP will result in a root(/) file system file with either codepage 819 or 37. Any of these FTP commands issued to the target iSeries system prior to the put command will result in a file of codepage 819:

If you issue the following command to the target iSeries system prior to the put command, put results in a file with codepage 37 (EBCDIC): quote type e. When the file is transferred using FTP to the Root file system, the file is created with either codepage 819 or codepage 37 (depending on the previous commands as outlined above) whether the file exists prior to the transfer or not.

Files transferred to an Integrated File System with codepage 37, fail to compile.


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