Start of change

Free-Form Statements

A free-form statement is coded in columns 8-80. Columns 6-7 must be blank.

In most cases, a free-form statement begins with an operation code, such as CTL-OPT, DCL-F, DCL-DS, READE, or DCL-PROC.

In some cases, it is not necessary to specify the operation code.

A free-form statement ends with a semicolon.

Start of change In general, all text following // on a free-form line is considered to be a comment. However, if // appears within a character literal, it is considered to be part of the literal. In the following example,  1 ,  2 , and  4  are comments, but  3  is not a comment because // appears within a literal. End of change

Start of change When // follows non-comment code on the same line, it is often referred to as an end-of-line comment. The comments at  2  and  4  are end-of-line comments.
  // comment  1 
  DCL-S string // comment  2 
        CHAR(10);
  string = 'abc // not-comment  3  +
           'def'; // comment  4 
End of change

For a list of operation codes supported in free-form calculations, see Operation Codes.

For more information about each type of free-form statement, see
End of change