Sequential file read error
Posted: Mon Feb 18, 2013 10:26 am
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?
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?