QsnSavScr is used to save a screen that can later be restored with QsnPutBuf.
QsnSavScr has a maximum internal 7,345 byte buffer size. This information is not reflected on any of IBM's documentation.
Normally nobody needs to worry about the buffer size because that is all handled under the covers.
It does become an issue if the 5250 software vendor has not chosen to perform the optional compression on large buffers.
We have been using the QsnSavScr API since around 2012.
Every so often we have instances where the TN5250 program in Windows just ends.
On the server the 5250 job goes into a disconnected status and does not halt. The job log is extremely unhelpful for detecting the error.
We observed overflow issue with Mochasoft'S TN5250 software prior to version 4.3 Nov 2025.
Mochasoft worked with us to get the issue reported to IBM and then Mochasoft fixed their software to compress the data stream.
IBM was able to identify the internal buffer limitation.
IBM's position is that the buffer size limit has been in place for many years and is not defective code.
So, if anyone has an issue with their programs where the 5250 software just ends or stops working, then you may need to contact your software vendor to update their 5250 emulator software so that it compresses the data stream under the 7,345 byte maximum.
If you use Mochasoft TN5250 I suggest you upgrade to version 4.3 release in November 2025.
We did not observe this issue on IBM's iAccess Client. They apparently compress their data streams already.
The Demo program:
https://code.midrange.com/a9f703db2e.html
--
Chris Hiebert
Lead Software Developer
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.
As an Amazon Associate we earn from qualifying purchases.