Page 1 of 1

Repository structure folders on a routine

Posted: Wed Jul 17, 2013 4:48 am
by CLOPES
Hi everyone,

i'm writing a job to get all the instances and jobs logs from the project.
Can i get somewhere the job folder seen in the director using a Datastage Basic function ?

Thank you


Carlos.

Posted: Wed Jul 17, 2013 6:33 am
by chulett
How is your job designed, what sources and/or API are you using? The 'folder' is called CATEGORY in the DS_JOBS table, by the way.

Posted: Wed Jul 17, 2013 7:23 am
by chulett
I'm not aware of any DSGetJobInfo InfoType that would return the category, you may need to query the repository directly if you need that.

Posted: Wed Jul 17, 2013 7:25 am
by CLOPES
ok

Thanks for the HTML tags anyway.

Posted: Wed Jul 17, 2013 7:40 am
by chulett
Others may know more better than me on the DSGetJobInfo() thing as I can't test as I have no DataStage access. I do seem to recall that the command line dsjob version does include that information but you don't really want to be shelling out to the O/S on every row. Otherwise a lookup to a Universe or Hashed File stage should do the trick. Basically:

SELECT CATEGORY FROM DS_JOBS WHERE NAME = 'YourJobName'

Posted: Wed Jul 17, 2013 8:20 am
by ArndW
I believe that there isn't a DSGetJobInfo() code which will return the category. I have always retrieved this information by reading the DSJOBS file and parsing the category out of that.

Posted: Wed Jul 17, 2013 4:37 pm
by ray.wurlod

Code: Select all

Trans("DS_JOBS", vJdName, 3, "X")