Question

Asked:
Asked By:
Dec 3 2008   8:30 AM GMT
Mitchb   90 pts.

IFS maximum record size


IFS, AS/400 FTP, AS/400 administration, Integrated File System, IFS record size

I retrieved a file via FTP and placed it on the AS/400 IFS drive. Then when I viewed the data all the records wrapped at 4096 characters. Is this a system limit or is there a system config that can be changed to allow longer record lengths?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



Perhaps the display tool you are using is limited to this record length.
A IFS file doesn't have "records". The file is stored as received.
Any CR/LF's in the file will appear to most programs like records.
So either something put in the CR/LF's upstream or the display tool is limited to rows of 4096.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Mitchb   90 pts.  |   Dec 5 2008  11:23PM GMT

When you view any file using WRKLNK you will find that it seems to have a size limit of 4096 chars.
I understand what you mean about record lengths on the IFS and the basic record terminator is usually the CRLF, but if you upload a file with larger data lengths than 4096 it will wrap and the CRLF will be at the end of the data on the next line. Any help with this is appreciated.

 

Philpl1jb   15100 pts.  |   Dec 8 2008  2:18PM GMT

So the only issue is viewing the IFS file?
Since it’s on the IFS it can be viewed from the client using any software on the client.
Phil

 

Mitchb   90 pts.  |   Dec 8 2008  11:23PM GMT

The data seems to be wrapped at 4096 chars regardless. If I copy the data from the stream file to a database using the CPYFRMIMPF and specify CRLF the copy creates records of 4096 in the database even when there is no CRLF at the end on 4096.

 

Philpl1jb   15100 pts.  |   Dec 9 2008  2:23PM GMT

And setting the Stream file record length . . . STMFLEN > 9000 to a larger value doesn’t work?
We still don’t know if this was a problem upstream, bringing the file to the IFS or downstream, getting the file from the IFS.

So try copying it to a flat file with a long enough width using the stream file record length to see if it still breaks.

 

Philpl1jb   15100 pts.  |   Dec 9 2008  2:37PM GMT

Here’s something more .. maybe

 <a href="http://www.itjungle.com/mpo/mpo071802-story05.html" title="http://www.itjungle.com/mpo/mpo071802-story05.html" target="_blank">http://www.itjungle.com/mpo/mpo071802-st…</a>

-w:buffersize overrides the default transfer buffer size of 4096.

also @ <a href="http://search400.techtarget.com/tip/0,289483,sid3_gci869595,00.html" title="http://search400.techtarget.com/tip/0,289483,sid3_gci869595,00.html" target="_blank">http://search400.techtarget.com/tip/0,28…</a>

and
 <a href="http://www.orafaq.com/forum/t/124788/0/" title="http://www.orafaq.com/forum/t/124788/0/" target="_blank">http://www.orafaq.com/forum/t/124788/0/</a>

Don’t know if this will help but try setting the buffer size larger on the FTP

with the option -w:9000 <– your record size.

 

Mitchb   90 pts.  |   Dec 10 2008  2:37AM GMT

Thanks for your help.

What command has the STMFLEN parameter?

The FTP command on the AS/400 does not have anywhere to extend the incoming data record length.

 

Philpl1jb   15100 pts.  |   Dec 10 2008  2:14PM GMT

CPYFRMIMPF has the length — that will help if, infact if it got loaded with only one CRLF

The FTP -w:9000 <- record length sets the buffer length - default is 4096, but I don’t know what happens when your record is longer than the buffer. Your get or put might be breaking up your records like you thought originally.

Of course the last option - load it into a flat file and have a program build the records - two reads for each record - first for the 4096 second for the remainder.

 

Mitchb   90 pts.  |   Dec 10 2008  11:31PM GMT

The STMFLEN parameter is not obviously visable in the CPYFRMIMPF command, so I will give that a go anyway to see if that will copy more than 4096 characters for each record. You are right in that the FTP is placing the data on the IFS in 4096 char lots, but there seems to be no option on the AS/400 FTP command to change that. Is that how you see it?

 

Philpl1jb   15100 pts.  |   Dec 11 2008  2:36PM GMT

CPYFRMIMPF - then press F9 for additional parameters <– or we’re dealing with an additon
in a later OS

Apparently the -w:9000 is a pc and perhaps unix command.

On the FTP side heres a pc based note
c:temp>ftp -?

Transfers files to and from a computer running an FTP server service
(sometimes called a daemon). Ftp can be used interactively.

FTP [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:windowsize] [-A] [host]

-v Suppresses display of remote server responses.
-n Suppresses auto-login upon initial connection.
-i Turns off interactive prompting during multiple file
transfers.
-d Enables debugging.
-g Disables filename globbing (see GLOB command).
-s:filename Specifies a text file containing FTP commands; the
commands will automatically run after FTP starts.
-a Use any local interface when binding data connection.
-A login as anonymous.
-w:buffersize Overrides the default transfer buffer size of 4096.
host Specifies the host name or IP address of the remote
host to connect to.

 

Mitchb   90 pts.  |   Dec 11 2008  10:12PM GMT

Thanks Phil for your efforts.

I ended up getting the source of the data changed to be less than 4096 char record size.

It was worth the discussion anyway, thanks again.