FOR J IN JOB_HISTORY WITH J.JOB_END MISSING REDUCED TO J.JOB_CODE SORTED BY J.JOB_CODE PRINT J.JOB_CODE END_FOR This example lists all the currently active job codes. It includes each value in the record stream only once.