Page 1 of 1
Is there a way for us to name the DSJOBREPORT file?
Posted: Wed Aug 15, 2012 1:41 pm
by DSShishya
Hi all,
I'm using the DSJobReport in after job routine to get all the job details. Now here the DataStage names the report file by itself as JobName_YYYYMMDD_HHMMSS.txt. Is there a way for me to give the report a name of my choice?
Any help is greatly appreciated.
Thanks.
Posted: Wed Aug 15, 2012 2:58 pm
by ray.wurlod
No, but you can rename the report immediately it has been created.
Posted: Wed Aug 15, 2012 4:16 pm
by DSShishya
Hi Ray,
Are you saying that I can rename the file within the after job routine command prompt or manually later?
Thanks
Posted: Wed Aug 15, 2012 11:33 pm
by ray.wurlod
Within the after-job subroutine if you wish. The file is closed before this is executed.
Posted: Thu Aug 16, 2012 6:19 am
by DSShishya
Please forgive my ignorance but..... How do I do that?
Posted: Thu Aug 16, 2012 12:06 pm
by ArunaDas_Maharana
hi,
There could be couple of ways to achieving it.
1. AfterJobsubroutine - go to your -->JOb properties--> under general tab you will find Afterjobsubroutine give your rename command in Input value.
2. if DS is installed in unix , and you are using unix script to call your jobs , after your job finish you can give rename command in your unix script.
Posted: Thu Aug 16, 2012 3:08 pm
by ray.wurlod
Use the supplied after-job subroutine ExecSH to execute your mv command.
Posted: Fri Aug 17, 2012 12:43 am
by vamsi.4a6
@ray.wurlod
We are using DSJobReport in after job routine to get Job Report Details.
How can we use both DSJobReport and ExecSH for a single Job. Please correct me if I am wrong?
Posted: Fri Aug 17, 2012 1:09 am
by ray.wurlod
Wrap them in your own after-job subroutine (using CALL statements). You can use DSExecute rather than ExecSH within your own routine.