INREC FIELDS is better as INREC BUILD
INREC BUILD=(1,12,
Z,
13,5,
X'0C',
Z,
18,11,
8Z,
C'?',
X'0000',
C'?',
X'000000',
C'?')
If arranged like that, you can see the separate "fields".
The "number pairs" (1,12 13,5 etc) are taking data from the input record - position 1, length 12, position 13, length 5. They appear on the record at the next available position, so 1,12 appears at position 1 on the output.
The single Zs are binary zeros. Hex '00'. The 8 in 8Z is a "repetition", so it means 8 bytes of binary zeros.
The C'?' is a character constant, a ? will appear at this position.
The X'0C' is a hexadecimal constant. It either represents zero as a one-byte packed-decimal field, or "12" as a one-byte binary field, or the EBCDIC hex code for Form Feed (FF), or it is a longer binary field in conjunction with the following Z, giving a binary zero - value 192. We can't tell which just from looking at the SORT Control Card.
The X'00... are hexadecimal constants. The first is two bytes of... binary zeros. The second is three bytes of binary zeros.
We can guess that the code was changed by someone who did not know what the Z was, and was not bothered to find out. The X'00..s could be replaced by 2Z and 3Z respectively.
Your output will be: 12 bytes from position one of input; a binary zero; five bytes from position 13 of input; X'0C'; one byte binary zero; 11 bytes from position 18 of input; eight bytes of binary zero; a question mark; two bytes of binary zero; a second question mark; three bytes of binary zero; a final question mark.
You should look all of this up in your documentation and make sure that you understand it all. Don't change the X'00..s without being told to. You can include a comment to describe the card and point out that the X'00.. and Z are doing the same thing (remembering that the repetition is important on the Z to get multiple bytes).