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


Parameter entities

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

Parameter entities allow you to place multiple entity declarations within an external file and refer to them within a source file. To embed the entities into the source file, you must declare the external file as a parameter entity. A parameter entity is identified by a percent symbol (%) following the term "entity" and followed by a space and the entity name. See Entity declarations for the syntax description. You refer to a parameter entity within the DOCTYPE statement by preceding the entity name with a percent symbol (%) and following it with a semicolon (;). This embeds the parameter entity file and allows its entities to be referred to in the source file.

For example, we've declared all of our entities within an external file called SYMBOLS. Here are the contents of the SYMBOLS file:
<!ENTITY sb "ShelfBrowse">
<!ENTITY cotime "ten days">
<!ENTITY xcotime "five days">
<!ENTITY nttime "three days">
<!ENTITY nitem "red checkout card">
<!ENTITY lfine "ten cents">
<!ENTITY cophone "555-1234">
The conversion utility locates the parameter entity using these rules for entity external files.
We can embed the SYMBOLS file into the declaration subset of the source file with a parameter entity declaration within the DOCTYPE statement. As long as we declare the parameter entity and refer to it properly, we can use any of the declared entities in the external file in the text of the source file.
<!doctype dm system
 [<!entity % SYMBOLS system> %SYMBOLS;]>
<panel name=chkout width=40 depth=22>Library Checkout Periods
  <area>
    <info width=38>
      <p>&sb; allows you to check out an inventory
      item for a maximum of &cotime;.
      However, you can renew the item for an additional
      &xcotime; by calling in your card number to our
      checkout phone line (&cophone;) any time of day.
      <p>If an inventory item is a new shelf item
      (indicated by the &nitem;), you may only reserve it for
      a maximum of &nttime;.
      You may not renew a new shelf item.
      <p>There is a fine of &lfine; per day for all
      items returned late.
    </info>
  </area>
</panel>
Figure 1 shows the formatted result.
Figure 1. Parameter entities
        Library Checkout Periods

 ShelfBrowse allows you to check out an
 inventory item for a maximum of ten
 days. However, you can renew the item
 for an additional five days by calling
 in your card number to our checkout
 phone line (555-1234) any time of day.

 If an inventory item is a new shelf
 item (indicated by the red checkout
 card), you may only reserve it for a
 maximum of three days. You may not
 renew a new shelf item.

 There is a fine of ten cents per day
 for all items returned late.




 
Parameter entity names must have these characteristics:
  • 1-8 characters
  • The first character must be alphabetic (A-Z, a-z, @, #, or $)
  • Remaining characters, if any, must be A-Z, a-z, @, #, $, or 0-9
  • Parameter entity names are case-sensitive.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014