----+----1----+----2----+----3----+----4----+----5----+----6----+
***************************** Top of Data ***********************
R11111111111110000003 ZZZZZZZZ AAAAAP0000A0000000001ZZZZZZZZ
R11111111111110000004 ZZZZZZZZ AAAAAP0000A0000000001ZZZZZZZZ
R11111111111110000005 ZZZZZZZZ BBBBBP0000A0000000001ZZZZZZZZ
R11111111111110000005 ZZZZZZZZ BBBBBP0000A0000000001ZZZZZZZZ
R11111111111110000005 ZZZZZZZZ BBBBBP0000A0000000001ZZZZZZZZ
R11111111111110000005 ZZZZZZZZ CCCCCP0000A0000000001ZZZZZZZZ
R11111111111110000005 ZZZZZZZZ CCCCCP0000A0000000001ZZZZZZZZ
R22222222222230000001 ZZZZZZZZ AAAAAP0000A0000000001ZZZZZZZZ
R22222222222230000002 ZZZZZZZZ AAAAAP0000A0000000001ZZZZZZZZ
***************************** Top of Data ***********************
R11111111111110000003 ZZZZZZZZ AAAAAP0000A0000000001ZZZZZZZZ
R11111111111110000004 ZZZZZZZZ AAAAAP0000A0000000001ZZZZZZZZ
R11111111111110000005 ZZZZZZZZ BBBBBP0000A0000000001ZZZZZZZZ
R11111111111110000005 ZZZZZZZZ BBBBBP0000A0000000001ZZZZZZZZ
R11111111111110000005 ZZZZZZZZ BBBBBP0000A0000000001ZZZZZZZZ
R11111111111110000005 ZZZZZZZZ CCCCCP0000A0000000001ZZZZZZZZ
R11111111111110000005 ZZZZZZZZ CCCCCP0000A0000000001ZZZZZZZZ
R22222222222230000001 ZZZZZZZZ AAAAAP0000A0000000001ZZZZZZZZ
R22222222222230000002 ZZZZZZZZ AAAAAP0000A0000000001ZZZZZZZZ
EXPECTED OUTPUT:
----+----1----+----2----+----3----+----4----+----5----+----6----+
***************************** Top of Data ***********************
R11111111111110000003 ZZZZZZZZ AAAAAP0000A0000000002ZZZZZZZZ
R11111111111110000005 ZZZZZZZZ BBBBBP0000A0000000003ZZZZZZZZ
R11111111111110000005 ZZZZZZZZ CCCCCP0000A0000000002ZZZZZZZZ
R22222222222230000001 ZZZZZZZZ AAAAAP0000A0000000002ZZZZZZZZ
***************************** Top of Data ***********************
R11111111111110000003 ZZZZZZZZ AAAAAP0000A0000000002ZZZZZZZZ
R11111111111110000005 ZZZZZZZZ BBBBBP0000A0000000003ZZZZZZZZ
R11111111111110000005 ZZZZZZZZ CCCCCP0000A0000000002ZZZZZZZZ
R22222222222230000001 ZZZZZZZZ AAAAAP0000A0000000002ZZZZZZZZ
Hi, i have input file in the above format with positions below
2-14: emp code
36-40: dept no
47-55: emp sal
i am trying to do with the sort , but i am not getting required result. Below is the sort card i am using
//SYSIN DD *
SORT FIELDS=(2,13,CH,A,13,5,CH,A)
SUM FIELDS=(47,9,ZD)
/*
SORT FIELDS=(2,13,CH,A,13,5,CH,A)
SUM FIELDS=(47,9,ZD)
/*
could you pls suggest how can i get the required result using sort.