Any feature to create html output

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
mouthou
Participant
Posts: 208
Joined: Sun Jul 04, 2004 11:57 pm

Any feature to create html output

Post by mouthou »

Hi All,

Is there any feature in DS to put select query result in an html output file. There is set of XML features but not sure if HTML output can be created using DS. Appreciate your opinion if you have tried or any suggestion?


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

Post by ArndW »

I don't know of a specific feature to do this. While XML and HTML are quite similar and creating XML output and then modifying the result to change it to HTML, it is probably easier to add your start and end tags to the data manually. That is assuming you want to add simple formatting.
What sort of tags do you plan on adding?
MrBlack
Participant
Posts: 125
Joined: Wed Aug 08, 2012 8:57 am

Post by MrBlack »

Could you just create an XLST file so that when you view the XML file in a web browser you can get all the prettiness of an HTML file but the data is still XML. I'd be curious to know what you use case is for this because it sounds like you're starting to mix DATA (xml) with the UI (html).
mouthou
Participant
Posts: 208
Joined: Sun Jul 04, 2004 11:57 pm

Post by mouthou »

Hi MrBlack,

I am not getting your suggestion of XLST/XML in relevance to my scenario (as not dealing with XML data at all and XML wont be an issue in DS). My use case is to send the output of a query to .html file so that the target system can make of use it.

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

Post by ray.wurlod »

Convert all your output columns to VarChar, and derive them with begin and end element tags. That will get you very close.
Optionally use before-job and after-job subroutines to create headers and trailers.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mouthou
Participant
Posts: 208
Joined: Sun Jul 04, 2004 11:57 pm

Post by mouthou »

Thanks all for your responses. It looks there is some limitation while dealing with html source/target alone, unlike how IBM provided features for XML processing.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

There never has been much call for DataStage to create formal .hmtl..... probably because using xml with a stylesheet reference is a very powerful solution. Use DataStage to craft a valid xml document with embedded stylesheet reference, and then get as fancy as you want with the stylesheet. Far more powerful than trying to generally decide on what you might want for generic html formatting tag by tag by tag.

That being said, if it is just simple column display, following the rows and columns of your output link, then it is probably just as easy, as Ray noted, to "zap" in your desired html as formal strings inside of a transformer.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I had a routine in EtlStats which did what Ray describes. I don't think it works in newer versions. If you are outputting to a sequential file then you can concatenate all columns into one column. Then you could build a html header and footer record from a row generator then output all to a funnel stage. You need one extra column for record type. Sort by this. So a header is type 1. All records are type 2. Footer is type 3.

Should not be too hard.
Mamu Kim
Post Reply