A comment is a character string that serves as documentation in a program. Comments are not executable. Any line in a PDL program can contain a comment. If a line begins with : or ‑‑, the entire line is treated as a comment.
This statement has the following format:
: text of PDL comment outside EXEC SQL construct -- text of comment inside EXEC SQL construct
: (colon)-Treats all characters to the right as a comment. You cannot use the colon for comments in embedded SQL.
-- (double hyphens)-Treats all characters to the right as a comment.
Because the comment ends at the end of the line, no special character is required to terminate the comment. In embedded SQL, the colon is reserved for host‑variable names. You cannot use it as a comment delimiter.
Example
: this is regarded as a comment. SET A = B + C : this is regarded as a comment, SET D = A + 1 -- and this, too, but not the SETs
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|