comment statement

The comment statement performs cursor control and screen display commands in a macro is similar to the t statement in a PROC. Its primary function is to add screen control capabilities to macro commands.

Parameters are passed to the comment command as discrete units surrounded by parentheses. These types of text are supported:

(column,row) x, y (column,row) positioning.
(-n) Special cursor control features.
(xn) Prints the characters whose numeric value is n.
(string) Prints the string of characters at the current cursor position.

Several text segments may be entered on a single comment command line, but each must be surrounded by a single pair of parentheses.

The optional + character at the end of a line suppresses the automatic CR/LF (carriage return and line feed).

Warning: Using comment after a select will kill the active select list.


comment (text){(text2)}{(...)}{+}


A sample logon macro to clear the screen:

001 n clear-screen macro
002 comment (-1)

This example of a logon macro clears the screen and displays the user’s name/account, the current date and time, and the current terminal and printer assignment parameters.

001 n logon macro
002 comment (-1)(-13)(User Logon)(0,2)(User:)(-14)(20,2)+
003 who
004 comment (0,3)(-13)(Time-Date:)(-14)(20,3)+
005 time
006 comment (0,5)(-13)(Spooler Assignment)(-14)
007 sp-assign ?
008 comment (0,10)(-13)(Terminal Assignment)(-14)
009 term