Sorting a FB file
Posted: Thu Jul 02, 2009 5:14 pm
Hello,
My i/p file is having following records:
5
98
8
27
1
when we view this doing "hex-on" it shows trailing nulls after the actual values, like this:
5
F4444444444444
50000000000000
--------------
98
FF444444444444
98000000000000
--------------
8
F4444444444444
80000000000000
--------------
27
FF444444444444
27000000000000
when I am using following sort card for this to get the correct sorted data:
//SYSIN DD *
SORT FIELDS=(1,2,CH,A)
SUM FIELDS=NONE
/*
From this I am getting o/p as,
1
27
5
8
98
Meaning it is considering the first value "1" as "10" and similarly for others. But I want this to not consider the trailing nulls (meaning consider it as "1" only). Could any one suggest anything on this sothat I could get the following output in the correct sort order that i want(the length of i/p file is 80 and same is of o/p):
1
5
8
27
98
Please help.
My i/p file is having following records:
5
98
8
27
1
when we view this doing "hex-on" it shows trailing nulls after the actual values, like this:
5
F4444444444444
50000000000000
--------------
98
FF444444444444
98000000000000
--------------
8
F4444444444444
80000000000000
--------------
27
FF444444444444
27000000000000
when I am using following sort card for this to get the correct sorted data:
//SYSIN DD *
SORT FIELDS=(1,2,CH,A)
SUM FIELDS=NONE
/*
From this I am getting o/p as,
1
27
5
8
98
Meaning it is considering the first value "1" as "10" and similarly for others. But I want this to not consider the trailing nulls (meaning consider it as "1" only). Could any one suggest anything on this sothat I could get the following output in the correct sort order that i want(the length of i/p file is 80 and same is of o/p):
1
5
8
27
98
Please help.