I am not able to read fixed width file from sequential file stage
for Example
My Source file is
14.22 decimal(2,2)
7.4(decimal1,1)
abc(char 3)
Error Message:record_length=fixed" (no length given) and record field format is variable-length
i have tried to read source as all char type and converting decimal in first two filelds but when i am reading first column 14.22 (char 5) and my target is decimal(2,2). when i run the job warning is truncation in field.
please suggest how to read .
Thanks in advance
Reading Fixed width file
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 81
- Joined: Thu Nov 30, 2006 7:46 am
- Location: india
Reading Fixed width file
MALLI
Based on what you wrote in your post, you might be misunderstanding how the decimal attribute is applied to the data. For example, your first field (if I read you correctly) should be (4,2), not (2,2). Your field length is four with two positions to the right of the decimal. If I'm correct, that's why you get the truncation warning.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The actual field widths must be recorded in the Display Width field of the table definition. Use the Sequential File table definition importer and specify Fixed Width as the format and enter the field widths right there. Then use the imported table definition in your job.
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.