generate report while through datastage JOB

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
arasan
Participant
Posts: 44
Joined: Wed Nov 30, 2005 3:54 am
Contact:

generate report while through datastage JOB

Post by arasan »

Can any one help me out on how to genarate a report during the job run.

for example

source >>>>trasformer>>>>>sequential file

source: emp table

target: sequential file

emp_id,name,sal
101,p,200
102,c,300

while running the job it should generate a report in such a way

header employee details

emp_id,name,sal
101,p,200
102,c,300

footer current date

whether datastage can handle the report generation of the format we require?If so pls explain....
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In before-job subroutine choose ExecSH and execute an echo command to write the header line.
echo Employee Details > #filename#

In the sequential stage name #filename#, but choose Append To File

In after-job subroutine choose Exec SH and execute an echo command to append the current date as the trailer line.
echo `date` >> #filename#
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