Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us