ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzalf_5.4.0.1/rzalflineterm.htm

77 lines
4.9 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="concept" />
<meta name="DC.Title" content="Line terminating characters in integrated file system files" />
<meta name="abstract" content="AIX and i5/OS use different line terminating characters in text files (for example, in files and shell scripts)." />
<meta name="description" content="AIX and i5/OS use different line terminating characters in text files (for example, in files and shell scripts)." />
<meta name="DC.Relation" scheme="URI" content="rzalfcopying.htm" />
<meta name="DC.Relation" scheme="URI" content="http://www.ibm.com/servers/enable/site/porting/tools/" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2000, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2000, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzalflineterm" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Line terminating characters in integrated file system files</title>
</head>
<body id="rzalflineterm"><a name="rzalflineterm"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Line terminating characters in integrated file system files</h1>
<div><p>AIX<sup>®</sup> and <span class="keyword">i5/OS™</span> use different line terminating
characters in text files (for example, in files and shell scripts).</p>
<p>The AIX applications
that are the source for your <span class="keyword">i5/OS</span> PASE
programs expect that lines (for example, in files and shell scripts) will
end with a line feed (LF). However, PC software and typical <span class="keyword">i5/OS</span> software
often ends lines with a carriage return and line feed (CRLF).</p>
<pre>awk '{ gsub( /\r$/, "" ); print $0 }' &lt; oldfile &gt; newfile</pre>
<div class="section"><h4 class="sectiontitle">CRLF used with FTP</h4><p>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. <span class="keyword">i5/OS</span> FTP
always writes exactly what is presented in the data stream and always retains
CRLF for text mode, which causes problems with the <span class="keyword">i5/OS</span> PASE
run time and utilities.</p>
<div class="p">Where possible, use binary
mode transfer from an AIX operating system to avoid this problem. Text files
transferred from personal computers will, in most cases, have CRLF delimiting
lines in the file. Transferring the files first to AIX will correct the problem. The following
command can be used as a means to remove the CR from files in the current
directory:<pre>awk '{ gsub( /\r$/, "" ); print $0 }' &lt; oldfile &gt; newfile</pre>
</div>
</div>
<div class="section"><h4 class="sectiontitle">CRLF used with iSeries and PC editors</h4><p>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<sup>®</sup> Notepad editor). These editors
use CRLF as a new line separator, and not the LF that <span class="keyword">i5/OS</span> PASE
expects.</p>
<p>Numerous editors are available (for instance, the <tt>ez</tt> editor)
that do not use CRLF as new line separators.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzalfcopying.htm" title="Copy AIX binaries that you want to run in i5/OS PASE into the integrated file system.">Copy the i5/OS PASE program to your iSeries server</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="http://www.ibm.com/servers/enable/site/porting/tools/" target="_blank">IBM Virtual Innovation Center for Hardware</a></div>
</div>
</div>
</body>
</html>