Re: It's TGET not TPUT to get the data: Where do I start?

Rick Fochtman <[email protected]>
Newsgroups gmane.comp.emulators.turnkey-mvs
Message-ID <[email protected]>
-------------------------------<snip>--------------------------------

> I am looking at  http://tommysprinkle.com/mvs/P3270/input.htm 
> <http://tommysprinkle.com/mvs/P3270/input.htm>
>
> Where Tommy says:
> When we issue the TGET macro with the ASIS parameter specified, TSO 
> will issue a "Read Modified" command to the 3270 terminal.  The 
> terminal will respond with (1) an AID  or Action ID character that 
> identifies which key was the cause of input to be accepted (Enter, 
> PKxx, PAx, Clear), (2) the location of the cursor when the input key 
> was pressed and (3) fields with the MDT bit set.  The fields are 
> returned starting with a x'11' followed by a two byte encoded buffer 
> address followed by the data from the field.  By scanning for the 
> special code x'11' we can find the start and end of each data field.
>
> I think this looks like:
>
> Aid/Action ID
>
> Cursor Location
>
> 11 [Field Location] Field data
>
> 11 [Field Location] Field data
>
> Followed by ??
>
> <for each field with mdt set>

----------------------------------<unsnip>-------------------------------
That's pretty accurate. TGET will also tell you how many bytes were 
read. You can scan the buffer for the X'11' byte with a TRT instruction 
pretty handily. Just start it at the byte following the previous X'11' 
byte, if any. Or you can zero out the buffer before each TGET using a 
MVCL instruction.

Rick
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.