Row out of sequence when it's in order ?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
kaps
Participant
Posts: 452
Joined: Tue May 10, 2005 12:36 pm

Row out of sequence when it's in order ?

Post by kaps »

Hi

I am aggregating about 30 million records and get the "row out of sequence" error even though it's in sorted order. Input is seq file.Input is already sorted and the order is mentioned in AGG.

Job desgin is...Input seq file(with filter command to sort the record passing to Aggregator and output seq file). I even removed the filter command and sorted it seprately. but facing the same problem.

When it encounter the second record in the following example it throws the error. Data Type is defined as BIGINT in aggregator.

89843731,x,x,x,x,x,x
241146165,x,x,x,x,x,

When I changed the data type to INTEGER it worked fine.
Does anyone know the reason ?

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No idea at all. BigInt and Int are treated as the same in DataStage BASIC. Is any of the values larger than 2^31-1 (which might cause an arithmetic overflow in an Int data type)?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kaps
Participant
Posts: 452
Joined: Tue May 10, 2005 12:36 pm

Post by kaps »

Ray

You are correct. 2^31 -1 is 2147483649 and the value I have is 241146165.

So I believe Bigint is 2^31 and integer is may be more than that.
Does not make sense to me that Integer is holding more value than Big Integer

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

BigInt and Int are treated as the same in DataStage BASIC.

Treat the column as VarChar.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jdmiceli
Premium Member
Premium Member
Posts: 309
Joined: Wed Feb 22, 2006 10:03 am
Location: Urbandale, IA

Post by jdmiceli »

Quick question, Ray:

If he treats it as a VARCHAR, aren't the numbers going to be ordered lexically as opposed to numerically. To me, it seems that is what the original example looks like.

Bestest!
Bestest!

John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services


"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, they will. When I've played these games, I make sure the string values are all the same length and zero padded to avoid the 'row out of sequence' error.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jdmiceli
Premium Member
Premium Member
Posts: 309
Joined: Wed Feb 22, 2006 10:03 am
Location: Urbandale, IA

Post by jdmiceli »

Great! Thanks for the clarification Craig. That makes perfect sense because as long as the target field is numeric, then the leading zeroes would just drop off during datatype conversion.

Bestest!
Bestest!

John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services


"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
Post Reply