Posted: Fri Aug 01, 2014 8:30 am Post subject: ISPF KEYLIST ?
To use PFKeys in a panel I used to just override them with code in the REXX program that displays the panel by hard-setting them to whatever value I wanted, and then resetting them when the program ends; however recently, since we went to z/OS 2.1 my PFkeys stopped working and I had to modify how I use them. For some reason using ZPFKEY no longer worked, so I made some changes and now use just PFKEY...yes, it's true, I barely have an idea what I'm doing. In the process, as I read numerous googled pages, I read that it's "bad" to do it that way, since the program is then overlaying a user's pfkeys, which they can change anytime they want from the command line, at which point the keys would no longer work in my panel. The experts recommended panels should use KEYLISTs.
Meanwhile, for a few days, I couldn't understand why my PFK5 would just "randomly" (and very annoyingly) change from RFIND to END...oh yes! I am my own worst enemy!...until while trying to fix my PFKeys problem in my rexx program I found code that was setting it to END...Why, you ask? I have no idea. The code's been like this for years but never been a problem. But only recently it's reared its ugly head; I think due to z/OS 2.1.
Accordingly I'm trying to learn how to use KEYLISTs and am having some difficulty.
I wanted to use a KEYLIST in my panel, so I added the KEYLIST clause to my panel as follows:
From what I read you must have an ISPF Table entry for a KEYLIST, so I then created an entry named MYKEYS (note that I removed the error trapping logic to make the following easier to read):
But my panel didn't display the correct PFKeys, so I kept reading until I saw that I'm supposed to create a KEYLIST from the =SETTINGS menu or from DTL.
Since I don't know DTL I created MYKEYS from =SETTINGS (enter =SETTINGS, put cursor on the Action Bar item named Function Keys, enter 2, enter N to create a new list, which I named MYKEYS). I defined a few keys in MYKEYS.
Code:
ISPKLUB ISR Keylist MYKEYS View Row 1 to 14 of 24
Command ===> Scroll ===> CSR
And everything works great...for me... The problem is that this is a panel also used by other people and they don't have MYKEYS defined. I can find the ISPF Table MYKEYS I created in my 'userid.ISPTABL' PDS; however I cannot find where the MYKEYS that I created in the SETTINGS panel resides.
I attempted to read the DTL manual and have gotten lost...it's a lot to absorb.
The manual says I should code something like this, but I don't understand how to turn this into something that my panel can "see".
Questions:
1. Where is the MYKEYS I created in the SETTINGS panel stored?
2. How can I copy it to a common area that other users can access?
3. Does anyone have an example of coding PFKeys using DTL and clear instructions on how to get them into my panel?
4. Does my entire panel have to be coded in DTL? I've never used DTL before; all my panels are done the "old" way.
5. Do I need to generate/compile the DTL?
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Fri Aug 01, 2014 11:48 am Post subject: Re: ISPF KEYLIST ?
RoyKMathur wrote:
Questions:
1. Where is the MYKEYS I created in the SETTINGS panel stored?
2. How can I copy it to a common area that other users can access?
3. Does anyone have an example of coding PFKeys using DTL and clear instructions on how to get them into my panel?
4. Does my entire panel have to be coded in DTL? I've never used DTL before; all my panels are done the "old" way.
5. Do I need to generate/compile the DTL?
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
Posted: Tue Mar 20, 2018 4:28 am Post subject:
I'm going to jump into this topic after a number of years and agree with Roy; it's not at ALL obvious what to do once you've defined your keylist settings (via ISPF start panel, Menu pulldown, option 1 (Settings), then Function Keys pulldown and option 2 Keylist settings).
I created a keylist called MICKMICK (which I know won't exist since earlier). This was created as a private keylist. I then wanted to copy it to my ISPTLIB library so I could run a simple Rexx script and allocate it and then check another user could "find it". Trouble is, I couldn't find it anywhere. I tried doing a TSO ISRDDN and then an m mickmick but the program said it couldn't find it.
I have read the link Kolusu referred to, but nothing that I could see indicated what to do to make MY keylist a shared one. I added the following to my panel
and running the script that drives the panel, I could see that MICKMICK was being used.
What's interesting is that because I want to do this, I've googled till the cows came home, but I can't find anything that shows a "start with this, do this, do that and finally do this and you're home and dry". _________________ Michael
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
Posted: Tue Mar 20, 2018 10:56 am Post subject:
After a fair bit of experimentation, I finally managed to define a keylist and ensure it was available to other users.
Kolusu - FWIW, I have written a short word document outlining what is needed but am not sure how to attach it. If it can't be attached, anyone who would like a copy, feel free to send me a private message and I'll send it. _________________ Michael
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Tue Mar 20, 2018 11:01 am Post subject:
misi01,
Private copies of Keylists are created using the Keylist Utility (Command = KEYLIST)
•The resulting keylists are stored in xxxxPROF member in users ISPF profile in DD ISPPROF
•The private keylists for application Id ISP are stored in ISPSPROF member in users ISPF profile.
misi01 wrote:
kolusu - FWIW, I have written a short word document outlining what is needed but am not sure how to attach it. If it can't be attached, anyone who would like a copy, feel free to send me a private message and I'll send it.
Thanks much. You can include the contents using code/quote tags. It does not matter how big the document is. So please post it inline. or send me the file via email and I will have uploaded it on the server and can have a link to it. _________________ Kolusu
www.linkedin.com/in/kolusu
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
Posted: Wed Mar 28, 2018 1:58 pm Post subject:
I've sent you a private message to your Google account with the documentation I've written.
Anyone who uses it ....
Please add comments to this thread explaining what was wrong, easier/shorter ways of doing something, basically, any improvements to the actual documentation will be appreciated. _________________ Michael
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Wed Mar 28, 2018 4:05 pm Post subject:
misi01 wrote:
I've sent you a private message to your Google account with the documentation I've written.
Thanks and here is the formatted guide that misi has sent.
Michael Simpson aka misi01's Guide for ISPF KeyList
This is based on my experience/attempts to create a keylist for an ISPF application. This consisted of a load of information that had been divided between two panels. I wanted a keylist to avoid the existing kludgy solution whereby the user would be forced to change an input field indicating whether they wanted to see the second panel or not. Instead, I wanted them to be able to press PF7/PF8 to “scroll†between the panels.
There is a wealth of information out there, but I couldn’t find anything that led you all the way from A to Z such that you ended up with a panel with your PF keys and where the defined keys were available for other users as well. Okay, here we go (remembering, this is how I solved my problem)..
So here the are the 3 basic steps that you would need to create a SHARED KEYLIST
1. Defining your DTL
2. Compiling/generating your DTL
3. Tying the keylist to your panel
1. Defining your DTL
There are lots of examples on how to define PFkeys in a keylist setting, but once you’ve done that, the first problem you hit is that the settings are private and I couldn’t find anything that indicated how to copy them somewhere accessible for all users. So, you need to define a DTL for your panel. Here’s my example (note that I’ve deliberately given the keylist and the application different “stupid†names so that it’s easy to understand where the different values/parameters used later come from).
Start by ensuring you have a PDS called ‘userid.private.GML’, DCB’s are LRECL 80 and RECFM FM. Create a member called MICKMICK with the following entries:-
1. Doctype is preceded by a : (colon). All the documentation shows a ! (exclamation mark), but this never compiled on our machines, possibly/probably because we’re a Swedish installation.
2. The keyL tag contains the L as upper-case simply to avoid mistaking it for a 1 (this is not necessary but makes life easier)
3. The name parameter for the starting keyl is mickmick and the application name is abcd
4. The only keys I’m interested in on my panel are PF1, PF3, PF7, PF8 and PF12
5. Using this technique, be aware that when you swap between panels, the value shown for the cmd parameter (Next for F8) will be mirrored in any command field you’ve defined for your panel. For this reason, you might well want to set ZCMD to blank on returning from any of your panels
2. Compiling/generating your DTL
You would need the following datasets. So have them defined and the DCB properties of the datasets that we would need
Code:
Menu Options View Utilities Compilers Help
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
Command - Enter "/" to select action Dsorg Recfm Lrecl Blksz
-------------------------------------------------------------------------------
USERID.PRIVATE.GML PO FB 80 27920
USERID.PRIVATE.ISPTLIB PO FB 80 27920
USERID.PRIVATE.LIST PO FB 80 27920
USERID.PRIVATE.PANELS PO FB 80 27920
From the command line, enter the command tso ispdtlc and you should see a screen similar to the following:-
Code:
EsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssN
e Menu Utilities Commands Language Options Help e
e ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss e
e ISPF Dialog Tag Language Conversion Utility - 7.2 e
e Command ===> e
e e
e Click here: Go to DTL input names 5-16 Reset DTL input names 2-16 e
e Enter requested information: Current Language: ENGLISH e
e More: + e
e Member name . . . . . . . . (Blank or pattern for member list) e
e DTL Source data set - 1 . . 'USERID.PRIVATE.GML' e
e DTL Source data set - 2 . . e
e DTL Source data set - 3 . . e
e DTL Source data set - 4 . . e
e Panel data set . . . . . . 'USERID.PRIVATE.PANELS' e
e Message data set . . . . . DUMMY e
e Log data set . . . . . . . e
e Log File Member name . . (Required when log file is a PDS) e
e List data set . . . . . . . 'USERID.PRIVATE.LIST' e
e List File Member name . . * (Required when list file is a PDS) e
e SCRIPT data set . . . . . . e
e Tables data set . . . . . . 'USERID.PRIVATE.ISPTLIB' e
e Keylist Application ID . . (Up to 4 characters) e
DsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssM
Scrolling forward:-
Code:
Enter "/" to select option
/ Replace Panel/Message/Script/Keylist/Command Members
/ Preprocess Panel Output
Place ISPDTLC Messages in log file
Suppress Messages (ISPDTLC formatting)
Suppress Messages (CUA exceptions)
/ Use CUA Panel Attributes
/ Generate Statistics on Panel/Message/Script Members
Generate List file
Generate List file with ENTITY substitution
Generate Script file
/ Replace Log File Members
And forward again
Code:
Enter "/" to select option
/ Replace Panel/Message/Script/Keylist/Command Members
/ Preprocess Panel Output
Place ISPDTLC Messages in log file
Suppress Messages (ISPDTLC formatting)
Suppress Messages (CUA exceptions)
/ Use CUA Panel Attributes
/ Generate Statistics on Panel/Message/Script Members
Generate List file
Generate List file with ENTITY substitution
Generate Script file
/ Replace Log File Members
/ Replace List File Members
And forward again
Code:
More: -
Display converted panels in a window
Bypass data set name validation (after first cycle)
/ Enable graphic character display
Use field names in place of Z variables
Align DBCS prompt text with entry field
Preserve leading ENTITY blanks when "space" is not specified
Process multiple line comment blocks
Scroll member list to last selected member
Generate accessible character string
Display additional DTL source data set list
Menu Functions Utilities Help
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
MEMBER LIST USERID.PRIVATE.GML Row 0000001 of 0000001
Command ===> Scroll ===> CSR
Name Prompt Size Created Changed ID
. MICKMICK 8 2018/03/28 2018/03/28 12:48:20 USERID
**End**
EssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssN
e Select members to be converted. (Enter "S *" to select all members.) e
DssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssM
Code:
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
MEMBER LIST USERID.PRIVATE.GML Row 0000001 of 0000001
Command ===> Scroll ===> CSR
Name Prompt Size Created Changed ID
S MICKMICK 8 2018/03/28 2018/03/28 12:48:20 USERID
**End**
EsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssN
e Select members to be converted or END to start conversion processing. e
DsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssM
PF3 to continue processing the member and you will get something similar to this
Code:
ISPDTLC ISPF 7.2 Dialog Tag Language Conversion Utility
Converting source file "USERID.PRIVATE.GML(MICKMICK)"...
ISPC150W: Warning. Line 5 of file "USERID.PRIVATE.GML(MICKMICK)". When
"CMD=END", "KEY=F3" on the KEYI tag does not conform to the CUA Architecture
definition and will therefore not be CUA compliant.
ISPC150W: Warning. Line 8 of file "USERID.PRIVATE.GML(MICKMICK)". When
"CMD=CONFIRM", "KEY=F12" on the KEYI tag does not conform to the CUA
Architecture definition and will therefore not be CUA compliant.
2 warning(s) and 0 error(s) found.
***
Now, assuming you only received warnings, the “compiled†DTL code will have been placed in ‘USERID.private.isptlib’ (from the ISPDTLC panel earlier). If you do a browse/view on the member ABCDKEYS (from the DTL tag KEYL earlier) you should see something similar to the following:-
Code:
Menu Functions Confirm Utilities Help
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
BROWSE USERID.PRIVATE.ISPTLIB Row 0000001 of 0000001
Command ===> Scroll ===> CSR
Name Prompt Size Created Changed ID
_________ ABCDKEYS
**End**
If you browse the member and do a search for MICKMICK you will find the keylist
/* Pay attention to the panel statement and see how */
/* the keylist and application tie together. */
Finally, on the assumption that you’re not allowed/don’t want to place your panels/keylists in some general ISPF PDS, you will need to allocate them prior to showing the actual panel. In my case, my starting panel was called AVV000 and the Rexx script driving it was AVV00010. This contained the following at the start of the script:-
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
Posted: Fri Jun 29, 2018 1:52 am Post subject: PF1 key
I got hit by this the other day.
Following my own instructions, I created a new keylist, but I thought to myself "I'm not writing any help panels for this new panel, so I don't need to define the PF1 key, so I'll get rid of it".
Said and done, until .....
I define all my messages along the lines of
Code:
invalid_policy_number:
zedsmsg = "Invalid number"
zedlmsg = "Policy number must be numeric"
rc = ISPFMSG()
return 0
the idea being that ISPF will show the short message. If you want a "better" explanation of what's wrong, you press the "standard" PF1 key to get the long message.
Oh, wait a minute, my keylist doesn't include PF1 as a valid PF key !!!
Summa summarum - always include the PF1 key in your keylists. _________________ Michael
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum