Progress0 of 0 lessons

Creating ISPF Panels and Dialog Definitions: Panel Development Basics

Creating ISPF panels and dialog definitions enables you to build custom user interfaces for mainframe applications. ISPF panels provide interactive screens for data entry, information display, and user interaction. Understanding panel development helps you create professional ISPF applications. This tutorial covers panel definition structure, creating panels, dialog definitions, panel development basics, and best practices.

ISPF panels are defined using panel definition language with specific sections for layout, attributes, initialization, and processing. Panels are stored in panel libraries and can be displayed from REXX scripts, CLISTs, or other ISPF applications. Learning panel development enables you to create sophisticated user interfaces. This tutorial provides practical guidance for panel development.

Understanding ISPF Panels

ISPF panels are screen definitions for user interaction.

What are ISPF Panels?

ISPF panels are:

  • Screen definitions for user interfaces
  • Stored as members in panel libraries
  • Defined using panel definition language
  • Displayed through ISPF services
  • Used for data entry and information display

Panel Libraries

Panels are stored in:

  • Panel libraries (typically ISPPLIB)
  • Partitioned datasets (PDS or PDSE)
  • One panel per member
  • Libraries allocated to ISPF session

Panel Definition Structure

ISPF panels consist of several definition sections.

Basic Panel Structure

A basic panel includes:

  • )BODY: Panel layout and content
  • )ATTR: Field attributes
  • )INIT: Initialization logic
  • )PROC: Processing logic
  • )END: End of panel definition

Example Panel Structure

Basic panel example:

text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
)ATTR @ TYPE(INPUT) INTENS(HIGH) # TYPE(TEXT) INTENS(HIGH) )BODY %------------------- Sample Panel ------------------- % %Enter your name: @ZUSER % %Press Enter to continue or PF3 to exit )INIT .ZVARS = 'ZUSER' )PROC IF (&ZUSER = '') + .MSG = 'Please enter your name' ELSE + .MSG = 'Hello, &ZUSER!' )END

The )BODY Section

The )BODY section defines panel layout and content.

BODY Content

The )BODY section contains:

  • Panel text and labels
  • Attribute characters marking fields
  • Layout and formatting
  • User-visible content

Attribute Characters in BODY

Attribute characters mark:

  • Input fields (user can type)
  • Output fields (display only)
  • Text areas
  • Special elements

BODY Layout

BODY layout considerations:

  • Screen dimensions (typically 24x80)
  • Text positioning
  • Field placement
  • Visual organization

The )ATTR Section

The )ATTR section defines field attributes.

Attribute Definitions

Attributes define:

  • Field type (INPUT, OUTPUT, TEXT)
  • Intensity (HIGH, LOW)
  • Justification (LEFT, RIGHT, CENTER)
  • Color and highlighting
  • Other display properties

Common Attribute Types

Common attribute types:

  • TYPE(INPUT): User input field
  • TYPE(OUTPUT): Display-only field
  • TYPE(TEXT): Text area
  • INTENS(HIGH): High intensity (bright)
  • INTENS(LOW): Low intensity (dim)

Example attribute definitions:

text
1
2
3
4
5
)ATTR @ TYPE(INPUT) INTENS(HIGH) CAPS(ON) # TYPE(OUTPUT) INTENS(HIGH) $ TYPE(TEXT) INTENS(LOW) % TYPE(TEXT) INTENS(HIGH) SKIP(ON)

The )INIT Section

The )INIT section initializes panel variables.

INIT Purpose

The )INIT section:

  • Sets default values
  • Initializes variables
  • Prepares panel for display
  • Runs before panel is shown

INIT Examples

Common INIT operations:

  • Setting default field values
  • Initializing variable lists
  • Setting panel options
  • Preparing data for display

Example INIT:

text
1
2
3
4
5
)INIT .ZVARS = 'ZUSER ZPREFIX' &ZUSER = 'DEFAULT' .HELP = PANEL01 .CURSOR = ZUSER

The )PROC Section

The )PROC section contains processing logic.

PROC Purpose

The )PROC section:

  • Processes user input
  • Validates data
  • Controls panel flow
  • Executes logic
  • Determines next action

PROC Logic

PROC can include:

  • IF/THEN/ELSE statements
  • Variable assignments
  • Panel navigation
  • Command execution
  • Error handling

Example PROC:

