reading the screen buffer

Background: We run our 3270 sessions through CICS. When a NAT error occurs, we capture the error by calling CICS routine that reads the screen buffer and we save that to an ADABAS file. These errors are then routed to specific technical folks for resolution.

For terminal emulation under NJX, we run NJX through the BATCH WEB SERVER (NWO), but we cannot access the CICS routine (from the batch nwo) that will return the screen buffer. We have all kinds of problems with the CICS version of the NWO and it seems like the CICS NWO is a no go at the moment.

My question: is there a way to access what is on the screen (screen buffer) from Natural? I was hoping there would be a user exit somewhere that I could call that will return the screen buffer in an array or some such structure.

Take a look at the %C family of commands. You can specify characteristics of what you are looking for (by color, intensity, line number, cursor, etc) and place found text on the stack or in *com.


Thanks Steve! That is a great solution.

I am drawing a blank at the moment - can I read the source work area into an array with a user exit? I looked at the user exits but nothing seems like it would do that. I seem to remember reading about that sometime ago, but am drawing a blank on the details.

Hi Demos;

Look at: USR1057


Hi Steve

Seems like USR1057 reads source from SYSTEM-FUSER. So to make this work will I have to save the content of the source work area to a temp name and then use USR1057 to read content.

You can combine a FOR loop with USR2014N to simulate a READ WORK of the Source Work Area. Sample code is available on the Forum at [url][/url].

Thanks Ralph. USR2014N will do the trick. Also thanks for the link to the code sample.