Decimal Data Changed to Zero
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 50
- Joined: Fri Aug 29, 2014 1:32 pm
- Location: Mumbai
Decimal Data Changed to Zero
I am Taking Data from flatfile and loading to sequentual file. In flat file it is just a single column which I am dividing into many columns based on requirment. In one case i have to pick data from 21st to 25th char of source file and have to save it as decimal in target.
For Example, the data is '+2014' i need to store it as decimal. So I created a Decimal column and saved 21st to 25th char of source file in that column. but the data is getting saved as '00000.' instead of '2014.' or '02014.'.
Please help me. Please let me know what am I doing wrong here?
For Example, the data is '+2014' i need to store it as decimal. So I created a Decimal column and saved 21st to 25th char of source file in that column. but the data is getting saved as '00000.' instead of '2014.' or '02014.'.
Please help me. Please let me know what am I doing wrong here?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 50
- Joined: Fri Aug 29, 2014 1:32 pm
- Location: Mumbai
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The second argument is length, not finishing position. Try:
Code: Select all
Table_Read.Source_Col[21,5]
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.
-
- Participant
- Posts: 50
- Joined: Fri Aug 29, 2014 1:32 pm
- Location: Mumbai