SORT

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
156138
Member
Posts: 15
Joined: Tue Aug 29, 2006 7:27 pm
Location: Chennai

SORT

Post by 156138 » Tue Nov 28, 2006 10:00 pm

When using sort to remove the duplicate records, i.e. PGM=SORT with a SYSIN containing a SORT statement and SUM FIELDS=NONE, which record will be kept?

Suppose if i have 20 records with the same key which record do you think that will be written into output. Is it first or something????
Regards,
Vinod Reddy.

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Tue Nov 28, 2006 10:32 pm

If EQUALS is in effect, then the first record of each set of duplicates will be kept. If NOEQUALS is in effect, then any record of each set of duplicates can be kept. You can specify EQUALS for DFSORT like this:

Code: Select all

//DFSPARM DD *
   OPTION EQUALS
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

academyindia4

Topic deleted by Admin

Post by academyindia4 » Fri Jan 15, 2016 9:53 pm

<< Content deleted By Admin >>

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others