text
1
2
3
4
5
6
7
8
9
10
)PROC IF (&ZCMD = '') + .MSG = 'Please enter a command' IF (&ZCMD = '1') + .ZSEL = 'PANEL(OPTION1)' IF (&ZCMD = '2') + .ZSEL = 'PANEL(OPTION2)' IF (&ZCMD = 'X') + .ZSEL = 'EXIT' )END

Creating a Panel

Step-by-step panel creation process.

Step 1: Access Panel Library

To create a panel:

  • Use ISPF Edit
  • Open panel library (ISPPLIB)
  • Create new member
  • Or edit existing panel

Step 2: Write Panel Definition

Write panel sections:

  • Start with )ATTR section
  • Define )BODY section
  • Add )INIT if needed
  • Add )PROC for logic
  • End with )END

Step 3: Save Panel

Save the panel:

  • Save the member
  • Verify panel syntax
  • Check for errors
  • Panel is ready to use

Dialog Definitions

Dialog definitions coordinate multiple panels.

What are Dialogs?

Dialogs are:

  • Collections of related panels
  • Coordinated panel flows
  • Complete user interfaces
  • Managed by REXX or CLIST

Dialog Structure

Dialogs typically include:

  • Main menu panel
  • Input panels
  • Display panels
  • Confirmation panels
  • Control logic (REXX/CLIST)

Panel Testing

Testing panels ensures they work correctly.

Dialog Test

ISPF Option 7 (Dialog Test):

  • Displays panels without full application
  • Tests panel layout
  • Verifies basic functionality
  • Useful for development

Testing Process

To test a panel:

  • Use Dialog Test (Option 7)
  • Enter panel name
  • Review panel display
  • Test input fields
  • Verify processing logic

Best Practices

Following best practices improves panel quality:

  • Use Clear Layouts: Organize panels clearly
  • Provide Help: Include help panels
  • Validate Input: Validate user input in PROC
  • Use Meaningful Names: Use descriptive panel and variable names
  • Test Thoroughly: Test panels before use
  • Document Panels: Document panel purpose and usage
  • Handle Errors: Provide error messages
  • Follow Conventions: Follow ISPF naming and structure conventions

Explain Like I'm 5: Creating ISPF Panels

Think of creating ISPF panels like designing a form:

  • ISPF Panels are like forms you design for people to fill out. You decide what questions to ask, where to put them, and what the form should look like. It's like designing a questionnaire or application form!
  • )BODY Section is like the actual form paper. You write the questions, labels, and decide where everything goes on the page. It's like writing out your form with all the questions and spaces for answers!
  • )ATTR Section is like deciding how the form should look. You decide which spaces are for writing (input fields), which are just for showing information (output fields), and how bright or dim things should be. It's like choosing the style and appearance of your form!
  • )PROC Section is like the instructions for what to do with the form. When someone fills it out, you check if they answered everything, if the answers are correct, and what to do next. It's like having rules for checking and processing the form!
  • Creating a Panel is like making your form. You write down all the questions (BODY), decide how it looks (ATTR), set up default answers (INIT), and write the checking rules (PROC). Then you save it and people can use it. It's like creating a complete form that others can fill out!

So creating ISPF panels is like designing and building forms that the computer can show to users, collect their answers, and process the information!

Practice Exercises

Complete these exercises to reinforce your panel development skills:

Exercise 1: Create Simple Panel

Practice basics: create a simple panel with BODY and ATTR sections, understand panel structure, test the panel, and learn basic panel creation. Master basic panel creation.

Exercise 2: Add Input Field

Practice input: add input field to panel, define attribute for input, test input functionality, and learn input fields. Master input fields.

Exercise 3: Add INIT Section

Practice init: add INIT section to panel, initialize variables, set default values, test initialization, and learn INIT section. Master initialization.

Exercise 4: Add PROC Section

Practice proc: add PROC section to panel, add processing logic, validate input, test processing, and learn PROC section. Master processing logic.

Exercise 5: Complete Dialog

Practice dialog: create complete dialog with multiple panels, coordinate panel flow, test full dialog, and learn dialog development. Master dialog creation.

Test Your Knowledge

1. What section defines panel layout and content?

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

2. What section defines field attributes?

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

3. What section contains processing logic?

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

4. How do you test an ISPF panel?

  • Option 1 Browse
  • Option 2 Edit
  • Option 7 Dialog Test
  • Option 3 Utilities

5. Where are ISPF panels typically stored?

  • In ISPPLIB
  • In ISPMLIB
  • In ISPSLIB
  • In any PDS

Related Concepts