Posted: Fri Oct 06, 2017 8:49 am Post subject: Sort - Excluding groups based on condition
Input file:
Code:
1ABC-001
ABC TOTAL 1
0 12,300
ABC TOTAL 2
0 13,345
1ABC-002
ABC TOTAL 1
0 16,300
ABC TOTAL 2
0 17,345
ABC TOTAL 3
0 14,395
Output file :
Code:
12,300
13,345
14,395
Description :
Input is report file containing 133 length and output is flat file containing 133 length.
Scenario :
1) If 'ABC TOTAL 1' found in report 'ABC-001',then amount should be populated in output file.
The 'ABC TOTAL 1' in report 'ABC-002' should be skipped/excluded.
2) If 'ABC TOTAL 2' found in report 'ABC-001',then amount should be populated in output file.
The 'ABC TOTAL 2' in report 'ABC-002' should be skipped/excluded.
3) If 'ABC TOTAL 3' found in report 'ABC-001',then amount should be populated in output file.
The 'ABC TOTAL 3' in report 'ABC-002' should be skipped/excluded.
4) If 'ABC TOTAL 1' is not found in report 'ABC-001',then amount has to be picked from 'ABC TOTAL 1' in report 'ABC-002'.
5) If 'ABC TOTAL 2' is not found in report 'ABC-001',then amount has to be picked from 'ABC TOTAL 2' in report 'ABC-002'.
6) If 'ABC TOTAL 3' is not found in report 'ABC-001',then amount has to be picked from 'ABC TOTAL 3' in report 'ABC-002'.
Joined: 26 Nov 2002 Posts: 12358 Topics: 75 Location: San Jose
Posted: Mon Oct 09, 2017 8:50 am Post subject:
Magesh_J wrote:
Hi Kolusu,
I think it should be 4,130?
Code:
REMOVECC,SECTIONS=(142,11,HEADER3=(4,130))
Thanks
Magesh
Op wanted the output to be 133 bytes. So i just wrote out the entire record. He can change accordingly. _________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum