[USflag] The American Programmer [USflag]


Home
Books on Mainframe Programming
Mainframe Manuals and Tutorials
System Abend codes, Sqlcodes, VSAM/QSAM codes
Everything about the IBM AS/400 Midrange Computer - iSeries
Everything about CICS
Everything about COBOL
Everything about DB2 and SQL
Everything about IMS
Everything about Java and JavaScript
Everything about JCL and JES
Everything about REXX
Everything about zOS, VSAM, Tivoli, Assembler
Everything about TSO, ISPF, Spufi
  TSO/ISPF: Just enough to get you started
  Running ISPF in batch. Tutorial.
  ISPF variables. Tutorial.
  TSO Line Mode Commands (such as DELETE, HRECALL, ALLOCATE, Line Mode EDIT)
  Executing SQL in Spufi. Tutorial.
  Comparison of REXX and CLIST
  Writing ISPF Editor macros
  Manuals for TSO
  Books on TSO, ISPF and CLIST
Site Map and Site Search

           Home   > TSO, ISPF, SPUFI   > ISPF Variables

ISPF Variables and ISPF Control Variables

Examples of some of ISPF Variables and ISPF Control Variables

ISPF Variables

ISPF Services create and maintain built-in variables as shown in the following list: Their names all start with Z. It is a good idea to start your variable names with a letter other than Z. You can use them: on panels to display their value just put an & in front of them: Example: &ZUSER in a REXX program obtain their value with a VGET Example: ADDRESS ISPEXEC “VGET (ZUSER)” Say Zuser Here are the more common variables: ZAPPLID current application id ZCMD command input field ZDATE the current date ZDAY day of current month (01 – 31) ZDAYOFWK day of week (Monday, etc) ZEDLMSG long message that will appear on next panel displayed if user presses PF1 key ZEDSMSG short message that will appear on next panel displayed ZERRLM latest long error message issued by ISPF ZERRMSG latest error message id issued by ISPF ZERRSM latest short error message issued by ISPF ZHINDEX top index page in tutorial ZHTOP top of page in tutorial ZJDATE current julian date ZKEYS number of PF keys ZLOGON the name of the logon procedure you are executing ZMONTH name of month ZPFKEY Name of PF key in effect upon exiting the screen. PF01 – 24. (PF00 means no PF key in effect) ZPFxx setting for PFxx key ZPREFIX the prefix that TSO is putting on dataset names entered without apostrophes same as REXX SYSVAR(SYSPREF) ZPRIM YES if this panel is a primary option panel executed with ISPSTART PANEL(panel-name) ZSEL command input field truncated at first period ZTDSELS # rows selected after TBDISPL displays rows of a table on a panel ZTDTOP current top row pointer from table display services ZTEMPF name of temporary file for file tailoring. ZTERM terminal type ZTIME the current time (hh:mm) ZUP name of parent panel of current panel ZUSER the current userid. Same as REXX SYSVAR(SYSUID) ZVERB the last command entered on the command line END if PF3 pressed RETURN if PF4 pressed ZWINTTL the title of the next window to be displayed ZYEAR the current year (00 – 99)

ISPF Control Variables

These are used on panels. The leading “.” is required. .ALARM = YES causes the terminal to beep Generally used on a conditional statement .ATTR Dynamically change the attributes of a field in )INIT, )REINIT, or )PROC .ATTR (&PHONENUM) = new attributes' .ATTR (&field-name) = 'COLOR(YELLOW) HILITE(REVERSE)' .CURSOR=fieldname positions the cursor on this field .HELP used in INIT .HELP = member name in panel library for help (PF1) .MSG = message id displays this message .PFKEY contains the PF key pressed by the user. in the )PROC section variable = .PFKEY .RESP If the user presses PF3 or PF4 (Return key) it is set to END. Otherwise it is set to ENTER by the system You may test it in )PROC to see what key was pressed .TRAIL Contains the characters dropped by a TRUNC (see below) .ZVARS This is used in )INIT If you use the variable Z in a panel definition multiple times each use refers to one of the variables in this list. The first Z used refers to the first variable in this list. The second to the second, etc. Since this makes for unreadable panel code, consider using other variable names If a one character variable name is adequate, use that instead. Note in the following example The first Z is the same as NAME second Z is the same as ADDRESS third Z is the same as SEX )INIT .ZVARS = '(NAME ADDRESS SEX)' The only variable where the Z makes sense in the previous example is SEX, because that is a one character field. The + delimits the input field.
[Books Computer]

Home Books for Computer Professionals Privacy Terms |
Site Map and Site Search Programming Manuals and Tutorials The REXX Files Top of Page |