How to Begin Using ISPF

To use ISPF, certain requirements must be met. First of all, ISPF must be available to you, usually by means of a CMS system disk such as the S-disk or the Y-disk. If you are not sure where the ISPF licensed program resides, ask your supervisor. Each installation can install ISPF to suit their own needs, which can vary considerably. You will need the various libraries distributed with the ISPF licensed program.

The ISPF libraries distributed are:
ISPPLIB MACLIB
Panel Libraries
ISPMLIB MACLIB
Message Libraries
ISPTLIB MACLIB
Table Input Libraries

You also need the ISPSTART command to begin dialog processing. If these commands and libraries are not available to you, consult your supervisor or system administrator.

Before you invoke ISPF, your virtual device 191 must be accessed as the A-disk. During operation, ISPF assumes that this minidisk is always in read/write mode and that no other user has write access to it. (In some cases, ISPF permits multiple write access to minidisks other than 191, provided that such access is performed under the control of ISPF.)

The libraries distributed with ISPF are system libraries. To make these as well as your own libraries available to applications running under ISPF control, you need to issue some FILEDEF commands, which should remain in effect throughout your ISPF session. Suppose you have a panel library called USRPANEL, and a message library called USRMESGS. You need to concatenate these libraries with the corresponding distributed libraries, and you want your libraries accessed ahead of the distributed libraries. The next sequence of commands (which can be included in your PROFILE EXEC or in another exec) make these libraries available to ISPF functions:
FILEDEF ISPPLIB DISK USRPANEL MACLIB * (PERM CONCAT)
FILEDEF ISPPLIB DISK ISPPLIB  MACLIB * (PERM CONCAT)
FILEDEF ISPMLIB DISK USRMESGS MACLIB * (PERM CONCAT)
FILEDEF ISPMLIB DISK ISPMLIB  MACLIB * (PERM CONCAT)
Notice that the ddname in each pair of FILEDEFs is the same as the file name of the distributed ISPF library. Other ISPF libraries follow the same pattern:
ISPTLIB
is the ddname for all the table input libraries.
There are four optional libraries that are user-defined:
Skeleton library
ddname ISPSLIB
Table Output library
ddname ISPTABL
File Tailoring Output library
ddname ISPFILE
Profile library
ddname ISPPROF

The PERM option ensures that the FILEDEF remains in effect throughout an ISPF session. The CONCAT option concatenates two or more libraries under the same ddname. The order that libraries are searched is the same as the order that the FILEDEFs are issued. (You do not have to issue a GLOBAL MACLIB command before invoking ISPF.)

If the ISPF commands and libraries are not on a system disk, but are available by means of the LINK command, you might want to write an EXEC to link the ISPF system disk and issue the FILEDEFs you need. If the ISPF system disk is on a minidisk with a virtual address of 591, owned by a user called ISPMAINT, with a read password of ALL (that is, not requiring a password to link), the following statements in REXX do this:
/* ACCESS ISPF SYSTEM */
'CP LINK ISPMAINT 591 591 RR'
'ACCESS 591 Z/A'
'FILEDEF ISPPLIB DISK USRPANEL MACLIB * (PERM CONCAT)'
'FILEDEF ISPPLIB DISK ISPPLIB  MACLIB * (PERM CONCAT)'
'FILEDEF ISPMLIB DISK USRMESGS MACLIB * (PERM CONCAT)'
'FILEDEF ISPMLIB DISK ISPMLIB  MACLIB * (PERM CONCAT)'
Note: See Using Execs for a discussion of execs.

You can create panel and message libraries by using XEDIT together with the MACLIB command. Create each panel with the editor first, then build the panel library with the MACLIB command.

Note: The panels and groups of messages must have a CMS file type of COPY. When using the editor to create a panel and to specify a file type of COPY, be sure to enter the editor subcommand SERIAL OFF to prevent the editor from inserting serial numbers in the panel file in columns 73 - 80. If these numbers are present, they will cause ISPF errors. You can also use a different file type (for example, PANEL or MSG) and then rename the file before building the library.

The following steps outline a method of building a panel or message library:

  1. XEDIT MENUPAN PANEL
  2. (Create Panel)
  3. FILE MENUPAN COPY
  4. XEDIT NAMEPAN PANEL
  5. (Create Panel)
  6. FILE NAMEPAN COPY
  7. MACLIB GEN USERPAN MENUPAN NAMEPAN.

In steps 1 and 4, the panel members are created by using a file type of PANEL to bypass serialization. In steps 2 and 5, edit subcommands create the panel members. In steps 3 and 6, a form of the FILE subcommand is used to write the files to disk with a file type of COPY. In step 7, the MACLIB command is used to create USERPAN MACLIB. This library contains the two members MENUPAN COPY and NAMEPAN COPY.

After you create the panels and messages you need, you can develop an application using REXX, or you can develop your specific language application.

Once your programs are compiled and exist either as text or load modules, you need to make them available to ISPF by issuing the appropriate FILEDEF command. For example, if you write a program called TESTPROG and compile it, you have a file called TESTPROG TEXT A1 on you A-disk. If you want to include TESTPROG in a TXTLIB called DEVLIB TXTLIB A1, issue the TXTLIB GEN or TXTLIB ADD command to insert the TEXT file into the library. This command makes the library available to ISPF:
FILEDEF ISPXLIB DISK DEVLIB TXTLIB * (PERM)
If you have included the module in a LOADLIB, use:
FILEDEF ISPLLIB DISK DEVLIB LOADLIB * (PERM)

When a text module is invoked (either as a TEXT file or as a member of a TXTLIB), any other text modules that it calls are loaded automatically by automatic call reference. The modules must also be TEXT files on a ISPF-accessible minidisk or members of the TXTLIB allocated to ddname ISPXLIB. If you have more than one TXTLIB, use the CONCAT option of the FILEDEF command to concatenate the libraries under the same ddname, ISPXLIB.

If your program is in a LOADLIB, use the ddname ISPLLIB. You can also specify a concatenated sequence for LOADLIBs. No automatic call referencing occurs with load modules. All load module references must be resolved before invocation by ISPF. Load modules can be used only for programs that are reenterable.

Note: Avoid using nonrelocatable files whenever possible. User nonrelocatable files can create a very complex operational environment, because CMS subset mode is turned on to prevent nonrelocatable files from overlaying relocatable programs already in storage. When using split screen mode, CMS subset mode is not turned off until all relocatable programs associated with logical screens have completed execution.
When you have created the dialog functions you need, you can invoke the ISPF environment by means of the ISPSTART command, using the appropriate PANEL, CMD, or PGM parameter.
  • The PANEL parameter causes the panel specified to be displayed, and passes any options to it that are specified on the ISPSTART command line.
  • The CMD parameter specifies the name of an exec to be invoked as the first dialog function.
  • PGM specifies the program name to be invoked as the first dialog function.