creating an output record if input count is 0

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
dnat
Participant
Posts: 200
Joined: Thu Sep 06, 2007 2:06 am

creating an output record if input count is 0

Post by dnat »

Hi,

I am creating a statistics file in a job based on the count in the incoming link. I have aggregators to count the number of records. But if there are no records o.e zero records in the input link, it is creating a 0 byte output file , which is normal. But i want to create an output file(which is a fixed width file) and specify the count as 0. so i want to output space(10):0 for a column in the output file.
Is this possible.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes.

Easiest is an after-job subroutine to test the size of the file and echo the desired value into it if the size is zero. Use ExecSH or even ExecSHSilent.
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