Add total record count and total reject count in log file.

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
Kel
Participant
Posts: 31
Joined: Mon May 11, 2015 3:20 am
Location: Robinsons Cybergate Tower 2
Contact:

Add total record count and total reject count in log file.

Post by Kel »

Hi,

I have a log file which registers rejected records and is being used by 3 separate jobs executed as follows: Job1>Overwrite Log File; Job2> Append Log File; Job3>Append Log File. The Log file looks something like this.

Co11~Col2~Col3~Col4~Col5~Col6
0123456~132455~987654678~ADDRNUMBER~1234566~1

My requirement is to add Total Record Counts and Total Rejected Counts on top of the log file from the 3 jobs. The log file now needs to look something like this.

Total Record Count: 100
Total Rejected Count: 2

Co11~Col2~Col3~Col4~Col5~Col6
0123456~132455~987654678~ADDRNUMBER~1234566~1

Has anyone done something like this in Datastage? Any inputs will be highly appreciated.

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

Post by ray.wurlod »

Write the new lines, and any required empty lines, to a dummy file. Then use TYPE command to append the log file. Then delete the log file, and rename the dummy file. The first of these steps is probably done with a fourth DataStage job, the others can be done in an after-job subroutine invoked from that job.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Kel
Participant
Posts: 31
Joined: Mon May 11, 2015 3:20 am
Location: Robinsons Cybergate Tower 2
Contact:

Post by Kel »

ray.wurlod wrote:Write the new lines, and any required empty lines, to a dummy file. Then use TYPE command to append the log file. Then delete the log file, and rename the dummy file. The first of these steps is pr ...
Hi , I cannot get any insight from your reply since I'm not a premium member. Job Pay is just enough to survive the next cutoff :cry: . Anyways, Are you saying that I should create a new job with a dummy file where I count the total and reject records and then combine it with the existing log file into a new log file? Am I getting the idea or I'm nowhere near?

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

Post by ray.wurlod »

You're getting the idea and, when you get your premium membership, you'll also get the technique for accomplishing it.

Premium membership is the mechanism by which the hosting and bandwidth costs of DSXchange are funded. We prefer that mechanism to allowing advertisements on the site.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

and please delete other two posts with same question.

Moderator: done
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Post Reply