Computation of Field

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
JezT
Participant
Posts: 75
Joined: Wed Sep 15, 2004 1:52 am

Computation of Field

Post by JezT »

I am running a job that produces a three column file. One of the columns is a 10-digit Customer Number that has leading zeros if the number is not 10-digits long. This file is then transferred to another department for them to input on to their system.

They have requested that the Customer Number field by computated before being sent. Is this possible within DataStage ?

I understand that a computated number is similar to a packed decimal but unfortunately, that is about as far as my Cobol knowledge goes !
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
If you'll find out what you need to do in order to get the number "computed" people here might be able to help you, since I don't think anyone can with the insuficiant info you posted.
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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If all you want is leading zeroes, you can use the FMT function.

Code: Select all

Fmt(InLink.TheNumber, "R%10")
While this is not a computed field in the COBOL sense, I suspect that all your users are requiring is "computation" of the leading zeroes.
Otherwise, ask the other department to be more specific!
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