Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / anoopkumarg

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=(<give sort condition here>)
INCLUDE COND=(<give the required condition here>)
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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention the types of job control statements?

1129


What is the function of job statement in jcl?

1046


Which statement is used to identify the private libraries in job?

1136


How to do automated restart when a job abend?

1303


Explain the purpose of dd * statement in jcl?

1019


how JCL works?

1218


Can I send output of job to my remote device careerride123?

1087


What is the function of the dd dcb keyword?

1283


How to pass the parameter in parm using linkage section ? (syntax)?

1081


How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.

5482


define cond parameter in jcl?

1227


Must tape dataset definitions include vol=ser specifications?

1662


Name the statement which can be used to send data to another mvs jes3 node?

1131


How do you run a COBOL batch program from a JCL? How do you run a COBOL/DB2 program?

1202


which parameter is used to check the syntax of a jcl without executing it?

1316