z/OS ISPF Edit and Edit Macros
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Adding models

z/OS ISPF Edit and Edit Macros
SC19-3621-00

To create a new model, you must:

  1. Determine the data set name and member name for the model. For actual use, the model must be in a skeleton library.
  2. Create the source code for the model. Consider whether you should create all new source code or change an existing model under a new name.

    When you create a COBOL model, make sure number mode is on. Then, when you save the model, turn number mode off.

  3. Make the model accessible from a model selection panel by having its selection call the program ISRECMBR with the actual model member name as its parameter. This involves:
    • Changing an existing model selection panel to add the new panel.
    • Creating a new model selection panel. If you do this, you must add the new panel to the hierarchy of selection panels by changing one of the higher-level panels.
    • No change, if you are replacing an existing model with an updated model with the same name.
    • Adding the word NOSEQ after the model member name if you wish to check that model data is not being overlaid by editor sequence numbers.

As an example of adding a model, assume that you want to create a model for multiple-line block letters. Since you intend to use these block letters on panels, the model becomes part of the panel model class. To build each model block letter, use the editor to create a new member in your skeleton library. For example, you could create a member called BLKI containing this model for the letter I:

        IIIIIIIIII
            II
            II
            II
            II
            II
        IIIIIIIIII
)N
)N   the letter I for logo

Once the model for each letter is built, you must update the selection panel in the prompting sequence that deals with panel model selection. This panel is named ISREMPNL and is stored in the system panel library. Figure 1 shows the last few lines in ISREMPNL:

Figure 1. Panel Models panel (ISREMPNL)
                                Panel Models
 Option ===>                                                               

 Enter number or statement name.
 Enter END command to cancel MODEL command.
                                                                More:   -
 ⋮
 S18 CUAATTR  - CUA attributes
 S19 *REXX    - Rexx in panel procedures

 P0  PANSECT  - Panel Sections - Other definitions

 Panel Formats:
 F0  PANFORM
  F1=Help      F2=Split     F3=Exit      F7=Backward  F8=Forward   F9=Swap
 F12=Cancel

Copy the panel shown in Figure 1 into your panel data set and change it by adding a format F1, BLOCKLTR. See Figure 2 for an example.

Figure 2. Changed Panel Models panel (ISREMPNL)
                                Panel Models
 Option ===>                                                               

 Enter number or statement name.
 Enter END command to cancel MODEL command.
                                                                More:   -
 ⋮
 S18 CUAATTR  - CUA attributes
 S19 *REXX    - Rexx in panel procedures

 P0  PANSECT  - Panel Sections - Other definitions

 Panel Formats:
 F0  PANFORM
 F1  BLOCKLTR
  F1=Help      F2=Split     F3=Exit      F7=Backward  F8=Forward   F9=Swap
 F12=Cancel

If there are several new models, this panel should be updated so that when you select F2, a new Block Letter selection panel is displayed. Therefore, you should change the )PROC section of panel ISREMPNL to include item F2. See Figure 3 for an example.

Figure 3. Changed )PROC section of Panel Models panel (ISREMPNL)
Screen dump.

This concept allows you and other users to have sets of individual models, and allows the installation to have its own set of general models, without having multiple copies of the PDF model selection panels. For each model class, the installation could provide two additional entries on the selection panel: one for installation-wide models and one for your models. Each entry could point to a selection panel, with each user having a copy of the selection panel to customize for individual use.

Note that the entry for F2, BLOCKLTR, points to a new panel, ISRBLOCK, which you would now build.

You can change an existing panel model to create the new panel. Figure 4 shows how the new panel might be typed. Note particularly the )INIT and )PROC sections of the coding. In the )PROC section of panel ISRBLOCK, the target for all valid selections is the program ISRECMBR. The parameter passed to this program is different for each separate, but valid, selection and is the name of the model for that selection. Thus, for our example, the model name for selection 1 or I is BLKI.

You should follow the )INIT source code and the end source code in the )PROC section shown in Figure 4 for all new panels.

Figure 4. Source code for Block Letter Model Selection panel
)PANEL
/*  ISRBLOCK                                                        */
/*  5647-A01 (C) COPYRIGHT IBM CORP 1995, 2003                      */
/*  Sample source code for the Block Letter Model selection panel.  */
)ATTR
)BODY
%-------------------------  BLOCK LETTER  ------------------------

%OPTION  ===>_ZCMD                     +
%
%   1 +I           - Block letter I
%   2 +J           - Block letter J
%   3 +K           - Block letter K
%
%
+
+ Enter %END+command to cancel MODEL command. +

%
)INIT
  .CURSOR = ZCMD
  .HELP = ISRxxxxx
  IF (&ISRMDSPL = 'RETURN  ')
       .RESP = END
)PROC
  &ZSEL = TRANS(TRUNC (&ZCMD,'.')
          1,'PGM(ISRECMBR) PARM(BLKI)'
          I,'PGM(ISRECMBR) PARM(BLKI)'
          2,'PGM(ISRECMBR) PARM(BLKJ)'
          J,'PGM(ISRECMBR) PARM(BLKJ)'
          3,'PGM(ISRECMBR) PARM(BLKK)'
          K,'PGM(ISRECMBR) PARM(BLKK)'
          *,'?' )
  IF (&ZSEL = '?')
     .MSG = ISRYM012
  &ISRMMEND = 'N'                    /* SET THE END INDICATOR TO NO   */
  IF (.RESP = END )                  /* IF ENDING, WHY ... WHO CAUSED */
    IF (&ISRMONCL = 'Y')             /* MAKE SURE ITS NOT A CLASS OP. */
      IF (&ISRMDSPL = 'RETURN  ')    /* MAKE SURE ITS NOT END ON MBR. */
        &ISRMMEND = 'Y'              /* NO - ITS BECAUSE USER HIT END */
)END

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014