I am reading a ( Empdet.csv )sequential file with the below columns
EmpNo,EName,Salary,DeptNo
1,SAM,40000,10
2,RAM,50000,20
3,RAJ,30000,30
4,ALI,20000,40
Columns datatype is defined as CHAR for all the fields
with the Format properties as Final Delimiter = End
Delimiter = comma
Quote = none
I am able to read the file properly with the above settings.
My requirement is to reject the data to a reject file when the layout is not same.
EmpNo,EName,Salary,DeptNo
1,SAM,40000,10
2,RAM,50000,20
3,RAJ, 25000, 30, B
4,ALI,20000,40
5,TONY,55000,50,A
I want to reject the 3 and 5 records in above file. I have a issue , when i tried to view data (3 and 5 records) its appearing as
EmpNo,EName,Salary,DeptNo
3,RAJ, 25000, 30, B
5,TONY,55000,50,A
30,B and 50,A in the Deptno field. I have set the reject mode = output property
what properties should i change to reject the data to a file?
Sequential file read error
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Thanks Ray.
I have added the reject link to a sequential file to capture the rejects. The issue here is records are not getting rejected to the reject file. It gets processed as a good record and is loaded into the target.
The below 2 records ( that does not fit the layout)flows into the target along with the good records
EmpNo,EName,Salary,DeptNo
3,RAJ, 25000, 30, B
5,TONY,55000,50,A
the last field Deptno takes up the values which is wrong.
30,B and 50,A
Please help me to correct the issue.
I have added the reject link to a sequential file to capture the rejects. The issue here is records are not getting rejected to the reject file. It gets processed as a good record and is loaded into the target.
The below 2 records ( that does not fit the layout)flows into the target along with the good records
EmpNo,EName,Salary,DeptNo
3,RAJ, 25000, 30, B
5,TONY,55000,50,A
the last field Deptno takes up the values which is wrong.
30,B and 50,A
Please help me to correct the issue.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Looks like it may be ignoring the Field Delimiter property. It shouldn't be.
Why not try defining the format as variable length (all strings are VarChar) and using a Transformer or Filter stage to trap the rejects? This has the advantage that the filtering is done in parallel.
Why not try defining the format as variable length (all strings are VarChar) and using a Transformer or Filter stage to trap the rejects? This has the advantage that the filtering is done in parallel.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.