s3270 - Write text to session, not inside an input field

884 Views Asked by At

I have an interesting problem interfacing to an IBM mainframe based CICS application. I can login and write to input fields successfully using s3270 and x3270if. However, the CICS system I am working with expects certain commands to simply be written to the "screen", not a proper input field. I am using the String() function to write to input fields, but I cannot seem to find a function that will simply write a string to a given screen position.

Has anyone dealt with a similar scenario and can provide me with some pointers?

1

There are 1 best solutions below

0
On BEST ANSWER

With 3270, there is no such thing as "write to the screen," as opposed to writing to a field. A formatted 3270 buffer is a set of fields, each with a certain set of attributes. You cannot write to an arbitrary screen position unless there is an unprotected field that includes that position. That's 3270 specs, that's how 3270 hardware worked, that's how 3270 emulators work, and any API you may be using for working with 3270 emulators will just expose that.

(You may have an unformatted buffer with 3270, but I gather that's not the situation you are facing, since then you would be able to write to any screen position - the buffer is essentially one big field.)

So you need to figure out how the screen you are trying to write to is formatted, and where its fields are, and where the application expects its input. If you can just run the emulation and type the input according to whatever instructions you have then it should be straightforward - wherever your input goes, that's where you should put it programmatically.