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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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