Previous Page Contents Page Next Page

3.9 Keystroke Recording and Replay

The 3270 emulation program provides facilities for recording sequences of keystrokes used during 3270 emulation and for replaying these sequences. These facilities enable you to save sequences of keystrokes that you use regularly (for example, to start up a host application and log on or to enter a complex host command) and to use the recorded sequences instead of having to type all the keystrokes again.

Recorded sequences are identified by one of the PF keys PF1 to PF24. To identify a sequence to be recorded or replayed, press the RECORD or REPLAY key followed by the appropriate PF key. You can have up to 24 recorded sequences at a time. The PF keys retain their standard functions for all other uses; they are interpreted as identifiers for keystroke sequences only when they follow the RECORD or REPLAY keys.

3.9.1 Valid Keystrokes for Recorded Sequences

Any of the keys in the Program Function, Program Access, 3270 System, Edit, 3179G System, and Characters key groups can be included in a recorded key sequence. For more information about the key groups, see Default Keyboard Mappings, or the Customize Key Definitions dialog in the 3270 emulation program's menu interface. It is the host 3270 keys that are recorded, not the local mappings of them on your terminal. Your recorded key sequences are not affected if you remap your keyboard.

Other keys, which perform local functions such as TEMPEXIT or REDRAW rather than host functions, are not recorded. In particular, if you switch to another 3270 session, to a TEMPEXIT shell, or to the 3270 control interface, recording is suspended and any subsequent keys are not recorded. Recording resumes when you switch back to the session on which you started it.

You can include a key that requests action from the host, such as ENTER or PA1, but it must be the last key in the sequence, because these keys transfer control to the host application. The 3270 emulation program cannot accept further input until the host has responded; any keys following an action-request key in the sequence will be rejected.

3.9.2 Recording a Keystroke Sequence

Use the following steps to record a key sequence:

  1. Press the RECORD key (default keystroke Esc S).

    The status line changes to display the message

    RECORD
    PF KEY
    , as shown in the following example. It may also display a list of numbers enclosed in parentheses; these are the numbers of the PF keys that already have key sequences associated with them.

    RECORD PF KEY (1 4 11 12 15 21)
  2. To continue keystroke recording, press any PF key (PF1-PF24) to identify the sequence to record. The default keystrokes are F1 -F12 for PF1-PF12, and Esc F1-Esc F12 for PF13-PF24. Alternatively, to abandon keystroke recording without specifying a PF key, press either RECORD (default keystroke Esc S) or QUIT (default keystroke Ctrl + T) to return to normal 3270 emulation.

    If you selected a PF key, the status line returns to normal and displays

    RECORD nn
    , where nn is the PF key number you selected. If this PF key was already assigned to a keystroke sequence, a beep sounds to warn you (unless you turned off the Enable emulator beep option in the Customize Miscellaneous Options dialog box). To avoid overwriting the existing sequence, press QUIT (default keystroke Ctrl + T), which abandons keystroke recording and leaves the existing sequence unchanged.

  3. Type the keystrokes to record. You can use any of the keys in the Program Function, Program Access, 3270 System, Edit, 3179G System, and Characters key groups. Other keys, which perform local functions such as TEMPEXIT or REDRAW rather than host functions, can be entered but are not recorded. For more information, see Valid Keystrokes for Recorded Sequences.

    The first keystroke in the sequence must not be a DELETE keystroke, because it is used to clear the recorded sequence. For more information, see Clearing a Recorded Keystroke Sequence. Also, if the first keystroke is the RECORD key, recording stops; the PF key is still marked as having a sequence assigned to it, but the sequence does not contain any keystrokes.

    You can record up to 1500 keystrokes in one sequence. If you enter more than 1475 keystrokes, a warning beep sounds, and the

    RECORD 
    nn
    message on the status line is replaced by
    BUFFER LOW (mm)
    . The number of keystrokes remaining is displayed as mm and is decremented as you continue to enter keystrokes.

  4. To complete recording when you have finished entering keystrokes, press the RECORD key again. The keystroke sequence is saved; you can replay it using the same PF key you used to record it (see Replaying a Keystroke Sequence).

    To abandon recording and return to normal 3270 emulation, press QUIT (default keystroke Ctrl + T). The keystrokes you have entered are not recorded; any previous sequence assigned to this PF key is left unchanged.

3.9.3 Replaying a Keystroke Sequence

