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
whats the diff bw the evaluate also and and?
Explain how can the disposition of sysout datasets be set for an entire jobstream?
Hello Guys, I have 1+ Year Experience in MAINFRAME TESTING. After 1 Week I have an Interview With a Company on Mainframe Testing. Please Could You Guys Please Suggest me What Sections Should I prepare ?? ___Tell Me the Topic Or Appropriate Site & Links. ?? ---------------Thank You
Can we call instream to catalog and catalog to instream?
We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?
what happens when COND is coded in JOB statement and when COND is coded inside EXEC statement?
Name the parameters which can be used to limit the number of records written to a sysout dataset?
what is the purpose of coding notify parameter in job statement?
How dummy is used in jcl?
I have mainpgm(abc) this is the only cobol pgm(non-db2).And this pgm calling subpgm name "acd" this also only cobol(non- Db)and this pgm calling some other subpgm this pgm has cobol-db2 pgm. 1) IF you calling static mode how to run and how to compile? 2) IF you calling dynamic mode how to run and how to compile? plz suggestion me.
define cond parameter in jcl?
when does a dataset go uncataloged?
Explain the function of a dd statement?
why should SYSIN DD * statement should not be included inside a PROCedure snippet??? please answer this.. i need to know.
What are s0c1, s0c4, s0c5, s0c7 and socb?