schema
Moderators: chulett, rschirm, roy
schema
I am trying to run a job which uses fixed length file. I get an error on the filesize/rec length. I am using a record length of 21 and I have also tried 22. How do I get this job to run? Does the schema below look good?
Schema
record
{record_length=fixed, delim=none, quote=none}
(
LName:string[max=10] {width=10};
FName:string[max=10] {width=10};
Initial:string[max=1] {width=1};
)
Data is like(3 records below) :
RAY FITZGERALD HIGGINS MICHAEL ORLOW JANICE H
Schema
record
{record_length=fixed, delim=none, quote=none}
(
LName:string[max=10] {width=10};
FName:string[max=10] {width=10};
Initial:string[max=1] {width=1};
)
Data is like(3 records below) :
RAY FITZGERALD HIGGINS MICHAEL ORLOW JANICE H
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Your data do not match your metadata, or the phpBB software has removed your spaces. I assume that you mean your data look like
RAY......FITZGERALD HIGGINS.. MICHAEL.. ORLOW.... JANICE... H
What have you specified as:
record delimiter
field delimiter
record length?
Try record length = fixed
RAY......FITZGERALD HIGGINS.. MICHAEL.. ORLOW.... JANICE... H
What have you specified as:
record delimiter
field delimiter
record length?
Try record length = fixed
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: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It's not what I think that matters. It's what DataStage thinks.
Please review your record level and field level properties carefully - you did not answer my suggestion about record length = fixed, for example.
Please review your record level and field level properties carefully - you did not answer my suggestion about record length = fixed, for example.
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: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 224
- Joined: Tue Sep 24, 2002 7:32 am
- Location: Denver, CO USA
It appears that you have a fixed width file with no line termination. Is that what you have set in the stage? In your example, are you using a period "." to designate a space?
John
If that is true then your schema is correct if you are using no line termination. Only you can really look at the file and you should do that with a text editor that can show hex like UltraEdit.RAY.......FITZGERALD.HIGGINS...MICHAEL....ORLOW.....JANICE....H
John
-
- Premium Member
- Posts: 224
- Joined: Tue Sep 24, 2002 7:32 am
- Location: Denver, CO USA
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Yes, I am using a sequential stage. And I have tried setting the record delimiter to none.
I get the following error.
Bad record delimiter after fixed-length record: expected "none", got "HIGG"
Either my data is wrong or my schema is and I am having a tough time figuring it out.
FYI: I have checked my data innumerable number of times.
I get the following error.
Bad record delimiter after fixed-length record: expected "none", got "HIGG"
Either my data is wrong or my schema is and I am having a tough time figuring it out.
FYI: I have checked my data innumerable number of times.
-
- Premium Member
- Posts: 224
- Joined: Tue Sep 24, 2002 7:32 am
- Location: Denver, CO USA
On 7.5.2, the Format tab of the Sequential File Stage related to the Record Delimiter states:
John
So instead of None (or blank) as the record delimiter, try removing this property altogether. Please verify that the 3 columns add up to 21.For fixed-width files with no explicit record delimiter, remove this property altogether.
John