Use the following steps to replay a key sequence you have already recorded:

  1. Press the REPLAY key (default keystroke Esc P).

    The status line changes to display the message

    REPLAY
    PF KEY
    , as shown in the following example. It also displays a list of numbers enclosed in brackets; these are the numbers of the PF keys that have key sequences associated with them.

    REPLAY PF KEY (1 4 11 12 15 21)
  2. To continue keystroke replay, press any PF key (PF1-PF24) whose number is shown in the list, to identify the sequence to replay. The default keystrokes are F1-F12 for PF1-PF12, and Esc F1- Esc F12 for PF13-PF24.

    To abandon keystroke replay and return to normal 3270 emulation, press QUIT (default keystroke Ctrl + T).

    If you selected a valid PF key, the status line returns to normal; REPLAY nn is displayed, where nn is the PF key number you selected. The recorded keystroke sequence is replayed.

    If you selected a PF key for which no sequence was recorded or a non-PF key, a warning beep sounds to indicate that the keystroke was rejected (unless you turned off the Enable emulator beep option in the Customize Miscellaneous Options dialog box), and the

    REPLAY PF KEY
    message remains displayed. Either select a valid PF key, or press QUIT (default keystroke Ctrl + T) to abandon replay.

  3. To stop the replay at any time before it has finished, press QUIT (default keystroke Ctrl + T); the remaining keystrokes are not replayed, and you return to normal 3270 emulation.

    If you enter a keystroke that takes you out of the current 3270 session, such as ACTIONS or FILE XFR (which move to the 3270 control interface), NEXTSESS or SESS n (which move to another 3270 session), or TEMPEXIT (which moves to a new Solaris shell), the replay is suspended while you are not in the 3270 session in which you started replay. When you return to the session, the replay resumes.

    Other keystrokes typed during a replay sequence, such as edit keys or character keys, are queued up in the 3270 emulation program's type-ahead buffer and will take effect after the replay has finished.

3.9.4 Pausing within a Keystroke Sequence

Sometimes you may need to record a keystroke sequence that enables you to enter a combination of fixed and variable keystrokes. For example, you may want to record a host command in such a way that you can supply different parameters to the same command each time you use it, or you may want to force a recorded logon sequence to stop to enable you to type the password (instead of recording the password).

You can use the PAUSE key (default keystroke Esc W) while recording a keystroke sequence, to indicate where the sequence should stop for additional input data. When you replay the same keystroke sequence, replay stops at this point to enable you to type the new data before continuing.

Use the following steps to include a pause in a recorded key sequence:

  1. While recording the sequence, press the PAUSE key (default keystroke Esc W).

    The message

    RECORD PAUSED
    replaces
    RECORD nn
    on the status line. Any keystrokes that you type at this point are not recorded; however, the keystrokes you have already recorded are retained.

    You can use the RECORD key while recording is paused, to stop recording and store the keystrokes you have entered, or the QUIT key to abandon recording. Each of these keys works as if the PAUSE key had not been pressed.

  2. After typing any variable data, press the PAUSE key again. The status line display is restored; recording continues as usual.

  3. You can repeat Steps 1 and 2 later during recording if you need more than one pause in the sequence.

  4. Take the usual steps to save the recorded key sequence.

  5. When you replay the key sequence, the replay stops at the point where you entered the PAUSE key. The message

    REPLAY
    PAUSED
    replaces
    REPLAY nn
    on the status line.

  6. Type in the appropriate keystrokes.

  7. Press the REPLAY key (default keystroke Esc P) to continue. The sequence continues with the keystrokes you entered after the end of the pause during recording.

    Alternatively, if you want to stop the replay at this point, press the QUIT key (default keystroke Ctrl + T).

3.9.5 Clearing a Recorded Keystroke Sequence

If you have recorded a key sequence that you no longer want to use, you can clear it so that the PF key no longer has a key sequence associated with it by using the following procedure:

  1. Press the RECORD key (default keystroke Esc S), and then the PF key that identifies the sequence you want to clear, as though you were recording a new sequence for this PF key.

    A warning beep sounds (unless you turned off the Enable emulator beep option in the Customize Miscellaneous Options dialog box), to remind you that this PF key already has a key sequence assigned.

  2. To clear the keystroke sequence, press the DELETE key (default keystroke Del). The sequence is cleared; this PF key no longer appears in the list of PF keys associated with keystroke sequences.

    Alternatively, to abandon clearing the sequence, press QUIT (default keystroke Ctrl + T). The recorded sequence is left unchanged, and you return to normal 3270 emulation.

3.9.6 Saving Keystroke Sequences

Customizing 3270 Emulation, describes how to use style files to define the appearance and behavior of your 3270 emulation. You can customize the 3270 emulation program as you use it, and the changes you make are immediately reflected in the program. However, if you want to keep the changes so that you can use the same customization next time you use the 3270 emulation program, you must save them to a style file.

The 3270 emulation program stores recorded keystroke sequences in the same way as it stores customization changes. Any keystroke sequences you record during 3270 emulation are available until you exit the 3270 emulation program or until you open a different style file. In order to keep the sequences you have recorded so that you can use them later, you must save your 3270 customization to a style file. For more information, see Customizing 3270 Emulation.

If you save the style file while you are recording or replaying a key sequence (even if you have used the PAUSE key to pause recording), you cannot save the key sequence. The new key sequence (and any previous key sequence assigned to the same PF key) will be lost; the PF key will be left without a key sequence assigned. The same applies if you exit the 3270 emulation program during recording or replay. To avoid losing keystroke sequences, always ensure that you have finished recording or replaying key sequences before saving the style file or exiting the program.

3.9.7 Multiple Sessions

If you are using more than one 3270 display session at a time, the key sequences you define are shared among all your sessions. Therefore, you cannot record a sequence for a particular PF key on one session, and at the same time record or replay a sequence identified by the same PF key on another session. For example, your PF key definitions are restricted as follows:

In any situation where you try to use a keystroke sequence that is currently in use, the message

ERROR - IN USE
is displayed on the status line. Press the RESET key (default keystroke Esc R) to continue.

Previous Page Contents Page Top of Page Next page