How to find out total number jobs from the project

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
mandyli
Premium Member
Premium Member
Posts: 898
Joined: Wed May 26, 2004 10:45 pm
Location: Chicago

How to find out total number jobs from the project

Post by mandyli »

Hi

I would like take the inventory of our DS 9.1 environments.

List of project I can able to find via LIST.UV.Account and XMETA query.

SELECT NAME_XMETA FROM XMETA.DATASTAGEX_DSPROJECTC2E76D84;

How will I find out total number of jobs in each project. I am not getting any rows using following query.

select count(*) from ASCLMODEL_JOBDEFB1C497CE;

COUNT(*)
----------
0


Thanks
Man
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

dsjob is the easiest. Build you a shell script.

Code: Select all

dsjob -lprojects |
while read Project
do
   NOJOBS=`dsjob $Project -ljobs | wc -l`
   echo "$Project $NOJOBS"
done
Something like this. Kind of off the top of my head. Should be close to accurate.
Mamu Kim
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

If you have read access to XMETA, here is some SQL that I've used in the past:

Code: Select all

SELECT   J.DSNAMESPACE_XMETA AS PROJECT_NAME,
         J.DSJOBTYPE_XMETA AS JOB_TYPE,
         COUNT(*) AS CNT
FROM     XMETA.DATASTAGEX_XMETAGEN_DSJOBDEFC2E76D84 J
GROUP BY J.DSNAMESPACE_XMETA,
         J.DSJOBTYPE_XMETA
ORDER BY 1, 2
Mike
mandyli
Premium Member
Premium Member
Posts: 898
Joined: Wed May 26, 2004 10:45 pm
Location: Chicago

Post by mandyli »

Thanks Mike.
it helps lot.

I used following query


select J.DSNAMESPACE_XMETA AS PROJECT_NAME,COUNT(*) AS Total_No_Jobs from XMETA.DATASTAGEX_DSJOBDEFC2E76D84 J
GROUP BY J.DSNAMESPACE_XMETA,J.DSJOBTYPE_XMETA
ORDER BY 1;



Thanks
Man
Post Reply