| Statements |
| Valid: | anywhere |
| Category: | Log Control |
| Syntax | |
| Arguments | |
| Details | |
| Examples |
Syntax |
| *message; |
| or |
| /*message*/ |
specifies the text that explains or documents the statement or program.
specifies the text that explains or documents the statement or program.
| Details |
You can use the comment statement anywhere in a SAS program to document the purpose of the program, explain unusual segments of the program, or describe steps in a complex program or calculation. SAS ignores text in comment statements during processing.
In some operating environments, SAS
might interpret a /* in
columns 1 and 2 as a request to end the SAS program or session. ![[cautionend]](../../../../common/63294/HTML/default/images/cautend.gif)
Note: You can add these lines to your code to fix unmatched comment tags, unmatched quotation marks, and missing semicolons.
/* '; * "; */; quit; run;
![[cautionend]](../../../../common/63294/HTML/default/images/cautend.gif)
| Examples |
These examples illustrate the two types of comments:
This example uses the *message; format:
*This code finds the number in the BY group;
This example uses the *message; format:
*---------------------------------------* | This uses one comment statement | | to draw a box. | *---------------------------------------*;
This example uses the /*message*/ format:
input @1 name $20. /* last name */ @200 test 8. /* score test */ @50 age 3.; /* customer age */
This example uses the /*message*/ format:
/* For example 1 use: x=abc; for example 2 use: y=ghi; */
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.