anoop kumar g


{ City } bangalore
< Country > india
* Profession * jobless
User No # 11618
Total Questions Posted # 0
Total Answers Posted # 1

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 13
Users Marked my Answers as Wrong # 2
Questions / { anoop kumar g }
Questions Answers Category Views Company eMail




Answers / { anoop kumar g }

Question { GE, 34441 }

What is SORT ? How do we eliminate duplicate records ? How
do I select some records using SORT ?


Answer

SORT is a utility(The program name maybe SYNCSORT or DFSORT)
that IBM provides which can do so many useful operations on
a flat file..like sorting the file based on a particular
condition, eliminate duplicates, extract some selective
fields into another file in the required order and the list
goes on..
To eliminate duplicates, we can use as below..
.
.
//SYSIN DD *
SORT FIELDS=COPY
SUM FIELDS=NONE
END

You can use "include condition" along with "sort fields" to
select desired records..the code goes like this..
.
.
//SYSIN DD *
SORT FIELDS=()
INCLUDE COND=()
END

In these cases, the SORT utility accepts one or more input
files and produces an output file which will contain the
desired records..

The IBM standard syntax of the sort command is given below..

SORT FIELDS=({begcol},{length},{fieldtype},{D|A}[,{begcol},
{length},{fieldtype},{D|A}]...)

INCLUDE COND=({begcol1},{length1},{fldtype1},{comp.oper},
{begcol2},{length2},{fldtype2})

Hope you got something from this explanation..

Is This Answer Correct ?    13 Yes 2 No