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


How to use edit models

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

You use models to assist you in defining a dialog element. To use a model, first edit your data. Then determine where you want to place the model. If you are editing existing data, define a label or use the A (after) or B (before) line command to show where the model goes. You do not need to use the A or B command when you have a new data set. Then type MODEL on the command line and press Enter.

If you know the logical name of the model you want, you can use it to directly access the model. Type MODEL mmm, where mmm is the name of the model. For example, if you want the model for LMCLOSE, you would specify MODEL LMCLOSE. If you enter MODEL with no parameters, PDF displays a series of selection panels, from which you select the model name and any qualifiers.

The original data is then displayed with the model in place. You can type over or use line commands to change the data lines in the model to meet your needs.

As an example, assume that you are writing a dialog function using CLIST commands and you want to have the CLIST display a panel. You are editing your CLIST member, called USERID.PRIVATE.CLIST(DEMO1). Since your data set type, CLIST, matches the class of models you want, you can allow the model class to default. If you enter MODEL without a model name, the CLIST Models panel, Figure 1, appears.

Figure 1. CLIST Models panel (ISREMCMD)
                                  CLIST Models

 Enter number or service name.
 Enter END command to cancel MODEL command.

 Variables                 Workstation                 Library Access
 V1  VGET                  X1  FILESTAT                L0  LIBACC
 V2  VPUT                  X2  FILEXFER
 V3  VERASE                X3  WSCON                   Miscellaneous
                           X4  WSDISCON                M0  MISC
 Display
 D1  DISPLAY
 D2  TBDISPL               File Tailoring
 D3  SETMSG                F1  FTOPEN
 D4  PQUERY                F2  FTINCL
 D5  ADDPOP                F3  FTCLOSE
 D6  REMPOP                F4  FTERASE

 Tables
 T1  TABLES

 Option ===>                                                                  
  F1=Help      F2=Split     F3=Exit      F7=Backward  F8=Forward   F9=Swap
 F12=Cancel

If you select option D1 (DISPLAY), the editor inserts the model for the DISPLAY service in your CLIST, as shown in Figure 2. The lines are inserted at the location you specify with a label or an A or B line command. Notes are identified by the characters =NOTE= in the line command field.

Figure 2. DISPLAY Service Model
   File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help
 ───────────────────────────────────────────────────────────────────────────────
 EDIT       LSACKV.PRIVATE.CLIST(EDITOLD) - 01.01           Columns 00001 00072
 ****** ***************************** Top of Data ******************************
 000100   ISPEXEC  DISPLAY  PANEL(PANELNAM)     MSG(MSG-ID)        +
 000200                     CURSOR(FIELDNAM)    CSRPOS(POS#)       +
 000300                     COMMAND(COMMANDS)   RETBUFFR(BUF-NAME) +
 000400                     RETLGTH(LNG-NAME)   MSGLOC(MSG-FIELD)
 =NOTE=
 =NOTE=      PANELNAM  - OPTIONAL, NAME OF THE PANEL TO BE DISPLAYED.
 =NOTE=      MSG-ID    - OPTIONAL, IDENTIFIER OF A MESSAGE TO BE DISPLAYED ON
 =NOTE=                  THE PANEL.
 =NOTE=      FIELDNAM  - OPTIONAL, NAME OF THE FIELD WHERE THE CURSOR IS TO BE
 =NOTE=                  POSITIONED.
 =NOTE=      POS#      - OPTIONAL, POSITION OF CURSOR IN FIELD. DEFAULT IS 1.
 =NOTE=      COMMANDS  - OPTIONAL, NAME OF A VARIABLE WHICH CONTAINS THE CHAIN
 =NOTE=                  OF COMMANDS.
 =NOTE=      BUF-NAME  - OPTIONAL, NAME OF A VARIABLE WHICH CONTAINS THE
 =NOTE=                  REMAINING PORTION OF THE COMMAND CHAIN TO BE STORED
 =NOTE=                  IF AN ERROR OCCURS.
 =NOTE=      LNG-NAME  - OPTIONAL, NAME OF A VARIABLE WHICH CONTAINS THE LENGTH
 Command ===>                                                  Scroll ===> PAGE
  F1=Help      F2=Split     F3=Exit      F5=Rfind     F6=Rchange   F7=Up
  F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel

With the notes as a guide, you can edit the CLIST to change the DISPLAY service call parameters for your function. The error-handling source code shown serves as a skeleton which you can update. Finally, use RESET to eliminate the notes from the panel, leaving the service call, the error-handling logic, and the comments. Some models also include examples in NOTE lines. Use the MD line command to turn NOTE lines into data lines.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014