IBM Support

Write Your First Mainframe App Using ISPF - Part 2 What Data Sets Do You Need?

Question & Answer


Question

Where are the parts of an application stored? What data sets do I need to write an ISPF application? How do I create the data sets I need?

Answer

On z/OS, files are generally called data sets.  There are many different types of data sets, but ISPF mainly uses:

  • Sequential data set - a file that is read from start to finish
  • Partitioned data set (often called PDS or PDSE) - a file that is partitioned into members, each of which acts as a sequential data set. A partitioned data set groups files together. ISPF makes extensive use of partitioned data sets to store application elements. For example, you can have one PDS to store your panels, and a different one to store your messages. These data sets are called ISPF libraries.

Data sets can be grouped and identified by ddnames (data definition names). ISPF uses the following ddnames to find the application elements:

ISPF Application Data Sets
DDName Application Elements
ISPPLIB Panels
ISPMLIB Messages
ISPTLIB Tables
ISPTABL Output tables
ISPPROF Profiles
ISPLLIB Functions written in compiled languages and stored as load modules
SYSPROC and SYSEXEC Interpreted functions written in REXX or CLIST

Note that ISPF-specific ddnames all start with ISP. Prefixes ISP and ISR are reserved for ISPF use, so do not name your application elements with names that start with ISP or ISR. SYSEXEC and SYSPROC are not specific to ISPF, and can be used to hold REXX execs for any application you want to run, not just ISPF.

ISPF itself is an ISPF application.  That is, just as ISPF processes functions, panels, messages, and tables in your application, ISPF processes its own functions, panels, messages, and tables. ISPF is shipped as a set of data sets for each of these types of data. 

ISPF data sets
Data Set DDName Application Elements
ISP.SISPCLIB SYSPROC Command procedure functions written in REXX or CLIST
ISP.SISPEXEC SYSEXEC Command procedure functions written in REXX
ISP.SISPLOAD ISPLLIB or STEPLIB Load module functions
ISP.SISPLPA ISPLLIB or Link Pack Area Load module functions stored in the Link Pack Area
ISP.SISPMACS Macros
ISP.SISPMENU ISPMLIB Messages in English
ISP.SISPPENU ISPPLIB Panels in English
ISP.SISPSENU ISPSLIB Skeletons in English
ISP.SISPTENU ISPTLIB Tables, including profiles and command tables, in English
 

Creating Application Data Sets

You need to create data sets to hold the parts of your application. The easiest way to create data sets is to use the ISPF Data Set Utility. From the ISPF Primary Options Menu, type 3 in the Options field and press the enter key. 

ISPF Primary Options Menu with option 3 selected

 Then, on the Utility Selection Panel, type 2 in the Option field and press enter. (As a shortcut, you can type 3.2 on the Primary Options Menu to go directly to the Data Set Utility, without displaying the Utilities selection panel first.)
Utility Selection Panel with option 2 selected

The allocate option creates data sets. Enter A on the command line, and type PRIVATE.PANELS in the Name field. The allocate option creates a data set with the name of prefix.PRIVATE.PANELS to hold your panel definitions. The prefix is your TSO prefix, which is usually your userid, and it is automatically added to the data set name.

Data Set Utility allocate panels data set

You can give further details about the data set on the Allocate New Data Set Panel. The Storage Class, Management Class, and Data Class are site-dependent.  If there aren't valid values in these fields, you can try leaving them blank. If the volume serial has a value, blank it out so the volume value takes a system default. You can set the Space units as TRKS (for tracks) and the primary quantity as 10 to initially allocate the data set as having 10 tracks.  A secondary quantity of 10 tracks means that if the first 10 tracks get filled up, another 10 are added. A record format of FB means that the data set has blocks that have a fixed length, and a record length of 80 means that each record in the data set has 80 bytes. Eighty byte records are frequently used for mainframe data sets, and in many cases 80 byte records are required. A Data Set Name Type of Library means that the data set is a PDSE. PDSEs are easy to use because the system handles a much of the housekeeping that you would have to do yourself with a PDS. 
 Specify data set attributes

Press Enter to complete the allocation and return to the Data Set Utility panel. A short message displays in the top right of the screen.  If the allocation was successful, the message says, "Data set allocated." Press the F1 key (which is assigned to the Help command, by default) to see more information in a long message.  The long message displays the name of the data set allocated and the volume it was allocated on.

To allocate a library for the Dialog Tag Language parts, which you can use to define the panels, change the name of the data set name to PRIVATE.DTL, and use the A command. The values you used to define the PRIVATE.PANELS library are pre-filled, so press the Enter key to use those values.  Allocate data sets named PRIVATE.MSGS for messages and PRIVATE.EXEC for command functions with the same values. If you want to experiment with tables or skeletons, you can also allocate PRIVATE.TABLES for tables, and PRIVATE.SKELS for file tailoring skeletons.

If you want to write compiled functions, you also need to allocate a data set such as PRIVATE.SOURCE or PRIVATE.C to hold the source and PRIVATE.OBJ to hold the compiled output.

Program objects (which are sometimes called load modules) are allocated slightly differently. Allocate a data set called PRIVATE.LOAD. Program objects have unformatted records. You can use the same defaults for most of the fields as the other libraries, but set Record format to U, Record length to 0, and Block size to 6144.

Set attributes for load data set

You now have the data sets you need to write an ISPF application.

[{"Line of Business":{"code":"","label":""},"Business Unit":{"code":"BU054","label":"Systems w/TPS"},"Product":{"code":"SSBLLD","label":"ISPF for z/OS"},"ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"}]

Document Information

Modified date:
09 December 2020

UID

ibm16379198