Short Input record

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Poovalingam
Participant
Posts: 111
Joined: Mon Nov 30, 2009 7:21 am
Location: Bangalore

Short Input record

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Since the problem was at record 0, you might also consider checking whether First Line is Column Names is set correctly.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Poovalingam
Participant
Posts: 111
Joined: Mon Nov 30, 2009 7:21 am
Location: Bangalore

Post 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.
Poovalingam
Participant
Posts: 111
Joined: Mon Nov 30, 2009 7:21 am
Location: Bangalore

Post 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.
sureshreddy2009
Participant
Posts: 62
Joined: Sat Mar 07, 2009 4:59 am
Location: Chicago
Contact:

Post 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
Suresh Reddy
ETL Developer
Research Operations

"its important to know in which direction we are moving rather than where we are"
Poovalingam
Participant
Posts: 111
Joined: Mon Nov 30, 2009 7:21 am
Location: Bangalore

Post 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.
sureshreddy2009
Participant
Posts: 62
Joined: Sat Mar 07, 2009 4:59 am
Location: Chicago
Contact:

Post by sureshreddy2009 »

Yes prefix statements must be removed
Suresh Reddy
ETL Developer
Research Operations

"its important to know in which direction we are moving rather than where we are"
truenorth
Participant
Posts: 139
Joined: Mon Jan 18, 2010 4:59 pm
Location: San Antonio

Post by truenorth »

Can anyone please explain what this Prefix is all about? Why does DS put it there? And why does it cause problems?
Todd Ramirez
Sr Consultant, Data Quality
San Antonio TX
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply