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


Including comments in your markup

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

If you want to include notes, reminders, or other text that you don't want processed in your source files, you can insert them as comments, and the conversion utility ignores them.

Note: You cannot place comments within any of the DTL tags. A comment placed within a start or end tag causes the tag to end, and the text following the comment is treated as part of the tag content.
Like document type declarations, comments must be enclosed within markup declaration delimiters (<! >). However, you must also delimit comments within markup declarations by preceding and following a comment with two dashes (--), like this:
<!-- This is the text of the comment -->
Because the dashes act as comment delimiters, you can use them in any markup declaration. For example, you can include a comment within a DOCTYPE declaration:
<!doctype dm system -- DECLARE DOCUMENT TYPE -->
Here is a comment that generates a warning message because the second set of dashes is interpreted as the end of a comment and the text "Provides help for ordering" is treated as an additional markup declaration:
<!-- Panel DMH022 -- Provides help for ordering -->
If you delete one of the dashes in the second set of dashes, or use another symbol, no error occurs.
<!-- Panel DMH022 - Provides help for ordering -->
This block comment produces a warning message because of the odd number of dashes in the first and last lines of the block:
<!----------------------------------------->
<!--This source file contains all of the -->
<!-- help panels for the application     -->
<!----------------------------------------->
We could avoid this problem by using a different symbol between the comment dashes, like this:
<!--*************************************-->
<!--This source file contains all of the -->
<!-- help panels for the application     -->
<!--*************************************-->

ISPDTLC accepts comments which start with the 4 characters “<!--” and end with the 3 characters “-->”. The minimum valid comment is 7 characters (“<!---->”).

You cannot nest comments within other comments. You can, however, code multiple comments within a markup declaration, like this:
<!-- Here a comment --
-- THERE A COMMENT --
-- Everywhere a comment, COMMENT-->

As you can see, each of the comments begin and end correctly with the comment delimiters.

You can use comment delimiters to temporarily ignore multiple lines (or a block) of DTL source text. The block of text might include one or more DTL tags. To comment out a block of text, place an "open comment" delimiter before the first line of the text, and a "close comment" delimiter after the last line of text. For example:
<!--
<p> This is a multiple line of text block
<p> It is commented out for compile purposes
-->

When commenting out multiple lines of DTL source, use the MCOMMENT compiler option when coding the ISPDTLC invocation syntax, or select the Process multiple line comment blocks option on the ISPDTLC invocation panel.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014