Page 1 of 1

Difference between INREC and OUTREC

PostPosted: Mon May 30, 2011 3:49 pm
by magesh123
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.

Re: Difference between INREC and OUTREC

PostPosted: Mon May 30, 2011 11:23 pm
by dick scherrer
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

Re: Difference between INREC and OUTREC

PostPosted: Tue May 31, 2011 9:08 pm
by Frank Yaeger
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.