Page 1 of 1

Short Input record

Posted: Thu Jan 14, 2010 7:25 am
by Poovalingam
Hi,
I'm using schema file option in a job to propagate column in run time. I'm getting warning message as "Short Input record" at the sequential file stage where schema option specified and No records are getting import to next stage.

The warnings:
Sq_Source,0: Short input record
Sq_Source,0: Import was unsuccessful at record 0; continuing.

Pls help me to resolve the issue.


Thanks & Regards,
Poova.

Posted: Thu Jan 14, 2010 8:31 am
by chulett
Your schema file doesn't match the input file. Specifically, there's more columns in the schema than in the file or you may have a delimiter issue.

Posted: Thu Jan 14, 2010 3:38 pm
by ray.wurlod
Since the problem was at record 0, you might also consider checking whether First Line is Column Names is set correctly.

Posted: Wed Jan 20, 2010 12:59 am
by Poovalingam
Thanks Ray & Craig..

My records were correct.

I have got a solution. I'm having some varchar field in my sequential file whcih I saved as a table definition and used it for schema file. I have specfied null values for many column as empty spaces. If i give any null value for varchar field, the schema entries in the table definitions are coming with a keyword "Prefix" apart from Nullable spaces. For other nullale data type it is not coming.

For example in schema file,
column_name nullable Varchar[4]: Null...={ },Prefix={ };
column_name1 nullable decimal[3,2]: Null..{ };

I manually removed the Prefix variable in my schema file and used the schema file for loading it into oracle table and it worked fine. But the same job if i try with the schema file having Prefix variable it is not working.

Posted: Wed Jan 20, 2010 5:42 am
by Poovalingam
Hi,
Can anybody faced above scenario before when using schema file?
Kindly let me know, if the above mentioned removal of variable "Prefix" from schema file will cause any problem for any other scenarios?

Thanks,
Poovalingam.

Posted: Wed Jan 20, 2010 5:47 am
by sureshreddy2009
I used schema files in my project, after creating schema files we removed prefixes, it does not failure any scenarios, no problem , please remove those prefix statements.
thanks

Posted: Wed Jan 20, 2010 6:00 am
by Poovalingam
Thanks..

Is this the case like, we should remove the "Prefixes" in any schema file and then only it will work?


Thanks,
Poova.

Posted: Wed Jan 20, 2010 6:08 am
by sureshreddy2009
Yes prefix statements must be removed

Posted: Wed Feb 10, 2010 5:44 pm
by truenorth
Can anyone please explain what this Prefix is all about? Why does DS put it there? And why does it cause problems?

Posted: Wed Feb 10, 2010 5:52 pm
by ray.wurlod
When a VarChar is stored, it is prefixed with a length. You can see this most easily by displaying the table definition as COBOL. The Prefix designator in a record schema indicates the size in bytes of this number. That information, in turn, is available to any import operator that needs to handle VarChar data.

I've never removed a Prefix designator and never had any problem. So I'm skeptical about your attribution of cause and effect; it's more likely to be a combination of factors - something you're doing in conjunction with the use of a Prefix designator in the record schema.

I'm curious - when you remove the Prefix designator, does the generated osh have, or not have, Prefix designator on that field? How about the record schema in the score?