Receiving screen-image data

If you specify an INTO data area on a FEPI RECEIVE command, the data you receive is the screen image; 24 rows of 80 bytes (or whatever your screen size is) corresponding byte-for-byte with the screen. Data bytes are represented as themselves. In positions corresponding to attribute bytes, X'FF' appears.

You need only get the first few lines of the screen if that is all that you are interested in.

After you have processed the data, you will probably use the same screen image, modified as required, on a subsequent screen-image send.

Even though you got a screen image, you can use the FEPI EXTRACT FIELD command as well if you want, for any particular fields that you require, just as described in Receiving field-by-field. In particular, the FEPI EXTRACT FIELD command is the only way you can determine the value of the field attributes.

A sample program illustrates the techniques you can use; see Key stroke CONVERSE.

Note:
If you are using the C programming language, remember that a screen image probably contains null characters. Take care if you are handling the screen image as a string.

Command completion and errors

As far as completion and errors are concerned, a FEPI RECEIVE command with an INTO data area is just like one without. So, if you do not get ‘change direction’ or ‘end bracket’, you have to issue another FEPI RECEIVE command before you can send your screen image back, and even ‘end bracket’ might require further FEPI RECEIVE commands.

[[ Contents Previous Page | Next Page Index ]]