Page 1 of 1
How to Separate Odd or Even numbers using DFSORT
Posted: Fri Oct 04, 2013 4:40 pm
Is that possible to separate even numbers into one file and odd numbers into another file using DFSORT
my input file is
my output files should be
ODD output file
EVEN output file
Please can anyone help on this.
Posted: Fri Oct 04, 2013 5:16 pm
You got 2 solutions yesterday on another forum and, today, a clarification from a DFSort developer as to why one was better than the other. Why are you posting again today here? That is not very polite and is, essentially, against the rules.
Posted: Fri Oct 04, 2013 7:15 pm
Before putting into forum,i have searched the web,but i got answer for position wise i.e odd records will be in one file and evenrecords in another file,but i want to separation on numbers not a position wise.
if you are specifying about the separation by numbers ,could you please paste the link.
Thanks in advance
Posted: Fri Oct 04, 2013 9:43 pm
Suggest you re-read the other answers.
IIRC, there was an explanation of how to do what you want . . .
Posted: Fri Oct 04, 2013 9:56 pm
I think this is not a cross-posting, but a co-incidence.
Code: Select all
This is looking at the right-most bit of the right-most byte of your number. If that bit is zero, your number is even. Otherwise it is odd (as bits can only be zero or one).
Posted: Mon Oct 07, 2013 10:47 am
Thanks a lot William Collins
once again thanks for your quick reply:)