Progress0 of 0 lessons

Tailoring the Primary Option Menu and Adding Product Options

Tailoring the ISPF Primary Option Menu allows you to customize your ISPF environment by adding, removing, or modifying menu options. You can add product options that provide quick access to applications, utilities, or custom functions. Understanding menu tailoring helps you create a personalized ISPF environment. This tutorial covers tailoring the Primary Option Menu, adding product options, menu customization techniques, and best practices.

The Primary Option Menu is the main entry point to ISPF, and customizing it can significantly improve your productivity. By adding frequently used options and products, you can streamline your workflow. Learning menu tailoring enables you to create an ISPF environment tailored to your needs. This tutorial provides practical guidance for menu customization.

Understanding the Primary Option Menu

The Primary Option Menu is ISPF's main navigation interface.

What is the Primary Option Menu?

The Primary Option Menu:

  • Is the main ISPF entry point
  • Displays available options
  • Is defined in ISR@PRIM panel
  • Can be customized
  • Provides access to ISPF functions

Standard Menu Options

Standard options include:

  • 0: Settings
  • 1: View
  • 2: Edit
  • 3: Utilities
  • 4: Foreground
  • 5: Batch
  • 6: Command
  • 7: Dialog Test
  • 8: LM Facility
  • Other product-specific options

Primary Option Menu Structure

The menu is defined as an ISPF panel.

ISR@PRIM Panel

The Primary Option Menu is defined in:

  • Panel member: ISR@PRIM
  • Panel library: ISPPLIB
  • Contains menu layout and logic
  • Can be edited to customize

Panel Structure

The ISR@PRIM panel includes:

  • )BODY: Menu layout and option display
  • )PROC: Option selection handling
  • )INIT: Initialization logic
  • Standard panel sections

Tailoring the Menu

Menu tailoring involves editing the ISR@PRIM panel.

Accessing ISR@PRIM

To tailor the menu:

  • Use ISPF Edit
  • Open panel library (ISPPLIB)
  • Edit ISR@PRIM member
  • Or create user-specific version

Modifying Menu Options

To modify options:

  • Edit )BODY section for menu display
  • Edit )PROC section for option handling
  • Add, remove, or change options
  • Update option descriptions

Example Menu Modification

Example of adding an option:

text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
)BODY %------------------------ ISPF PRIMARY OPTION MENU ------------------------ %OPTION ===>_ZCMD % % 0 Settings % 1 View % 2 Edit % 3 Utilities % 4 Foreground % 5 Batch % 6 Command % 7 Dialog Test % 8 LM Facility % 9 My Custom Option )PROC &ZSEL = TRANS(&ZCMD 0,'PANEL(ISR@SETT)' 1,'PANEL(ISR@VIEW)' 2,'PANEL(ISR@EDIT)' 3,'PANEL(ISR@UTIL)' 4,'PANEL(ISR@FOREG)' 5,'PANEL(ISR@BATCH)' 6,'CMD(%ISR@CMD)' 7,'PANEL(ISR@DIAL)' 8,'PANEL(ISR@LM)' 9,'PANEL(MYCUSTOM)' ' ',' ' *,'?') )END

This shows adding option 9 to the menu with corresponding logic in )PROC.

Adding Product Options

Product options provide access to specific products or applications.

What are Product Options?

Product options are:

  • Menu options for specific products
  • Quick access to applications
  • Customized menu entries
  • Integrated into ISPF menu

Adding a Product Option

To add a product option:

  • Edit ISR@PRIM panel
  • Add option line in )BODY
  • Add handling logic in )PROC
  • Define what the option does
  • Save the panel

Product Option Actions

Product options can:

  • Display a panel
  • Execute a REXX script
  • Run a CLIST
  • Invoke a command
  • Call another menu

Example product option that calls REXX:

text
1
2
3
4
5
6
7
)PROC &ZSEL = TRANS(&ZCMD ... 9,'CMD(REXX USERID.REXX(MYPROD))' ... *,'?') )END

Menu Customization Techniques

Various techniques for menu customization.

User-Specific Customization

For personal customization:

  • Create user-specific panel library
  • Allocate library to ISPPLIB
  • Create ISR@PRIM in user library
  • User library searched first
  • Does not affect other users

Modifying Option Descriptions

