Start of change

Free-Form Statements

Start of changeWhen the first line of the source contains **FREE, the source is fully free-form, and free-form statements can appear anywhere between column 1 and the end of the line. There is no limit on the length of the line.End of change

Start of changeOtherwise, the source is column-limited, and a free-form statement is coded in columns 8-80. Columns 6-7 must be blank.End of change

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 changeIn 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 changeWhen // 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