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


Variable substitution

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

You can specify a variable in the text of a message by using the VARSUB (variable substitution) tag. When the message is displayed, ISPF inserts the current value of the variable into the text of the displayed message.

You code the VARSUB tag within the text of the message where you want the substitution to be made. You use the required VAR attribute of the VARSUB tag to specify the name of a declared variable whose value is substituted in the message text.

Here is an example that uses two variable substitutions in the text of the message "msga001". The first VARSUB specifies the variable invvar, which provides an invoice number in the message. The second VARSUB specifies the variable datevar, which provides a date in the message.

<!doctype dm system>

<varclass name=invoices type='char 10'>
<varclass name=updates  type='char 8'>

<varlist>
  <vardcl name=invvar varclass=invoices>
  <vardcl name=datevar varclass=updates>
</varlist>

<msgmbr name=msga00>
  <msg suffix=0>Your request is being processed.
  <msg suffix=1>The invoice number you have requested,
  <varsub var=invvar>, was last updated on
  <varsub var=datevar>.
</msgmbr>

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014