Question: what is the difference between inrec and outrec in sort?
Answer: For SORT FIELDS=COPY,there is no difference between INREC and OUTREC. For a sort or merge, the INREC statement is processed BEFORE sorting or merging occurs whereas the OUTREC statement is processed AFTER sorting or merging occurs. In simple terms INREC is the layout that you want the sort program to process.