z/OS ISPF Dialog Developer's Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using ISPF control variables

z/OS ISPF Dialog Developer's Guide and Reference
SC19-3619-00

Control variables are used to control and test certain conditions pertaining to the display of a panel or message. Only those that apply to displays are discussed here. They can be used only in the )INIT, )REINIT, and )PROC sections of a panel definition.

These control variables are described:

Control variables are automatically reset to blank when the panel display service first receives control. If .MSG, .CURSOR, and .CSRPOS are still blank after processing of the initialization section, they are set to the values passed by the calling sequence, if any, for an initial message or cursor placement. Under certain conditions, processing of the initialization section is bypassed.

Once .CURSOR, .CSRPOS, .MSG, and .RESP have been set to nonblank by panel processing, they retain their initial values until the panel is displayed, or redisplayed, at which time they are reset.

The control variables
  • .ALARM
  • .AUTOSEL
  • .CURSOR
  • .HELP
  • .MSG
  • .PFKEY
  • .RESP
have a length of 8 bytes. When set in an assignment statement to a longer value, the value is truncated. If these control variables are tested in a conditional expression, the compare value (literal or dialog variable) must not be longer than 8 bytes.

Figure 1 shows an example in which both .HELP and .CURSOR have been set in the )INIT section of the panel definition.

Figure 1. Sample panel definition with control variables
 )BODY
 %----------------------------  EMPLOYEE RECORDS  ------------------------------
 %COMMAND===>_ZCMD                                                             %
 +
 %EMPLOYEE SERIAL: &EMPSER
 +
 +   TYPE OF CHANGE%===>_TYPECHG +  (NEW, UPDATE, OR DELETE)
 +
 +   EMPLOYEE NAME:
 +     LAST   %===>_LNAME         +
 +     FIRST  %===>_FNAME         +
 +     INITIAL%===>_I+
 +
 +   HOME ADDRESS:
 +     LINE 1 %===>_ADDR1                                   +
 +     LINE 2 %===>_ADDR2                                   +
 +     LINE 3 %===>_ADDR3                                   +
 +     LINE 4 %===>_ADDR4                                   +
 +
 +   HOME PHONE:
 +     AREA CODE   %===>_PHA+
 +     LOCAL NUMBER%===>_PHNUM   +
 +
 )INIT
   .HELP = PERS032
   .CURSOR = TYPECHG
   IF (&PHA = ‘  ’)
     &PHA = 301
   &TYPECHG = TRANS (&TYPECHG N,NEW U,UPDATE D,DELETE)

 )PROC
   &TYPECHG = TRUNC (&TYPECHG,1)
   VER (&TYPECHG,LIST,N,U,D,MSG=EMPX210)
   VER (&LNAME,ALPHAB)
   VER (&FNAME,ALPHAB)
   VER (&I,ALPHAB)
   VER (&PHA,NUM)
   VER (&PHNUM,PICT,‘NNN-NNNN’)

 )END

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014