Data Conversion.

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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Is the source a text file?
What version of DataStage are you using? (This affects the possible replies to your question.)
Take a look in the Routines branch of your Repository, under the SDKDataType category; you may find something there that is useful.

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Your source stage sizes are only valid if these are some form of packed decimal fields, as in:

Prior_Amt Pic S9(7)V9(02) COMP-3
Ytd_Sales Pic S9(7)V9(04) COMP-3

Otherwise, they can be 10 and 12 respectively.

The Target types are the easiest, just define them as decimals large enough to hold the result and with the correct scale. Don't forget the 'V' is an *implied* decimal point. Based on the correct type, as Ray points out, the routines you need are in the SDK.

-craig
inter5566
Premium Member
Premium Member
Posts: 57
Joined: Tue Jun 10, 2003 1:51 pm
Location: US - Midwest

Post by inter5566 »

Not to be "nit-picking" but with the syntax you used to originally define these variables, they will be zoned numeric in EBCDIC and the first one will be char(9) and the second char(11). The lengths of 10 and 12 only hold true if you had stated that "sign is [leading/trailing] separate".

Regardless, all three types(packed decimal, zoned numeric,and binary) can be successfuly converted by means of the SDK routines.

If you need more info than this, we need more specifics about your situation.

Steve
Post Reply