Vidyarthi Beginner

Joined: 12 Jan 2006 Posts: 2 Topics: 1 Location: Hyderabad
|
Posted: Thu Oct 05, 2006 7:38 pm Post subject: Criteria based Sorting |
|
|
Hi,
I have a question regarding sorting the input recrods based on some criteria.
Eg; If my 1st 3 bytes of the record is 'XYZ' sort on fileds from 10-15, if my 1st 3 byes are 'abc' sort on fields 20-30.
This is can be accomplished in multiple steps using Outfil. Could you please let me know if it can be accomplished in single step (Some way using IF in the sort control statements).
Thanks,
Vidyarthi..
Please find the exact scenario below.
The end result that I'm looking for is:
If the first 3 chars are 000, 001, 999 it should be sorted on 10-16
if it is 002,003 it should be sorted on 18-24
Thank you in advance.
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
000 2006103120061031126060VISA 001
001003451200000000000145120000000000022006100120061031E451299999999 V
002451200000000000145120000000000022006100120061031EEVAAAAAAAAAA
003451200000000000145120000000000022006100120061031EEVYYYYYYYYYYYYY
001003451200000000000345120000000000042006100120061031E451299999999 V
002451200000000000345120000000000042006100120061031EEVBBBBBBBBBB
003451200000000000345120000000000042006100120061031EEVYYYYYYYYYYYYY
001003451200000000000545120000000000062006100120061031E451299999999 V
002451200000000000545120000000000062006100120061031EEVCCCCCCCCCC
003451200000000000545120000000000062006100120061031EEVYYYYYYYYYYYYY
001003451200000000000745120000000000082006100120061031E451299999999 V
002451200000000000745120000000000082006100120061031EEVDDDDDDDDDD
003451200000000000745120000000000082006100120061031EEVYYYYYYYYYYYYY
001003451200000000000945120000000000102006100120061031E451299999999 V
002451200000000000945120000000000102006100120061031EEVEEEEEEEEEE
003451200000000000945120000000000102006100120061031EEVYYYYYYYYYYYYY
9990000001000000100000010000001 |
|