PDR8501S

SQL() is only valid in the FINISH: and START: sections.

What happened: The SQL function is only valid in the FINISH: and START: sections.

What to do: Move the SQL() statement to the FINISH: or START: section.