0% found this document useful (0 votes)
49 views1 page

Q 162 What Is SORT

SORT is a utility that sorts records in files in ascending or descending order. It can eliminate duplicate records by using SORT FIELDS=COPY and SUM FIELDS=NONE. SORT can also select specific records using INCLUDE COND to define a condition, along with SORT FIELDS to define the sorting criteria.

Uploaded by

ThadojuRammurthy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views1 page

Q 162 What Is SORT

SORT is a utility that sorts records in files in ascending or descending order. It can eliminate duplicate records by using SORT FIELDS=COPY and SUM FIELDS=NONE. SORT can also select specific records using INCLUDE COND to define a condition, along with SORT FIELDS to define the sorting criteria.

Uploaded by

ThadojuRammurthy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

What is SORT ? How do we eliminate duplicate records ?

How do I
select some records using SORT ?
---sort is a sorting of records either in asc/ des order,
---sort field(6,10,ch,ASC) or sort field(6,10,ch,ASC),equal
sum field none
---sort field(6,10,ch,Asc) 6 is the starting position
10 record length
ch for alpnum (X)
asc order of sorting
# 1 ---sort is a sorting of records either in asc/ des order,
---sort field(6,10,A,CH) or sort field(6,10,A,CH),equal
sum field none
---sort field(6,10,A,CH) 6 is the starting position
10 record length
ch for alpnum (X)
A order of sorting
SORT is used to sort the data in asending or diseding order. by using sort we can copy
data from one file to another file. by using some fields=none
SORT is a utility i.e 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 listgoes 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..

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy