View previous topic :: View next topic
|
Author |
Message |
sushmitha.prasad
New User
Joined: 08 Jul 2008 Posts: 2 Location: India
|
|
|
|
Where do we use INREC practically? What is the need to reformat the records before sorting? Can you provide me a practical example? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Before answering your question..
Why do you think it is useless?
any reasons??? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
As a practical example, say you have groups of records each with a header that has a key, and detail and trailer records that don't have a key, but you want to sort the groups of records by the key. You could use DFSORT's WHEN=GROUP function in INREC to propagate the key from the first record of the group to the other records of the group and then SORT on the key in every record. You can do this with INREC because it's processed before SORT. You could NOT do this with OUTREC because it's processed after SORT. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
One more simple example of using inrec is
Overcoming overflow problem while summing.
we need to add ZEROs from inrec to increase the length... |
|
Back to top |
|
|
|