Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Sort a flat file.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Wed Apr 09, 2008 12:08 pm    Post subject: Sort a flat file.
Reply with quote

Hi ,

I am sorting a flat file.

EX Sort the INFILE on 1-2 columns in asc order.
INFILE :
01AA
02AA
01BB
02BB
02CC
01CC

This is the output
OUTFILE :
01AA
01CC
01BB
02BB
02CC
02AA

Note : the above file does satisfy the sort criteria, but it has also disturbed the original order of input recs.

Expected output

OUTFILE :
01AA
01BB
01CC
02AA
02BB
02CC

I am not able to understand why the remaining sequence is getting disturbed.

Is this something which does on its own and it can't be handled without manipulating the data.

Thanks,
-Kapil.
Back to top
View user's profile Send private message

hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Wed Apr 09, 2008 12:37 pm    Post subject: Reply to: Sort a flat file.
Reply with quote

I got the solutions guys....

There is an option in SORT.
NOEQUALS , EQUALS

Thanks,
-Kapil.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Apr 09, 2008 8:36 pm    Post subject:
Reply with quote

Right. If you want duplicate records in their original order, specify the EQUALS option, e.g.

Code:

//SYSIN DD *
   OPTION EQUALS
   ...
/*


If EQUALS is in effect, the duplicate records are kept in their original order. If NOEQUALS is in effect, the duplicate records can be in any order.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts COB2 file processing rizwanaccy COBOL Programming 8 Tue Jan 02, 2018 1:00 pm
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts Preserve order in Input File pshongal DFSORT/ICETOOL 13 Thu Dec 21, 2017 4:20 pm
No new posts SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us