Page 1 of 1

schema

Posted: Fri Apr 06, 2007 1:30 pm
by pp
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

Posted: Fri Apr 06, 2007 2:17 pm
by ccatania
If you are unable to view the data from the input source, try a different delimiter setting eg Tab. You may have to try different setting to find the one that works. You mentioned that your source is a flat file. check to see-if you can- what it looks like from where it's created.

Posted: Sat Apr 07, 2007 4:14 am
by ray.wurlod
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

Posted: Mon Apr 09, 2007 8:21 am
by pp
Yes, that's right. My data looks like:
RAY.......FITZGERALD.HIGGINS...MICHAEL....ORLOW.....JANICE....H

Do you still think my data does not match my schema?

Posted: Mon Apr 09, 2007 2:54 pm
by ray.wurlod
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.

Posted: Mon Apr 09, 2007 3:06 pm
by pp
What suggestion of yours about record length=fixed, did I not answer?

Posted: Mon Apr 09, 2007 3:11 pm
by ray.wurlod
You did not report whether you had tried setting the Record Length property to "Fixed".

Posted: Tue Apr 10, 2007 8:10 am
by pp
Please look at the very first posting. I have record_length set to fixed in my schema.

Posted: Tue Apr 10, 2007 8:38 am
by ds_developer
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?
RAY.......FITZGERALD.HIGGINS...MICHAEL....ORLOW.....JANICE....H
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.

John

Posted: Tue Apr 10, 2007 8:51 am
by pp
Yes, I am using a period to represent a space.
I have no line termination after the last record in my data. And I made sure there were no spaces after the last record.

I am still getting an error and I cannot get this job to run.

Posted: Tue Apr 10, 2007 9:08 am
by ds_developer
Are you using the Sequential File stage? Please post the error message.

John

Posted: Tue Apr 10, 2007 1:39 pm
by ray.wurlod
What is the record delimiter property set to? This needs to be "None".

Posted: Tue Apr 10, 2007 3:37 pm
by pp
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.

Posted: Tue Apr 10, 2007 4:24 pm
by ds_developer
On 7.5.2, the Format tab of the Sequential File Stage related to the Record Delimiter states:
For fixed-width files with no explicit record delimiter, remove this property altogether.
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.

John

Posted: Wed Apr 11, 2007 8:42 am
by pp
I have also tried removing the record delimiter property altogether.
And I have made sure that my columns are adding up to 21.

Inspite of this I get the same error as "Bad record delimiter after fixed-length record: expected "none", got "HIGG" ".