ISPCMDU - Dynamic update of the ISPF command Table Preface A dataset / member containing a list of ISPF command table entries are read and applied to an in-storage command table. You may run ISPCMDU as many times as you need, as each invocation just updates what is already in there. Using program ISPCMDU you can add, replace or delete entries in an in-storage command table, default is ISPCMDS, giving the user the following immediate benefits: - The default IBM supplied command table(s) remains unchanged. - Changes are active immediately. - You can modify the command table at logon time and/or whenever you choose. ISPCMDU can run as an edit macro, allowing for immediate command table updates. Background The ISPF command table is a very convenient place to store user defined command shorthands for ISPF or TSO commands. Many people would customize the ISPF command table to suit their personal preferences. The main drawback is, and has always been, the maintenance issue. If you start by distributing a copy of the IBM supplied command table and let each user update his or her local copy, you have a major problem distributing updates to the vendor supplied part of the table. With the later releases of Z/OS you have the possibility of having multiple ISPF command tables, which goes a long way to solve this problem, but it requires an update to the ISPF configuration. A minor nuisance is that each update requires the user to restart the ISPF session. A lot of effort has gone into trying to solve the first problem, without much success. And the second problem has, until now, remained unsolved. ISPCMDU attepmpts to solve both issues. It relies on the fact that the ISPF command table is just that - an ISPF table, although with a reserved name and specific purpose. But as it is just a table it can be treated as any other ISPF table - it is open, in storage and modifiable. And it is shared between all the open screens. Syntax Call ISPCMDU ['parameters'] REXX Address TSO "%ISPCMDU [parameters]" REXX ISPCMDU [parameters] CLIST TSO ISPCMDU [parameters] ISPF command line ISPCMDU ISPF edit Parameters DA(dsn(mbr)) Both dataset- and membername are optional, but member must be in paranthesis if specified without the dsname. Default member name is 'ISPCOMND'. 'dsn' can be given as PARMLIB which causes a scan through the parmlib concatenation, as ISPPROF to use the ISPPROF dataset, or no dsn to scan the ISPPROF dataset followed by the parmlib concatenation. DA(-STACK-) Load records from TSO stack. ID(id) set 'desc' field to id. Note that the desc field will in any case be prefixed by '' (User Command List). LIST[(name)] Do the list function, if specified then all other parameters except ML is ignored. name is the table name minus 'CMDS', i.e. ISP. ML(n) Message level, shows process messages if gt 0. Current range is 0-3, default is 0. QUIET Do not show confirmation and statistics. 'Missing dataset or member' messages are not displayed either. SYSTBL(name) Name of ISPF command table, default is ISPCMDS. SYSVARS Activate translation of variables in the action field. These are SYSPREF, SYSUID, SYSNODE or one of the static or dynamic system symbols. i.e. \hithere\0\select cmd(%echo sys: &sysname) Be aware that the substitution is done at load time. TSOMSG Write message to TSO terminal instead of issuing an ISPF messages. Negates the QUIET option, if set. Returns 0 All ok >0 Some error, message shown Usage Have your start-up proc do all the allocations, then end by IspStart cmd(%ISPCMDUX) ISPCMDUX could look like this: /* ISPF start - phase 2 - command table updates REXX */ Call IspCmdU 'DA(PARMLIB)' /* site */ Call IspCmdU 'DA(ISPPROF)' /* user */ Address IspExec "Select PANEL(ISR@PRIM)" Exit 4 /* 4 is required to avoid list-delete prompt */ That way the updates are done automatically at logon time. If you want to start multiple screens then look at the ZSTART profile variable, ZSTART sample: ISPF;START 3.4;START 6;SWAP 1;TSO %ISPCMDU ISPCMDU command file details. The first character is a delimiter. Any character except '-' and '*' may be used, as '-' defines deletion of the command and '*' defines a comment. It obviously cannot be one that is part of the command itself. In the following a slash '/' is used as the delimiter. Lines where the first blank-delimited string (word) is "/*" are also comment lines. Blank lines are ignored. The command line format for adding or updating a commands is: /verb/truncation/action/description/ 'Verb' is what you write on the command line, 'truncation,' is the least number of characters to enter (0=no truncation allowed, and it must be >= 2), 'action' is what you wish ISPF to do for you and 'description' is an optional description of the command. The text will in any case be added at the front of the description. The format for deleting commands is: -verb Samples /SDST/0/SELECT PGM(ISFISP) NEWAPPL(ISF) PARM(ST)/SDSF ST /RACF/2/SELECT PANEL(ICHP00) NEWAPPL(RACF)/RACF Admin Panels -SAYWHO Implementing ISPCMDU To really make it fly, you must invoke ISPCMDU at ISPF start time. ISPCMDU only works after ISPF has been initialized, so you must do it like so... Add this REXX pgm as name RUNISPF2, it combines global and local ISPCMDU definitions using default membername ISPCOMND. /* ISPF start - phase 2 - command table updates REXX */ Call IspCmdU 'DA(PARMLIB) quiet' /* site */ Call IspCmdU 'DA(ISPPROF) quiet' /* user */ Address IspExec "Select PANEL(ISR@PRIM)" Exit 4 /* 4 is required to avoid list-delete prompt */ Replace the normal ISPF initialization command, 'PDF' or 'ISPSTART' with the following: Pdf cmd(%RUNISPF2) You can also put it in the ZSTART profile variable, i.e. ISPF;START 3.4;START 6;SWAP 1;TSO %RUNISPF2 If you wish to make changes later, just edit a command file and issue the command ISPCMDU. It will automatically detect that is is being run as an edit macro and load the comnands from the file being edited. And you don't even have to save it before running ISPCMDU. Contact Willy Jensen mail: willy@harders-jensen.com web : http://harders-jensen.com