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.
Add total record count and total reject count in log file.
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 31
- Joined: Mon May 11, 2015 3:20 am
- Location: Robinsons Cybergate Tower 2
- Contact:
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 cutoffray.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 ...
![Crying or Very sad :cry:](./images/smilies/icon_cry.gif)
Thanks.
BOG
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI