• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Getting past the physical file record length limit of 32766 bytes

Frosty the Coder

Legendary Poster
I'm STILL working on getting an FTP of an XML document to function.

My XML input file has an entry that is 40000+ characters.
The max record length of a physical file is 32766 characters.

The FTP works in that I get the first 32766 characters of the row.
It doesn't work as anything beyond 32766 is truncated.

I'm about to search the internet for ways around this BUT, as is my habit, I'm going to post here first.

Has anyone FTP'd records longer than 32766, and how did you do it?
Has anyone used a non-FTP approach to do this?
Is there a way to read the XML from the windows folder and not use FTP?

Thanks in advance

Frosty the Coder

Legendary Poster

Thanks for the reply.

When I found that I could FTP directly from the shared network folder, I gave up on trying to get the IFS to work.
When I researched XML-INTO, I found the documentation to be "unfulfilling".

I guess I will go back to those and try again.



Well Known Member
What version of the OS are you running on?

I *believe* that if your trying to process an XML file/object with a record length larger than 32,766 your going to have to use special system functions (like XML-INTO) to process the XML directly from the stream file.

Hope to be retired before I have to screw around with XML at our facility...lol

Frosty the Coder

Legendary Poster
Terry, we are on V7R1 for the OS.

Right now, my issue isn't w/the parsing of the XML.
It's the fact that FTP is truncating records at the 32766 character.
I lose valid data after that.

I did look into the XML-INTO for the parsing.
From what I've read, you have to specify which node you are looking for, and the "path" meaning where that node is within the XML.
You would have to know which nodes are needed for what you want to do.

FURTHER, you can parse the XML into a data structure, but that data structure must match the order in which the nodes are specified.

Either way, it's not the XML-INTO that will get me beyond the truncation issue.

I think I need to get back to trying to UNDERSTAND and USE the IFS.
These are two things that I've been able to ignore prior to this.
There goes my 30+ year streak of being apathetic to them...

Thanks for your replies.
I will be starting an IFS thread in a moment.

Happy last couple days of Sept 2018.