function that returns the datatype

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
shyam_etl
Premium Member
Premium Member
Posts: 8
Joined: Mon Aug 22, 2005 3:34 am

function that returns the datatype

Post by shyam_etl »

Is there a function in datastage that returns the datype (sqltype) of a field value as interpreted by the source during extraction?

Cheers,
Shyam
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

At this point in time you need to define your column names and data types when you develop the job. If your source is a database table then the expectation is the metadata on the table does not change, if it does change the DataStage job needs to be changed.

If your source is a text file or your database field is free text you can use functions and routines to examine the contents of each column to see if they match the anticipated data type. You can reject or default rows that have invalid text.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: function that returns the datatype

Post by ray.wurlod »

shyam_etl wrote:Is there a function in datastage that returns the datype (sqltype) of a field value as interpreted by the source during extraction?

Cheers,
Shyam
No.

DataStage is driven by the metadata. Therefore metadata need to be constant at run time.

The information could be "hacked" from the design information in the Repository at run time, but this approach is fraught with danger, as it uses undocumented structures.

There are no supplied interfaces for extracting this information.
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