The easiest way is simply to create the file with the first line having 80 bytes and remaining lines having 100 bytes. Create the file exactly as you want it to be.
The issue here seems to be that you’re creating a database file and then FTPing it into a streamfile. If you don’t need a database file, don’t create one. Just create a streamfile in the first place and avoid the length problems.
In ILE RPG, the <a href=”http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/apis/unix2.htm”>open(), write() and close() APIs</a> provide the most direct solution.
Although they can have some learning obstacles that take a couple tries to get around, they’re really not that hard. The <a href=”http://www.redbooks.ibm.com/abstracts/sg245402.html”>Sorcerer’s Guide (Who Knew You Could Do That with RPG IV?) Redbook</a> has more examples than anyone should need. Be sure to click the <a href=”ftp://www.redbooks.ibm.com/redbooks/SG245402/”>Additional Material</a> just below the Redbook download link even if you don’t download the Redbook at all. Example code is supplied.