How to save Soruce/Output Seq File Table def to a word file?

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
DS_MJ
Participant
Posts: 157
Joined: Wed Feb 02, 2005 10:00 am

How to save Soruce/Output Seq File Table def to a word file?

Post by DS_MJ »

Hello:

Is there a way to save the table definitions used in Datastage Server 7.5 to a word or text format....?

When I generate a report using Datastage I am able to get the input or source colums saved as text files ....however the output files are not so straight forward.....(go figure...) some of the output columns are straight maps and some are derived columns. In the report these derived columns are displayed but they dont show up in the right order as in the output view. So this is out of the window.....

Need to find a easier way to get the source and output columns to be save as word or text......Any suggestions would be highly appreciated.

The reason I want to do this is because we want to compare Mainframe table definitions, Server table definitions, DDL that the company gave and the DB2 tables.

Thanks in advance and would appreciate any response at the earliest convenient time.

MJ
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You can export the table definitions (from the manager -> Export -> DataStage Components and then choose table definitions) into an XML formatted file, an excerpt of the output look like:
<Property Name="Name">IDIATCTY</Property>
<Property Name="Description" PreFormatted="1">CITY CODE Searchable? N\(20)</Property>
<Property Name="SqlType">1</Property>
<Property Name="Precision">3</Property>
<Property Name="Scale">0</Property>
<Property Name="Nullable">0</Property>
<Property Name="KeyPosition">0</Property>
<Property Name="DisplaySize">3</Property>
<Property Name="PadChar" />
With very little manipulation this can be formatted any way you wish. Heck, you could even write a short DataStage job to do this.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Take a look at DataStage's reporting tool in Manager.
DS_MJ
Participant
Posts: 157
Joined: Wed Feb 02, 2005 10:00 am

Post by DS_MJ »

ArndW wrote:You can export the table definitions (from the manager -> Export -> DataStage Components and then choose table definitions) into an XML formatted file, an excerpt of the output look like:
<Property Name="Name">IDIATCTY</Property>
<Property Name="Description" PreFormatted="1">CITY CODE Searchable? N\(20)</Property>
<Property Name="SqlType">1</Property>
<Property Name="Precision">3</Property>
<Property Name="Scale">0</Property>
<Property Name="Nullable">0</Property>
<Property Name="KeyPosition">0</Property>
<Property Name="DisplaySize">3</Property>
<Property Name="PadChar" />
With very little manipulation this can be formatted any way you wish. Heck, you could even write a short DataStage job to do this.
hi ArndW/Sainath.Srinivasan:

Thanks for the prompt reply, I export it as XML and shows as above ... but would appreciate it if could you show me what manipulation can be done....?


As for using DataStage Reporting tool... I already used but as mentioned above having problems displaying the output columns (straight map thrus and derived columns) in the correct order as seen from the view tables since they show up as 2 seperate tables.

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

Post by ray.wurlod »

There was a routine posted some time ago for dumping a table definition in CSV, XML or IMF format. Search for it. (IMF format is used by QualityStage.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DS_MJ
Participant
Posts: 157
Joined: Wed Feb 02, 2005 10:00 am

Post by DS_MJ »

ray.wurlod wrote:There was a routine posted some time ago for dumping a table definition in CSV, XML or IMF format. Search for it. (IMF format is used by QualityStage.)
Hi Ray:

There was a link but it say that that topic is no longer avaliable hence unable to download your code.

MJ
DS_MJ
Participant
Posts: 157
Joined: Wed Feb 02, 2005 10:00 am

Post by DS_MJ »

the Link:

The link is viewtopic.php?t=85791 .
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That's the one.

Create a new server job.
Fill in the short and long description fields.
Paste the code into the Job Control tab in Job Properties.
Create the ten job parameters mentioned in the code.
Put an annotation in the canvas to warn future developers that this job consists solely of job control code.
Compile, run and marvel! :D
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I took Ray's code and created a routine named KgdCreateDdlMetadata. This will create the DDL to create a table from these records. It sounds like you already have the DDL on one side. This routine has been posted already but if you cannot find it then I will post it again.
Mamu Kim
DS_MJ
Participant
Posts: 157
Joined: Wed Feb 02, 2005 10:00 am

Post by DS_MJ »

Hi Ray and kduke:

I cannot access the routine when I click on that link... it gives the following message:

"The topic or post you requested does not exist " :(

kduke, would appreciate if you could re-post that routine again.

Thank you much in advance.

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

Post by kduke »

It is on my tips page.
Mamu Kim
DS_MJ
Participant
Posts: 157
Joined: Wed Feb 02, 2005 10:00 am

Post by DS_MJ »

Thank you much kduke........MJ :)
Post Reply