z/OS ISPF Dialog Tag Language Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Declaring variables

z/OS ISPF Dialog Tag Language Guide and Reference
SC19-3620-00

You declare variables for dialog elements by coding variable declarations in a variable list and specifying the variable class associated with each declared variable.

The variable list (VARLIST) tag and its required end tag define the variable list. You code the variable list after any variable classes and before any other tags.

To declare variables, use VARDCL (variable declaration) tags within the VARLIST definition. The VARDCL tag has two required attributes, NAME and VARCLASS.
NAME
NAME specifies the variable used within the DTL source file.

For example, a data field definition includes a variable name in the DATAVAR attribute to specify the variable that receives data when the user enters data in the field.

VARCLASS
VARCLASS specifies the variable class associated with the variable declaration. Variable classes define the format and length of variable data plus translations and checks to perform on the data.
Here is an example where the variable list contains two variable declarations, referred to by the data fields in the application panel:
<!doctype dm system>

<varclass name=authorc type='char 40'>
<varclass name=catnumc type='char 10'>

<varlist>
  <vardcl name=author varclass=authorc>
  <vardcl name=catnum varclass=catnumc>
</varlist>

<panel name=books1>Book Title Search
  <area>
    <dtacol pmtwidth=20>
      <dtafld entwidth=40 datavar=author>Author
      <dtafld entwidth=10 datavar=catnum>Catalog number
    </dtacol>
  </area>
</panel>
Note: The ISPF Dialog Tag Language conversion utility does not require that you code the VARCLASS, VARDCL, or VARLIST tags for a successful generation of a panel, command table, or message member that includes variables. If the conversion utility finds a variable that does not have an associated VARDCL definition, it issues a suppressible warning message.

The use of the VARCLASS, VARDCL, and VARLIST tags is required if you want to use the facilities provided by the CHECKL and XLATL tags.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014