To modify descriptions:

  • Edit option text in )BODY
  • Change option labels
  • Update descriptions
  • Maintain clarity

Reordering Options

To reorder options:

  • Rearrange option lines in )BODY
  • Update )PROC logic accordingly
  • Maintain option numbers or change them
  • Test menu functionality

Menu Option Handling

Option handling logic in )PROC section.

TRANS Function

The TRANS function maps options to actions:

  • Maps option number to action
  • Sets .ZSEL variable
  • Defines what happens for each option
  • Handles invalid options

Example TRANS usage:

text
1
2
3
4
5
6
7
8
9
)PROC &ZSEL = TRANS(&ZCMD 0,'PANEL(ISR@SETT)' 1,'PANEL(ISR@VIEW)' 2,'PANEL(ISR@EDIT)' 9,'PANEL(MYCUSTOM)' ' ',' ' *,'?') )END

Option Actions

Common option actions:

  • PANEL(name): Display a panel
  • CMD(command): Execute a command
  • ' ': No action (blank)
  • '?': Show help or error

Best Practices

Following best practices ensures successful menu customization:

  • Backup Original: Backup original ISR@PRIM before modifying
  • Use User Libraries: Use user-specific libraries when possible
  • Test Thoroughly: Test all menu options after changes
  • Document Changes: Document customizations made
  • Follow Conventions: Follow ISPF naming conventions
  • Maintain Compatibility: Ensure changes don't break existing functionality
  • Use Meaningful Names: Use descriptive option names
  • Handle Errors: Provide error handling for invalid options

Explain Like I'm 5: Tailoring the Menu

Think of tailoring the menu like customizing a restaurant menu:

  • Primary Option Menu is like a restaurant menu that shows all the dishes (options) you can order. It lists everything available, and you pick what you want. It's like having a menu at a restaurant with all the food options!
  • Tailoring is like customizing the restaurant menu. You can add your favorite dishes, remove ones you don't like, change the descriptions, or rearrange the order. It's like having a personal menu that shows exactly what you want!
  • Adding Options is like adding new dishes to the menu. You write down a new dish name and description, and when someone orders it, the kitchen knows what to make. It's like adding "My Special Pizza" to the menu and telling the kitchen how to make it!
  • Product Options are like special dishes from a specific chef or brand. You add them to the menu so people can easily order them. It's like adding a special section for "Chef's Specials" on the menu!
  • Menu Logic is like the instructions for the kitchen. When someone orders option 9, the instructions tell the kitchen what to do - maybe make a special dish or call a specific chef. It's like having a recipe book that tells the kitchen what to do for each order!

So tailoring the menu is like customizing a restaurant menu to show exactly what you want, with instructions for what happens when someone orders each item!

Practice Exercises

Complete these exercises to reinforce your menu tailoring skills:

Exercise 1: View ISR@PRIM

Practice viewing: view the ISR@PRIM panel, understand its structure, review option definitions, and learn menu structure. Master menu structure understanding.

Exercise 2: Add Simple Option

Practice adding: add a simple option to the menu, add handling logic, test the option, and learn basic option addition. Master basic option addition.

Exercise 3: Add Product Option

Practice product: add a product option that calls a REXX script, understand product options, test product access, and learn product options. Master product options.

Exercise 4: User-Specific Menu

Practice user: create user-specific menu version, use user panel library, customize for personal use, and learn user customization. Master user customization.

Exercise 5: Complete Customization

Practice complete: perform complete menu customization, add multiple options, reorganize menu, test all options, and learn complete customization. Master menu customization.

Test Your Knowledge

1. What panel typically defines the Primary Option Menu?

  • ISR@MAIN
  • ISR@PRIM
  • ISR@MENU
  • ISR@OPTION

2. Where is the Primary Option Menu panel stored?

  • ISPMLIB
  • ISPPLIB
  • ISPSLIB
  • ISPTLIB

3. How do you add a new menu option?

  • Edit ISR@PRIM panel
  • Edit ISPF settings
  • Use command line only
  • Cannot be customized

4. Can you customize the menu for personal use?

  • No, affects all users
  • Yes, using user-specific panel library
  • Only system administrators
  • Only in test environment

5. What section handles option selection logic?

  • )BODY
  • )ATTR
  • )PROC
  • )INIT

Related Concepts