× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Glenn,

Glenn Gundermann wrote:
I've seen a length of 640 being used by several people. Just wondering
why this number is popular if 5000 is the actual maximum length?

There's no limit that I know of to the length of a path name in the IFS. (Actually, for technical reasons, there's probably a 16 mb limit.) However, remember that the IFS is an interface to many underlying file systems. It has to be able to handle anything required by any of the file systems in use today, and anything that might arise in the foreseeable future.

The individual file systems may impose shorter restrictions. For example, the /QSYS.LIB file system has a maximum path name length of 66 chars. QDLS is 82, QNTC is 255, QOPT is 294. However, some of the others (root, QOpenSys, NFS, QFileSvr.400) have no real limit.

The 5000 number is probably coming from the length of a TYPE(*PNAME) field on an i5/OS *CMD object. But, that's just the limit of the command interface, and not a limit of the IFS itself. It's conceivable that you could create a path name in the root file system that would not work on a CL command, because of the 5000 limit on those commands.

Likewise, the 640 limit comes from the dirent data structure. dirent is the data structure returned by the readdir() API that reads one entry from a directory. However, that number (640) isn't the limit of an entire path name -- rather it's the limit of an individual object name.

Path names are made up of many object names, separated by slashes. So they can be much larger than 640.

But, again, that 640 number is the limit of readdir(), which is intended to work with any possible file system. The individual file systems have their own limits. Root, QOpenSys, QNTC, UDFS and QNetWare are all limited to 255 chars per object name. (I find it interesting that QNTC has a total path limit that's the same as the individual object name... heh). Some others have sharper restrictions.... QDLS is limited to 12 (8 for the object name, one for a dot, and 3 for the extension name) per object. and QSYS.LIB is limited to 17 per object (10 for the obj name, for a dot, 6 for the object type.)

But, anyway... Because people sometimes have to type these path names in, they usually are kept relatively short. I wouldn't want to have to key 16 million characters into a command line! So, in the vast, vast, majority of the cases, using a shorter variable that only handles 640 or 5000 chars is more than enough.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.