Page 1 of 1

Getting DataStage Job Names and Category

Posted: Fri May 26, 2006 1:55 pm
by ririr
I tried TCL run the following in Command Stage. But it is throwing verb not in VOC.

"COMO ON \\Server\directory\JobNames.txt, LIST DS_JOBS COMO OFF".

I am trying to load DS job names into a file.

Thanks

Posted: Fri May 26, 2006 2:57 pm
by DSguru2B
use the universe stage with dsn localuv, and run the following sql

Code: Select all

select Name from DS_JOBS
You can save it in a file. For categories, look for //<category>//<subcategory>. This way you can get both job names and category names.
Regards,

Posted: Fri May 26, 2006 3:48 pm
by kduke
select NAME, CATEGORY from DS_JOBS;

Posted: Fri May 26, 2006 5:12 pm
by ray.wurlod
COMO ON can not take a pathname. It only takes a simple file name, and creates this file in the &COMO& directory in your project.

If you want to use a different location you might like to investigate the DIVERT.OUT command as an alternative but even then you will need to create a file pointer to the directory where you want to create the file.

You could also use SETPTR to specify a "print to disk" channel (mode 3) and use that channel number with the LPTR keyword in your query. In this case the file is written in the &HOLD& directory in the project. The file name is specified by the BANNER option of SETPTR command.

To execute multiple commands, they need to be delimited. You have three commands but only two delimiters.

Posted: Fri May 26, 2006 6:30 pm
by ririr
Thank you much all for all your replies. I will try both options.