## Difference between INREC and OUTREC

IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

### Difference between INREC and OUTREC

Hi,
I know the INREC builds the statement before sorting and OUTREC builds the statement.
But both INREC AND OUTREC produces the same result.

Can anyone give the real time example to differentiate the INREC and OUTREC concepts ?

Thank you,
Magesh.
magesh123

Posts: 13
Joined: Fri Apr 15, 2011 11:29 pm
Has thanked: 0 time
Been thanked: 0 time

### Re: Difference between INREC and OUTREC

Hello,

Suggest you review some of the topics already posted in the forum that specify INREC and/or OUTREC. If there is something in a topic that is not clear, post what you found and your doubt. SOmeone will be able to clarify.

Also;
Kolusu wrote:If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

http://www.ibm.com/support/docview.wss? ... g3T7000080
Hope this helps,
d.sch.

dick scherrer
Global moderator

Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

### Re: Difference between INREC and OUTREC

Magesh,

The difference in when INREC and OUTREC are processed IS what differentiates them.

For example, if we have these input records:

1111
4444
3333
2222

and we use these DFSORT control statements:

SORT FIELDS=(1,4,CH,A)
OUTREC IFTHEN=(WHEN=(1,4,CH,EQ,C'2222'),OVERLAY=(C'5555'))

we will SORT and then do the replace with OUTREC, so the SORTOUT would have:

1111
5555
3333
4444

But if we use these control statements:

INREC IFTHEN=(WHEN=(1,4,CH,EQ,C'2222'),OVERLAY=(C'5555'))
SORT FIELDS=(1,4,CH,A)

we will do the replace with INREC and then SORT, so SORTOUT would have:

1111
3333
4444
5555

Does that answer your question? If not, you need to explain more clearly what it is you want to know.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

Frank Yaeger
Global moderator

Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times