Page 1 of 1

Find Datasets used in Project

Posted: Wed Apr 27, 2011 8:13 am
by dspxguy
Hi,
I need to find out datasets used in a DataStage project.

Code: Select all

>SELECT @ID FROM DS_STAGETYPES WHERE @ID LIKE '%PxDataSet%';            
DS_STAGETYPES                                                           
                                                                        
PxDataSet                                                               

Code: Select all

>SELECT DISTINCT DS_JOBS.NAME JobName, DS_JOBOBJECTS.NAME StageName FMT 
'48L' FROM DS_JOBS, DS_JOBOB                                            
JECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDNO AND DS_JOBOBJECTS.    
OLETYPE LIKE '%PxDataSet%' AND D                                        
S_JOBS.JOBTYPEIND LIKE '3' ORDER BY 1, 2 ;                              
                                                                        
0 records listed.               

Appreciate if someone can help.

Thanks

Posted: Fri Apr 29, 2011 11:34 am
by dspxguy
I was able to find the datasets in the Project but I would also like to find out what is the path for each dataset and if it is an input dataset or output?
I think I can use OLETYPE = 'CCustomOutput' or OLETYPE = 'CCustomIutput'.

Code: Select all

SELECT DS_JOBS.NAME , DS_JOBS.CATEGORY , DS_JOBOBJECTS.OBJTYPE FROM DS_JOBS, DS_JOBOBJECTS WHERE JOBNO IN (SELECT OBJIDNO FROM DS_JOBOBJECTS WHERE EVAL "@RECORD" LIKE '%.ds%');
dsx of a job with dataset:

Code: Select all

Name "dataset"
Value "/proj1/dataset/DataSetjob.ds"
END DSSUBRECORD
BEGIN DSSUBRECORD
Appreciate inputs ....

Thanks

Posted: Mon May 02, 2011 6:22 pm
by BillB
Have a look at some code that I added here viewtopic.php?t=138713. As I said over there, it's not particularly elegant, but it works for me.