Get Timestamp and Row count

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
dsrules
Premium Member
Premium Member
Posts: 76
Joined: Sun Nov 28, 2004 8:56 pm

Get Timestamp and Row count

Post by dsrules »

Hi,
I am trying to get the start and end timestamp and row count for a job and store them in a table. I know there are various DS functions to do this. But I dont know the procedure of using them for my need. Do I have to use them in Job control window?. There is also a DSJobReport that can be used as a After Subroutine in Transformer Stage. But then I would have to parse it for timestamp and row count.
Thanks
Mack
______________________________________
"Everytime I close the door on reality, it comes in through the windows." - Jennifer Yane
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Hello DSRULES,

I would solve your issue with a simple Datastage Job that accepts a text parameter and whose job is a source file -> transform -> target table job. The contents of the source file are irrelevant, just have a flat file with 1 row. The Transform uses @DATE and @TIME to put the current date & time into whatever database format you require and the parameter (which contains text information such as the calling job name) into your target table. You can trigger calls to this job through the before-job and after-job routines.
dsrules
Premium Member
Premium Member
Posts: 76
Joined: Sun Nov 28, 2004 8:56 pm

Post by dsrules »

Arnd,
I also need row count. I found a post in which Ray walks through parsing the GetJobReport file . The post is viewtopic.php?t=90193. But in this way how can I automate the process of knowing the file name. The file name is

Code: Select all

JobName_YYYYMMDD_HHMMSS.txt 
I want the file name to be automated when I run this job for getting the required values. I was thinking of DS Functions , but dont have much idea about the job control coding and how to use the functions.
Thanks
Mack
______________________________________
"Everytime I close the door on reality, it comes in through the windows." - Jennifer Yane
Post Reply