I want to set a PFKEY to display (but not execute a command) because I could not remember the syntax of the command.
You setup the PFKEYS in a table such as USER.PARMLIB(PFKTAB00)
PFKTAB TABLE(COMMANDS)
PFK(01) CMD('K E,1')
PFK(02) CMD('K E')
PFK(03) CMD('K E,D')
PFK(04) CMD('K D,F')
PFK(05) CMD('K S,DEL=R')
PFK(06) CMD('K S,DEL=RD')
PFK(07) CMD('D A,L')
PFK(08) CMD('D R,R,CN=(ALL)')
PFK(09) CMD('K D,U')
PFK(10) CMD('V TCPIP,TCPIP,OBEYFILE,USER.TCPPARMS(ROUTE)') CON(Y)
PFK(11) CMD('K E')
PFK(12) CMD("%NETV SHUTSYS") CON(Y)
...
PFK(24) KEY(12)
PFKTAB TABLE(COLIN)
PFK(01) CMD('K E,2')
...
Where PF12 is the command I want to specify – CON(Y) means confirm before executing it.
PFK(24) KEY(12)
Says make PFK24 the same as PFK12
Multiple tables
You can have multiple definitions (tables) within a file (COMMANDS and COLIN)
The console command
K N,PFK=COLIN
Says – from the currently selected member use the table COLIN.
Use a different member
You can create different members (in addition to having multiple tables within a member)
Issue the commands
T PFK=CP
to set the table to use member PFKTABCP
The command
D PFK,T
displays the tables within the member, for example
PFK TABLES IN PFKTAB00 AVAILABLE FOR USE ON SYSTEM VS01
TABLE TABLE TABLE TABLE TABLE TABLE
COLIN COMMANDS
You can display the PFKeys for a table using
d pfk,t=COLIN
You can activate a table within a PFKTAB using
K N,PFK=COLIN
How to use PFKEY tables
You could set up multiple tables in one member, or have multiple members each with one table. For example a table for common TCPIP commands, a table for general commands (including the Netview shutdown command).
You can specify CON(Y) to allow you to change the statement, before executing it. For example in my TCPIP table I have
PFK(10) CMD('V TCPIP,TCPIP,OBEYFILE,USER.TCPPARMS(ROUTE)') CON(Y)
to allow me to change which TCPIP configuration statements to use.