SQL CODE = -199, ERROR: ILLEGAL USE OF KEYWORD SELECT

Document ID : KB000048145
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

The "TO" command was used to externalize the Report Facility Query Text which allows the text to be written to a sequential file or a PDS.

When the Query Text is imported, which contained a replaceable parameter, the -199 was issued.

Solution:

The "TO" command does not preserve the replaceable parameter value. Issuing the "REPPARM" command when editing the query and providing a value for the replaceable parameter will resolve the -199.