I have few queries reagrding the INREC & OUTREC:
1. Is there any difference in the usage of the operands for INREC & OUTREC statement. I mean to say do we have any operands that we can use for OUTREC but cant use in INREC or other way round.
2. If there is then please let me know what is that & why.
INREC and OUTREC have globaly the same feature.
The main difference comes from the need or not to rebuild the records BEFORE or AFTER a SORT or a COPY.
But OUTFIL vs OUTREC (used alone) has many more features.
You need to look at the doc to know them.
As Alain correctly indicated, DFSORT's INREC statement and OUTREC statement offer the same parameters/features (FIELDS/BUILD, OVERLAY, IFTHEN). DFSORT's OUTFIL statement also offers the same parameters/features for BUILD, OVERLAY and IFTHEN, plus other features like STARTREC, ENDREC, SPLIT, SPLITBY, SAMPLE, INCLUDE, OMIT, SAVE, reporting parameters, etc. Additionally, OUTFIL's BUILD offers the n/ feature for multiple lines; n/ is not offered by INREC or OUTREC's BUILD.