AIX® and i5/OS™ use different line terminating characters in text files (for example, in files and shell scripts).
The AIX applications that are the source for your i5/OS PASE programs expect that lines (for example, in files and shell scripts) will end with a line feed (LF). However, PC software and typical i5/OS software often ends lines with a carriage return and line feed (CRLF).
awk '{ gsub( /\r$/, "" ); print $0 }' < oldfile > newfile
One example of where this difference can cause problems is when you use File Transfer Protocol (FTP) to transfer source files and shell scripts from AIX to the iSeries™. The FTP standard calls for data sent in text mode to use carriage return and line feed (CRLF) at the end of a line. On AIX, the FTP utility strips the carriage return (CR) when it processes an inbound file in text mode. i5/OS FTP always writes exactly what is presented in the data stream and always retains CRLF for text mode, which causes problems with the i5/OS PASE run time and utilities.
awk '{ gsub( /\r$/, "" ); print $0 }' < oldfile > newfile
You can also experience problems when you edit your files or shell scripts with editors on your iSeries server or with editors on your workstation (such as Windows® Notepad editor). These editors use CRLF as a new line separator, and not the LF that i5/OS PASE expects.
Numerous editors are available (for instance, the ez editor) that do not use CRLF as new line separators.