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


Example

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

This example uses both entities and parameter entities. It embeds the file GLBENT with global entity declarations, and a file with tags and text. It also uses entities and parameter entities that refer to text strings.

The first entity declaration declares the "glbent" parameter entity as an external file.

The file name is defaulted to GLBENT. A parameter entity is used because this file contains entity declarations. Because entity declarations can only be made in the declaration subset, the GLBENT file is embedded with an entity reference within the declaration subset. The entity declarations in GLBENT are for text that is used at the top and bottom of the panel. The "header" entity declaration refers to an external file, and the "footer" is a text string. Both of these entities are referred to in the source file.

The second entity declaration, for “list”, is also a parameter entity. This declaration refers to a string, not an external file. The text is the SL tag name, which is referred to in the next two entity declarations. These two declarations, "slist" and “elist”, are used as the SL start and end tags. They are defined as entities so the type of list can be changed in one place. To change the list type from a simple list (SL) to an unordered list (UL), change the parameter entity "list" from SL to UL.

This is the content of the source file:
<!DOCTYPE DM SYSTEM [
<!ENTITY % glbent SYSTEM -- declaration of global entity file -->
%glbent;<!-- Embeds the global entity file -->
<!ENTITY % list "sl" -- type of list -->
<!ENTITY slist "<%list;>" -- type of list start tag. -- >
<!ENTITY elist "</%list;>" -- type of list end tag. -- >
]>

<panel name=showlist depth=22 width=45>Show Departments
  <area>
    <info width=40>
      &header;
      <p>The floors and departments are shown below:
      &slist;
        <li>First floor
          &slist;
            <li>Toys
            <li>Electronics
          &elist;
        <li>Second floor
          &slist;
            <li>Boys clothes
            <li>Girls clothes
          &elist;
      &elist;
      &footer;
    </info>
  </area>
</panel>
This is the content of the embedded file GLBENT:
<!ENTITY header SYSTEM "coname">
<!ENTITY footer "<p> We're always glad to help!">
This is the content of the embedded file CONAME:
<lines>
Jeff's Children's World
Barnett, NC
</lines>

Figure 1 shows the formatted result:

Figure 1. Entities and parameter entities
                  Show Departments

 Jeff's Children's World
 Barnett, NC

 The floors and departments are shown below:

     First floor

         Toys

         Electronics

     Second floor

         Boys clothes

         Girls clothes

 We're always glad to help!

 

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014