Changing Program Function (PF) Key Definitions
Program function (PF) keys can be defined as TSO/E or Session Manager commands, input to programs, or text-strings that comment your streams. Use the CHANGE.PFK command to modify the meaning of any of the PF keys. This command requires that you enter the number of the PF key to be changed, the definition-text-string for the key, and the name of the stream where the definition-text-string is to be placed when the PF key is pressed.
You can make a PF key a TSO/E command (or commands) by defining the definition-text-string as a valid TSO/E command or subcommand and specifying TSOIN as the target stream-name. This is useful when working with programs that prompt for input or commands that have subcommands. For example, you can define a PF key as often-entered subcommands of the TSO/E TEST command, such as SAVE or GO.
You can make a PF key a Session Manager command (or commands) by defining the definition-text-string as a valid Session Manager command and specifying SMIN as the target stream-name. This is done in the default environment to allow you to use the PF keys for scrolling.
If you have the definition-text-string sent to another stream (such as the TSOOUT stream), the PF keys can be used to comment your streams.
- Places each line of information typed on the screen since the last time you pressed the Enter, CLEAR, PA1, PA2, or any PF key in the appropriate stream, just as if you had pressed the Enter key.
- Places the definition-text-string of the PF key definition in the target stream.
&1., &2., &3., … &n., and &*.
If
the ampersand appears elsewhere in the definition-text-string when
SUBSTITUTE is specified, it must be doubled.You must provide parameters (tokens) to this symbolic substitution process by entering them on a line of the screen (separated by one or more blanks), and pressing the PF key.
- Scans the line of information once from left to right and breaks
the line into as many words (tokens) as there are numbered symbolic
arguments in the PF key definition-text-string. This process
is called tokenization. The remainder of the text in the line becomes
the
*
token. If there are no numeric symbolic arguments in the text, the entire line of information becomes the*
token. - Substitutes the words (tokens) into the PF key definition-text-string, replacing the symbolic arguments. If there are more symbolic arguments than words, null characters are substituted for those arguments. If there are more words than symbolic arguments, the extra words are ignored. If there are no modified fields on the screen, null characters are substituted for each argument in the text-string.
- Places the resulting definition-text-string in the next available line of the target stream.
The periods immediately following the numeric symbolic arguments are used to distinguish the arguments from the characters immediately following them in the definition-text-string. The periods are not needed if the character after the argument is not a digit.
The example section of the CHANGE.PFK command includes several examples of how the PF keys can be defined.
Most PF keys in the default environment are defined as a string of Session Manager commands that are placed in the SMIN stream.
The following table summarizes the default definitions of the PF keys. PF keys 13-24 have the same definition as PF keys 1-12.
PF Key/PF Key Default Definition | PF Key/PF Key Default Definition | PF Key/PF Key Default Definition |
---|---|---|
PF1/13 Not Defined | PF2/14 Set Scroll Amount | PF3/15 Not Defined |
PF4/16 Not Defined | PF5/17 Find/Repeat Find | PF6/18 Change CURRENT Window |
PF7/19 Scroll Backward | PF8/20 Scroll Forward | PF9/21 Scroll Top |
PF10/22 Scroll Left | PF11/23 Scroll Right | PF12/24 Scroll Bottom Unlock |
- PF1/13
- PF1/13 is not defined in the default environment. If you press this key, Session Manager does
the following:
- Places the message
PF1 NOT DEFINED
orPF13 NOT DEFINED
in the SMOUT stream - Moves the PASSWD window so that the window displays the message.
The commands that issue the message and move the PASSWD window over the SMOUT stream are:CHANGE.PFK 1 'PFK 1 NOT DEFINED' SMOUT; CHANGE.WINDOW PASSWD VIEW(SMOUT)
- Places the message
- PF2/14
- PF2/14 accepts the value typed on the screen for the scroll amount field and places this value
highlighted in the EXTRA3 stream. It then changes the definitions of the scroll PF keys (PF7/19,
PF8/20, PF10/22, and PF11/23) to do the following:
- Set the scroll value to zero. This is done so that the default window will not move if a not valid value is entered.
- Scroll the amount entered. Session Manager substitutes the value entered in the place of the symbolic argument in the AMOUNT operand.
- Scroll the LVALUE window over line 8 in the HEADER stream so the word
LOCKED
is displayed. - Unlock the terminal keyboard so additional scrolling PF keys can be pressed.
- Scroll the LINE window the entered amount (for PF keys 10/22 and 11/23 only).
The commands that define PF2/14 are:CHANGE.PFK 2 'PUT ''&1'' EXTRA3 INTENSITY(2); CHANGE.PFK 7 ''SCROLL.BACK 0; SCROLL.BACK AMOUNT(&1); SCROLL.ABSOLUTE 8 LVALUE; CHANGE.TERMINAL CONTROL(0)'' SMIN; CHANGE.PFK 8 ''SCROLL.FORWARD 0; SCROLL.FORWARD AMOUNT(&1); SCROLL.ABSOLUTE 8 LVALUE; CHANGE.TERMINAL CONTROL(0)'' SMIN; CHANGE.PFK 10 ''SCROLL.LEFT 0; SCROLL.LEFT AMOUNT(&1); SCROLL.LEFT LINE AMOUNT(&1); SCROLL.ABSOLUTE 8 LVALUE; CHANGE.TERMINAL CONTROL(0)'' SMIN; CHANGE.PFK 11 ''SCROLL.RIGHT 0; SCROLL.RIGHT AMOUNT(&1); SCROLL.RIGHT LINE AMOUNT(&1); SCROLL.ABSOLUTE 8 LVALUE; CHANGE.TERMINAL CONTROL(0)'' SMIN' SMIN SUBSTITUTE
- PF3/15
- PF3/15 is not defined in the default environment. If you press this key, Session Manager does
the following:
- Places the message
PF3 NOT DEFINED
orPF15 NOT DEFINED
in the SMOUT stream - Moves the PASSWD window so that it displays the message
The commands that issue the message and move the PASSWD window over the SMOUT stream are:CHANGE.PFK 3 'PFK 3 NOT DEFINED' SMOUT; CHANGE.WINDOW PASSWD VIEW(SMOUT)
- Places the message
- PF4/16
- PF4/16 is not defined in the default environment. If you press this key, Session Manager does
the following:
- Places the message
PF4 NOT DEFINED
orPF16 NOT DEFINED
in the SMOUT stream - Moves the PASSWD window so that it displays the message
The commands that issue the message and move the PASSWD window over the SMOUT stream are:CHANGE.PFK 4 'PFK 4 NOT DEFINED' SMOUT; CHANGE.WINDOW PASSWD VIEW(SMOUT)
- Places the message
- PF5/17
- PF5/17 is the find/repeat find key. It does the following:
- Locks the default window by issuing the SCROLL command specifying a value of 0.
- Issues the FIND.BACKWARD command substituting the information typed on the screen as the character string to be found. If you press PF5/17 without typing anything on the screen, the previous find command is repeated.
- Sets the terminal keyboard control to unlock after 5 seconds.
- Scrolls the LVALUE window to display the word
LOCKED
on line 8 in the HEADER stream.
The commands that define PF5/17 are:CHANGE.PFK 5 'SCROLL.BACKWARD 0; FIND.BACKWARD ''&*''; CHANGE TERMINAL CONTROL(5); SCROLL.ABSOLUTE 8 LVALUE' SMIN SUBSTITUTE(&)
- PF6/18
- PF6/18 changes the CURRENT window to display either the last two lines in the TSOOUT stream or
the last two lines in the TSOIN stream. Initially, the window displays the last two lines in the
TSOOUT stream. When you press PF6/18, it does the following:
- Saves all of the current PF key definitions
- Changes the CURRENT window to display the TSOIN stream
- Redefines itself so that the next time you press the key, the CURRENT window again displays the TSOOUT stream and the PF key definitions are restored
The commands that define PF6/18 are:CHANGE.PFK 6 'SAVE.PFK; CHANGE.WINDOW CURRENT TARGET(TSOIN) VIEW(TSOIN); CHANGE.PFK 6 ''CHANGE.WINDOW CURRENT TARGET(TSOIN) VIEW(TSOOUT); RESTORE.PFK '' SMIN ' SMIN
- PF7/19
- PF7/19 does the following:
- Scrolls the default window backward a half-page over the stream it is displaying (As part of the SCROLL command, Session Manager locks the window.)
- Unlocks the keyboard
- Scrolls the LVALUE window to display the word
LOCKED
on line 8 in the HEADER stream
The commands that define PF7/19 are:CHANGE.PFK 7 'SCROLL.BACKWARD AMOUNT(HALF); CHANGE.TERMINAL CNTL(0); SCROLL.ABSOLUTE 8 LVALUE' SMIN
- PF8/20
- PF8/20 does the following:
- Scrolls the default window forward a half-page over the stream it is displaying (As part of the SCROLL command, Session Manager locks the window.)
- Unlocks the keyboard
- Scrolls the LVALUE window to display the word
LOCKED
on line 8 in the HEADER stream
The commands that define PF8/20 are:CHANGE.PFK 8 'SCROLL.FORWARD AMOUNT(HALF); CHANGE.TERMINAL CNTL(0); SCROLL.ABSOLUTE 8 LVALUE' SMIN
- PF9/21
- PF9/21 does the following:
- Scrolls the default window to the oldest information in the stream it is displaying (As part of the SCROLL command, Session Manager locks the window.)
- Unlocks the terminal keyboard so that additional PF keys can be used
- Scrolls the LVALUE window to display the word
LOCKED
on line 8 in the HEADER stream
The commands that define PF9/21 are:CHANGE.PFK 9 'SCROLL.OLDEST; CHANGE.TERMINAL CNTL(0); SCROLL.ABSOLUTE 8 LVALUE' SMIN
- PF10/22
- PF10/22 does the following:
- Scrolls the default window one half-page to the left side of the information in the stream it is displaying (As part of the SCROLL command, Session Manager locks the window.)
- Scrolls the LINE window one half-page to the left
- Unlocks the terminal keyboard
- Moves the LVALUE window over the word
LOCKED
on line 8 in the HEADER stream
The commands that define PF10/22 are:CHANGE.PFK 10 'SCROLL.LEFT AMOUNT(HALF); SCROLL.LEFT LINE AMOUNT(HALF); CHANGE.TERMINAL CNTL(0); SCROLL.ABSOLUTE 8 LVALUE' SMIN
- PF11/23
- PF11/23 does the following:
- Scrolls the default window one half-page to the right side of the information in the stream it is displaying (As part of the SCROLL command, Session Manager locks the window.)
- Scrolls the LINE window one half-page to the right
- Unlocks the terminal keyboard
- Scrolls the LVALUE window over the word
LOCKED
on line 8 in the HEADER stream
The commands that define PF11/23 are:CHANGE.PFK 11 'SCROLL.RIGHT AMOUNT(HALF); SCROLL.RIGHT LINE AMOUNT(HALF); CHANGE.TERMINAL CNTL(0); SCROLL.ABSOLUTE 8 LVALUE' SMIN
- PF12/24
- PF12/24 does the following:
- Scrolls the LINE window the maximum amount to the left (to column 1)
- Scrolls the default window the maximum amount to the left (to column 1)
- Moves the default window to the newest information in the stream and then unlocks the window
- Sets the maximum time that the keyboard can be locked to the last non-zero value entered
- Scrolls the LVALUE window over the word
UNLOCKED
on line 7 in the HEADER stream
The commands that define PF12/24 are:CHANGE.PFK 12 'SCROLL.LEFT LINE AMOUNT(MAX); SCROLL.LEFT AMOUNT(MAX); UNLOCK.NEWEST; CHANGE.TERMINAL CNTL(LAST); SCROLL.ABSOLUTE 7 LVALUE' SMIN