Page 1 of 1

Posted: Tue Jul 27, 2010 6:12 am
by Sainath.Srinivasan
Use a reporting tool

Posted: Tue Jul 27, 2010 6:13 am
by chulett
Let's get the first comment that you were going to get from someone out of the way - DataStage is an ETL tool, not a BI tool and what you have is not an ETL task. Does your company not have access to a BI tool, some kind of 'report writer' that would do a proper job of this?

Otherwise what you have is a sorting issue. Add fields to the flow that hold the page and line numbers which will allow you to generate the data in any convenient order. Then a sort stage can put them in the proper output order and you can drop those fields before the final write.

Posted: Tue Jul 27, 2010 10:16 am
by creatingfusion
create the header file in one sequential file seperately. then get the detail files as per yours requirement.
Then use shell script as after job subroutine to append the detail files to the header file.
I hope this would work fine as per yours requirement.
To append the header and detail files you may use the following unix command in yours shell script.

cat header_file_name detail_file_name > output_file

Let me know if this serves yours requirement.

Abhijit

Posted: Wed Jul 28, 2010 11:41 am
by arunkumarmm
I believe he wants to write the header in all of his pages [??]. :idea:

Cant you include the header detail to your Pages 2 & 3 as you do it for your page 1??

If this is not what you are looking for, please post more details.

Posted: Wed Jul 28, 2010 2:53 pm
by Sainath.Srinivasan
If you really want to go down this route, extend the (psuedo) code below

Code: Select all

awk '{ if ((NR%49) == 1) printf("%s\n",yourHeader)} {printf("%s\n",$0) } ' yourFileName

Posted: Mon Aug 02, 2010 3:44 am
by arunpramanik
What about the page break?

Posted: Mon Aug 02, 2010 8:11 am
by Sainath.Srinivasan
arunpramanik wrote:What about the page break?
What about it ?