In a procedure step, a LABEL statement that includes a semicolon as the first character generates an error message


In a procedure step, a LABEL statement that includes a semicolon (;) at the beginning of the label text generates error messages like those in the following example:

1    proc print data=sashelp.class label;
2    label sex=';Gender';
               -------
               22
               ------
               180
ERROR 22-322: Expecting a quoted string.
ERROR 180-322: Statement is not valid or it is used out of proper order.
3    run;


To circumvent the problem, include a leading blank in the label text. This is not an issue if the LABEL statement is used in a DATA step because of the different parsing methods that are used.