ICE007A: Syntax error in a DFSORT control statement
ICE007A means DFSORT found a syntax error in one of its control statements and stopped. Typical causes are an unbalanced parenthesis, a missing comma, an embedded blank, an invalid format or operator, or a badly written constant.
Other names for this code
Also written as ICE007A SYNTAX ERROR, DFSORT ICE007A, ICE007A DFSORT syntax error, sort syntax error ICE007A, ICETOOL ICE007A.
What it means
DFSORT checks every control statement before it reads any data. ICE007A is the general message for a statement that breaks the syntax rules. The operation definer was found, so DFSORT knew what kind of statement it was reading, but something inside the operands didn't parse.
The A suffix marks a critical error. DFSORT ends without processing the input, and the step normally ends with return code 16. Because the check happens before any I/O, the input and output data sets are left as they were.
ICE007A is broad. The same message covers a missing comma, a stray blank inside the operands, a format such as CH or PD that is misspelled, an unknown comparison operator, a malformed character or hex constant, and a symbol or parsed field (%n) used where it isn't allowed. The listing of your statements shows where DFSORT stopped, which narrows it down quickly.
Common causes
- Unbalanced parentheses, often in a long INCLUDE or OMIT condition, or in an OUTREC BUILD with nested items.
- A missing comma between operands, or an extra one, for example
SORT FIELDS=(1,.10, CH, A,) - An embedded blank inside the operands. DFSORT stops reading operands at the first blank, so the rest of the line is treated as comments and the statement is left incomplete.
- An invalid format type or operator, such as
CHRinstead ofCH, orNEQinstead ofNE. - A bad constant, such as an unclosed
C'...'string, a hex constant with an odd number of digits, or letters in a numeric constant. - A continued DFSPARM PARM, or a symbol or parsed field used in a place that doesn't accept it.
How to find the problem
- Open the sort step's SYSOUT in SDSF. DFSORT lists each control statement it read and marks where the error was found.
- Read the marked statement from left to right and count parentheses. ISPF EDIT can help, because you can split a long statement over several lines to see its structure.
- Check for blanks inside the operands. A common one is a blank after a comma at the end of a line that wasn't meant to end the statement.
- If the job runs ICETOOL, look at the TOOLMSG and DFSMSG output. The ICE007A appears in DFSMSG under the operator that failed.
How to fix it
- Balance the parentheses and correct the commas, then rerun.
- Continue long statements by ending the line after a comma and starting the next line after column 1. Don't leave a blank in the middle of the operands.
- Use valid format codes (CH, ZD, PD, BI, FI and so on) and valid operators (EQ, NE, GT, GE, LT, LE).
- Write constants in full, for example
C'PAYROLL'orX'C1C2', with an even number of hex digits. - Fix the first error first. A single mistake can cause more messages further down.
IBM documentation
IBM documentation: ICE007A. Use the documentation for your installed release.
Related codes
Questions
How do I see which part of the statement is wrong?
Look at the control statement listing in the step's SYSOUT. DFSORT shows the statement and marks the point where it gave up.
Can ICE007A appear in an ICETOOL job?
Yes. ICETOOL passes statements to DFSORT, and a syntax error in them is reported as ICE007A in the DFSMSG output, under the operator that failed.
Is ICE007A different from ICE005A?
Yes. ICE005A means DFSORT couldn't find a valid operation definer at the start of the statement. ICE007A means it found one, but the operands after it didn't parse.