Bigint comparision in DataStage 7.1

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
s_boyapati
Premium Member
Premium Member
Posts: 70
Joined: Thu Aug 14, 2003 6:24 am
Contact:

Bigint comparision in DataStage 7.1

Post by s_boyapati »

Hi Guys,
Anyone has idea that how to compare two bigint numbers. for example (x = y), both x and y bigint with 20 digits. even if both are equal it is not resulting true. How can I solve this?

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

Post by ray.wurlod »

1. Change your configuration so that the EXACTNUMERIC parameter is rather more than 20. It can be as high as 57.

2. Use the Compare function. Look for it in on-line help or in the BASIC manual or in TCL-level help (HELP BASIC COMPARE).

3. Use subtraction and check for a zero result.

4. Use string-math subtraction (SSUB). You can compare million digit "numbers" with these functions. Again, check for a zero result. Look for SSUB in the BASIC manual or in TCL-level HELP.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
As Ray pointed your best way to compare them is using character comparison.
We found that there is a problem when writing to a sequential file numbers with more then 15 digits (any more means the least siginificant ones are zeroed (hash files works fine).
Alas using the EXACTNUMERIC doesn't work for now.
We have an open case with ascential regarding big numbers and it is being worked on, hopefully they'll have it fixed soon.
a workaround for having seq files with the acual big number is to use a transformer and change the data type to char(20).

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
Post Reply