Page 1 of 1

Get Timestamp and Row count

Posted: Wed Jan 05, 2005 2:59 pm
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

Posted: Wed Jan 05, 2005 3:45 pm
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.

Posted: Wed Jan 05, 2005 4:38 pm
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