You should also do "getconf -a |grep PATH_MAX" to see the actual limit. Whatever that limit is, it's unlikely you can do anything to do to get around that. (While some commands might work, there's no guarantee the OS will.)
ENAMETOOLONG is the error returned when you attempt to access a file or directory that
has a path name that is too long. Are you trying to create a path like that?
If you have some deep directory trees, try adding a symbolic link from the bottom of one tree to the top of another directory tree. Referencing a file way down on the second tree via the full name of the first tree + link > directory name of second tree
You are confusing PATH_MAX with max filename length, which is filesystem dependent. If you want to see what is the max file length possible on a particular filesystem, you can use:
perl -e '$fn="files" . ("s" x shift(@ARGV)); mkdir($fn) || die "Cannot create: $fn";' 200
Increase 200 until it fails. That will be the filename that's too long.