TABLE FILE WORK_CODE
BY WORK_CODE
END
will give a list of codes.
Basically a SUM / MAX / COUNT etc is created on the fly, so if you look at the generated sql it will look something like this
SELECT T1."WORK_CODE", MAX(T1."WORK_CODE") FROM
WORK_CODE T1 GROUP BY T1."WORK_CODE" ORDER BY
T1."WORK_CODE";
In some circumstances this might not be very efficient and you may want to code your own SUM x NOPRINT instead.