Finalidad
Documenta las funciones de la macro Net.Data. Puesto que el bloque COMMENT puede utilizarse en cualquier parte de la macro, no se documenta en los demás diagramas de sintaxis.
El bloque COMMENT puede utilizarse asimismo en el archivo de inicialización de Net.Data.
Sintaxis
>>-%{---texto---%}---------------------------------------------><
Valores
Contexto
Los comentarios pueden colocarse en cualquier parte entre las construcciones de lenguaje de una macro de Net.Data o del archivo de inicialización de Net.Data.
Restricciones
Se permite cualquier texto o carácter; sin embargo, los bloques comment no pueden anidarse.
Ejemplos
Ejemplo 1: Bloque comment básico
%{ This is a comment block. It can contain any number of lines and contain any characters. Its contents are ignored by Net.Data. %}
Ejemplo 2: Comentarios en un bloque FUNCTION
%function(DTW_REXX) getAddress(IN name, %{ customer name %} IN phone, %{ customer phone number %} OUT address %{ customer address %} ) { .... %}
Ejemplo 3: Comentarios en un bloque HTML
%HTML(report) { %{ run the query and save results in a table %} @myQuery(resultTable) %{ build a form to display a page of data %} <form method="POST" action="report"> %{ send the table to a REXX function to send the data output %} @displayRows(START_ROW_NUM, submit, resultTable, RPT_MAX_ROWS) %{ pass START_ROW_NUM as a hidden variable to the next invocation %} <input name="START_ROW_NUM" type="hidden" value="$(START_ROW_NUM)" /> %{ build the next and previous buttons %} %if (submit == "both" || submit == "next_only") <input name="submit" type="submit" value="next" /> %endif %if (submit == "both" || submit == "prev_only") <input name="submit" type="submit" value="previous" /> %endif </form> %}
Ejemplo 4: Comentarios en un bloque DEFINE
%define { START_ROW_NUM = "1" %{ starting row number for output table %} RPT_MAX_ROWS = "25" %{ maximum number of rows in the table %} resultTable = %table %{ table to hold query results %} %}
Ejemplo 5: Comentarios en el archivo de inicialización de Net.Data.
... %{ restrict for general use %} DTW_DIRECT_REQUEST no ...