Sending key strokes is the easiest way of sending data.
Your program acts in the same way as the keyboard operator, with FEPI letting the program "press keys" just as the operator does.
A sample program illustrates the techniques used; see Key stroke CONVERSE.
The data can contain any combination of data characters together with manipulative, special, and attention key values representing almost every keyboard key. Data characters are represented as themselves. Manipulative, special, and attention key values are represented by escape sequences, comprising an escape character followed by a 2-character code. For example, using '&' for the escape character, you might send the following sequence to insert AB in one field, type IJKL into another field, and press PF7 to complete the input operation:
&HO&T2&R1&INAB&RS&N4IJKL&EF&07
Home
Tab, twice
Cursor right
Insert
AB
Reset
Newline, 4 times
IJKL
Erase--EOF
PF7
If the sequence were in a character string named KEY-SCRIPT, you would send it with:
EXEC CICS FEPI SEND FORMATTED
CONVID(....)
KEYSTROKES
FROM(KEY-SCRIPT)
FLENGTH(30)
In full, the escape sequences are:
Manipulative keys | Special keys | Attention keys |
---|---|---|
|
|
|
You can choose an alternative escape character.
Data characters must have values >=X'40', so nulls (X'00') are not supported as such, although they can be generated using the erase or delete keys. Key strokes following an attempt to type into a protected field are ignored until RESET is keyed.
For magnetic stripe reader support, the sequence &MS...data...&ME represents passing a secure magnetic stripe card through the reader. Nonsecure cards have to be simulated by entering the data in the normal way.
The cursor position is set by your key strokes, rather than specifying where the cursor is placed. If your first key stroke is always the HOME key (&HO), you will have the cursor in a known starting position.
You can choose to send all the data with one command, or to use several commands to build up the data. The last (or only) command should have an attention key as its final key stroke, to actually send the data. There should be no other attention keys.
Alternatively, if you are not interested in the received data, you can ignore it by sending key strokes with multiple attention keys, as described in Multiple attentions.
Apart from communication errors caused externally, there are two likely sorts of error that you might get:
Many of these data errors cannot be detected until the data is actually processed, because they depend on the previous data. This means that any key strokes preceding the error will already have taken effect--they cannot be removed by FEPI.
The FEPI SEND can also fail if, following end bracket, the back-end sends BID to send more data and your pool has CONTENTION(LOSE). You must then receive the new back-end data first.
[[ Contents Previous Page | Next Page Index ]]