Change a 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
amirse
Participant
Posts: 3
Joined: Thu Jan 29, 2004 8:54 am
Location: Israel

Change a datatype

Post by amirse »

I need to change field datatype from integer(9) to decimal(10) .
is there a way to locate all the relevant places in the project that should be changed ? or I need to manually seek for them ?

Thanks,
Amir
denzilsyb
Participant
Posts: 186
Joined: Mon Sep 22, 2003 7:38 am
Location: South Africa
Contact:

Post by denzilsyb »

I am not aware of a cascading function like that, but you could do one of two things (what I would do):

1. save the new table definition and load the new definition where appropriate or

2. when you read from the database, convert the datatype to what you have it as - provided this doesnt interfere with what you need to do with the data.

hope it helps

dnzl
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

Hi amrise,

Doing like denzil proposed all derivations which you might have made are also swift away so manualy changing it everywhere may be the better solution. If you have no changed derivations you could do so.

One not supported way of changing it would be:

Do an export of the relevant jobs
Open the Export-file in an editor (for example MS-Word)
Do an change over the whole file
Save the file as a new Name (for to save the old version)
Import the new *.dsx file

That should it be.
Be very carefully by doing so.

Wolfgang
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

I have a tool that will search a dsx for all occurrances of a string, and report the category and job name where the string was found. If this data type change is associated with a column name or table name, you could search for it, and get a short list of jobs to review.

With any luck, I will post it on www.anotheritco.com today. It should work at revision 6 and above.

Chuck
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I posted some queries in the past to look for a table name in Reporting Assistant. You could search for those. You could also use MetaStage. What you are looking for is a specific table in an Oracle, ODBC or some specific stage type. You need to develop some type of methodology which you are comfortable with and use it over and over. The doc_tool.mdb which comes with Reporting Assistant or MetaStage or write your own.

I wrote DwNav to help me do exactly this. It will show you all tables by stage type and all the jobs that updated or read from those tables. Very easy to use and trace from source to target through all your jobs. It will producted html documentation also showing these relationships. I like it. I use it all the time.

Choose a methodology and stick to it. Everyone has their favorites.
Mamu Kim
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

I posted two new tools last night. SearchDsx searches a DataStage DSExport file for a sting, and ListFilesAndTablesFromDsx list mosts, if not all, file and table names used by each job and category. These tools are for version 6 and beyond. They work best if you export your job designs and routines to a DSExport file, and then use that file as input to the tools.

Follow the DataStage Tools link at www.anotheritco.com .

Chuck
Post Reply