What is the basic difference between inrec and outrec?
INREC and OUTREC perform the same functions, but at different points in DFSORT processing.
INREC reformats records before they are copied, merged or sorted.
OUTREC reformats records after they are copied, merged or sorted.
They are essentially interchangeable unless you need the records reformatted before sorting rather than after sorting (use INREC) or after sorting rather than before sorting (use OUTREC).
Which is more cost effective? and why?
For a situation where you can significantly reduce the size of the records before they are sorted, INREC can be more cost effective then OUTREC since the less bytes you need to sort, the more efficient the sort is.