Informix Error -4167: The PRAGMA LOCATION statement should be the last statement on the line.
Cause and resolution
The PRAGMA LOCATION statement should be the last statement on the line.
No other NewEra statement can follow PRAGMA LOCATION on the same line. If your source file includes any other NewEra statement or compiler directive after PRAGMA LOCATION, insert a linefeed character immediately following the end of the PRAGMA LOCATION compiler directive. (The last specification of PRAGMA LOCATION must be a line number, a filename, or the keyword RESET.)
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4167 fires when another NewEra statement or compiler directive follows PRAGMA LOCATION on
the same line — per the official guidance, no other statement can share that line; the last
specification of PRAGMA LOCATION must be a line number, a filename, or RESET.
- Another statement or directive appearing after
PRAGMA LOCATIONon the same line, per the official guidance — the direct, only cause.
Solutions / Resolution
- Insert a linefeed immediately after the
PRAGMA LOCATIONdirective, per the official guidance, so nothing else shares its line.
Examples
A statement following PRAGMA LOCATION on the same line
PRAGMA LOCATION 100 CALL initialize()
-- -4167: CALL initialize() must be on its own line
Corrected
PRAGMA LOCATION 100
CALL initialize()
Diagnostic Checks
- Check every
PRAGMA LOCATIONdirective for anything following it on the same line, and move that content to the next line.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4167 in this set yet.
PRAGMA LOCATION has another statement on the same line — move it to the next line.