The functions assigned to the console(s) Program Function Keys persist from IPL to IPL, but there is no convenient way for those settings to be assigned under MVS 3.8j. Under later MVS-OS/390-zOS versions there is a SYS1.PARMLIB member that may be used for that function. Fortunately, this utility was written in the era of MVS 3.8j (actually prior to OS/VS2) to solve this requirement and is available for our use.
It is located in File #295 of the older CBT tape version #249 and was written by Barry Goldberg at the Auto Club of Southern California.
There are some required macros for the assembly of the program, but they are conveniently included with the source. I have made some minor modifications to the source:
You can easily locate my changes by the *JLM* in column 67 of the source. The jobstream to assemble/link SETPFKEY - setpfk$ - is contained in the archive setpfk.tgz [MD5: 77208807EAD5D65BB26D7C0FC0EC4379]. Download the archive and extract the jobstream (WinZip on Windows/?? or tar on Linux). Submit the jobstream to assemble and link the single load module for SETPFKEY into SYS2.LINKLIB. If you don't have SYS2.LINKLIB defined, you will need to modify the jobstream to specify a target load library. The load library must be an authorized library!
The program was designed to read card format input from SYSIN containing the commands to assign to the console Program Function Keys. The format of the card image is documented in the source of the program:
INPUT RECORD FORMAT:
Column Function
1 - 2 CONSOLE ID
3 - 4 PFK #
5 PFK CONTROL
BLANK = NULL PFK ENTRY
N = NON CONVERSATIONAL
Y = CONVERSATIONAL
7 - 71 THE COMMAND AS IT WOULD BE ISSUED AND, IF
MULTIPLE, SEPARATED WITH A SEMICOLON. ALSO
UNDERSCORE ALLOWED (TAKES A POSITION).
72 CONTINUATION COLUMN IF COMMAND(S) REQUIRE
ADDITIONAL SPACE ON ANOTHER CARD.
CARD # 2 (CONTINUATION) -
16-55 CONTINUATION OF COMMAND IF PREVIOUS CARD
IS NONBLANK IN COL 72.
NOTE :
1) MAXIMUM LENGTH OF ALL COMMANDS, INCLUDING SPECIAL
CHARACTERS AND BLANKS, IS 105 CHARACTERS.
My change allowing comments adds the capability of inserting comments anywhere in the input by placing an asterisk (*) in column one of the card. The entire card is simply ignored and the next record will be read from SYSIN.
There are several ways this program may be used, the simplest being to manually submit a jobstream whenever you IPL MVS 3.8j. But you can easily automate the entire process by creating a procedure to invoke the program and a couple of parmlib entries. This jobstream will create a new procedure in SYS2.PROCLIB to invoke the SETPFKEY program:
//SETPFKEY JOB (SYS),'CREATE SETPFKEY PROC',CLASS=S //IEBUPDTE EXEC PGM=IEBUPDTE,REGION=1024K,PARM=NEW //SYSUT2 DD DSN=SYS2.PROCLIB,DISP=OLD //SYSPRINT DD SYSOUT=* //SYSIN DD DATA,DLM='><' ./ ADD LIST=ALL,NAME=SETPFKEY //*-------------------------------------------------------------------* //* SET CONSOLE PFKEYS FROM SYS1.PARMLIB MEMBER * //*-------------------------------------------------------------------* //SETPFKEY PROC M= //SETPFKEY EXEC PGM=SETPFKEY //SYSIN DD DSN=SYS1.PARMLIB(SETPFK&M),DISP=SHR ./ ENDUP >< //
If you don't have a SYS2.PROCLIB defined for your system, you can change the job to place the procedure into SYS1.PROCLIB.
The next task is to create an entry in SYS1.PARMLIB with the input for the procedure. This jobstream will do that:
//SETPFKEY JOB (SYS),'CREATE SETPFK00',CLASS=S //IEBUPDTE EXEC PGM=IEBUPDTE,REGION=1024K,PARM=NEW //SYSUT2 DD DSN=SYS1.PARMLIB,DISP=OLD //SYSPRINT DD SYSOUT=* //SYSIN DD * ./ ADD LIST=ALL,NAME=SETPFK00 * ------------------------------------------------------------------- * * PROGRAM FUNCTION KEYS FOR CONSOLE 1 * * ------------------------------------------------------------------- * 0101N D PFK 0102 0103 0104 0105 0106 0107 0108 0109 0110N D U,DASD 0111Y V NET,INACT,ID=CUU0C_0;V NET,ACT,ID=CUU0C_0 0112N K S,DEL=RD,SEG=19,RTME=001,RNUM=19,CON=N;K A,10 * ------------------------------------------------------------------- * * PROGRAM FUNCTION KEYS FOR CONSOLE 2 * * ------------------------------------------------------------------- * 0201N D PFK 0202 0203 0204 0205 0206 0207 0208 0209 0210N D U,DASD 0211Y V NET,INACT,ID=CUU0C_0;V NET,ACT,ID=CUU0C_0 0212N K S,DEL=RD,SEG=19,RTME=001,RNUM=19,CON=N;K A,10 * ------------------------------------------------------------------- * * END OF SETPFK00 MEMBER * * ------------------------------------------------------------------- * ./ ENDUP //
The definitions above are the ones I have initially set up for my system. I have two 3270 consoles, so I included the statements to define the same functions for both consoles. I have also included the lines for keys for which I am not currently defining functions. They will be ignored by the program, but will be there as placeholders for when I need them. Notice that I use "stacked" commands for keys 11 and 12, separated by a semicolon (;). The commands I assign to key 11 will prompt for input from the operator, specified by the inclusion of an underscore (_) in the command text.
At this point, it is possible to invoke the program from the console by using the command:
s setpfkey,m=00
and this is what you would want to do if you decided to change the PFKey assignments at some time other than IPL. You would edit the SYS1.PARMLIB member SETPFK00 (or you could even create additional members with suffixes 01-99), and then issue the command with m= specified to point to the member containing the Program Function Key assignments you want to make.
One more step is required to complete the automation of the setting of the console PFKeys at IPL time. This jobstream creates an automatic command member in SYS1.PARMLIB:
//SETPFKEY JOB (SYS),'CREATE COMMND00',CLASS=S //IEBUPDTE EXEC PGM=IEBUPDTE,REGION=1024K,PARM=NEW //SYSUT2 DD DSN=SYS1.PARMLIB,DISP=OLD //SYSPRINT DD SYSOUT=* //SYSIN DD * ./ ADD LIST=ALL,NAME=COMMND00 COM='SEND 'AUTO COMMANDS IN COMMND00 BEING PROCESSED',CN=01' COM='START SETPFKEY,M=00' ./ ENDUP //
There is an assumption here that you do not already have a SYS1.PARMLIB member COMMND00. If you do, you should not run this job, but instead simply add the START command for SETPFKEY to the COMMND00 member you already have in place. Also, based on the assumption that you do not currently have any automatic commands set up, you need to run this jobstream:
//SETPFKEY JOB (SYS),'ACTIVATE COMMND00',CLASS=S //RENAME EXEC PGM=IEHPROGM //MVSRES DD UNIT=3350,VOL=SER=MVSRES,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSIN DD * RENAME MEMBER=IEASYS00,DSNAME=SYS1.PARMLIB,VOL=3350=MVSRES, C NEWNAME=IEASYS98 /* //IEBUPDTE EXEC PGM=IEBUPDTE,REGION=1024K,PARM=NEW //SYSUT2 DD DSN=SYS1.PARMLIB,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSIN DD * ./ ADD LIST=ALL,NAME=IEASYS00 ./ NUMBER NEW1=100,INCR=10 CMD=00, AUTO COMMANDS: COMMND00 // DD DSN=SYS1.PARMLIB(IEASYS98),DISP=SHR // DD * ./ ENDUP //
This job renames your current IEASYS00 member to IEASYS98 as a backup, then creates a new IEASYS00, prepending the CMD=00 line to it to specify that automatic commands are to be run at IPL time from the member COMMND00 of SYS1.PARMLIB. If you prefer, you can simply edit IEASYS00 under TSO and add the command. Please remember that the processing of IEASYS00 stops when a line is read that is not terminated with a comma (,).
Once you have completed all these steps, your console Program Function Keys will be set automatically whenever you IPL.
I hope that you have found my instructions useful. If you have questions that I can answer to help expand upon my explanations and examples shown here, please don't hesitate to send them to me:
This page was last updated on January 17, 2015 .