Example 3

This shows a combination of DFSORT and REXX statements that copies records with type A and prints the first 10. The type value is in column 6.
*FASTPROC
 OMIT COND=(1,6,CH,NE,C'A')
*REXXPROC
 If prtcount() <= 10 then print(inrec,'CHAR') /* Print 10 */
    RETURN                                       /* Copy     */
 return 'DROP'                                   /* Drop the rest */