Container name

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

subrat
Premium Member
Premium Member
Posts: 77
Joined: Tue Dec 11, 2007 5:54 am
Location: UK

Container name

Post by subrat »

Hi,

I want to retrive the conatiner name from a list of job name (if it is being used in the job)

Can i do it through DSGetJobInfo. If yes please do let me know how to proceeds..

Thanks
Subrat
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Try it and let us know. You can not use DSJ.STAGELIST (which is only active stages) but DSJ.STAGELIST2 (passive stages) or DSJ.FULLSTAGELIST (all stages) might include container names.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
subrat
Premium Member
Premium Member
Posts: 77
Joined: Tue Dec 11, 2007 5:54 am
Location: UK

Post by subrat »

Hi,

controllerList=DSGetStageInfo (JobHandle,<StageName>,DSJ.FULLSTAGELIST)

I am using the DSJ.FULLSTAGELIST above but not sure about the 2nd argument.

Can anyone focus some light on it.(i am looking for the container for each job)....


Thanks
Subrat

ray.wurlod wrote:Try it and let us know. You can not use DSJ.STAGELIST (which is only active stages) but DSJ.STAGELIST2 (passive stages) or DSJ.FULLSTAGELIST (all stages) might include container names. ...
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

DSJ.JOBFULLSTAGELIST is a DSGetJobInfo option. Note the 'JOB' prefix which you are missing. Check the online help for the syntax if you are unsure.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

My bad - I was replying from memory.
:oops:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
subrat
Premium Member
Premium Member
Posts: 77
Joined: Tue Dec 11, 2007 5:54 am
Location: UK

Post by subrat »

Thanks Ray and Craig for your valuable suggestion..

I am getting the whole list of stages(including the container) through the DSJ.STAGELIST or DSJ.FULLSTAGELIST in comma delimited form.

Could you please suggest if i can retirve only the container name from this list. any orther alternative...

Below is how i am getting the result


Ctaar_Mdfy,DwhCtaAr_Cpy,pscHistoryProcess.Difference,pscHistoryProcess.InsertsAndUpdates,dwh__Peek,pscHistoryProcess.HP_Rejects

(pscHistoryProcess is my container here)...

Thanks
Subrat

ray.wurlod wrote:My bad - I was replying from memory.
:oops:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Looks to me like you can take that list and look for stage names with a 'dot' in them, the portion before the dot seems to be the Container name.
-craig

"You can never have too many knives" -- Logan Nine Fingers
subrat
Premium Member
Premium Member
Posts: 77
Joined: Tue Dec 11, 2007 5:54 am
Location: UK

Post by subrat »

Thats correct Craig,

But not sure how to take only the word having end with '.'
(As that is my container)

chulett wrote:Looks to me like you can take that list and look for stage names with a 'dot' in them, the portion before the dot seems to be the Container name. ...
subrat
Premium Member
Premium Member
Posts: 77
Joined: Tue Dec 11, 2007 5:54 am
Location: UK

Post by subrat »

Thats correct Craig,

But not sure how to take only the word having end with '.'
I mean how to implement same in BASIC.
(As that is my container)

chulett wrote:Looks to me like you can take that list and look for stage names with a 'dot' in them, the portion before the dot seems to be the Container name. ...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

SELECT NAME AS CONTAINER_NAME
FROM DS_JOBOBJECTS
WHERE (OBJNAME LIKE 'C_' OR OBJNAME LIKE 'C__')
AND OBJIDNO IN (SELECT JOBNO FROM DS_JOBS WHERE NAME = '<<Job name>>');
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
subrat
Premium Member
Premium Member
Posts: 77
Joined: Tue Dec 11, 2007 5:54 am
Location: UK

Post by subrat »

Hi Ray,

Could you please paste the code once more as i am not a premier customer now(likely to be a soon). or you can email me... in
subrat.ksatpathy@gmail.com

Moreover it seems i need to pass jobname manually everytime in the query. As i have already list of job names can i do it in a better way instead of passing it manually.

Thanks
Subrat
ray.wurlod wrote:

Code: Select all

SELECT NAME AS CONTAINER_NAME
FROM DS_JOBOBJECTS
WHERE (OBJNAME LIKE 'C_' OR OBJNAME LIKE 'C__')
AND OBJIDNO IN (SELECT JOBNO FROM DS_JOBS WHERE NAME = '<<Job name>>'& ...[/quote]
aakashahuja
Premium Member
Premium Member
Posts: 210
Joined: Wed Feb 16, 2005 7:17 am

Post by aakashahuja »

you have a handfull of containers.. so just dont grep on the output. Use a pattern file with container names in them.
L'arrêt essayant d'être parfait… évoluons.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

subrat wrote:Could you please paste the code once more as i am not a premier customer now(likely to be a soon). or you can email me
Premium memberships is one of the ways that the hosting and bandwidth costs of DSXchange are funded. I am not prepared to create a precedent that might threaten the existence of this site.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
subrat
Premium Member
Premium Member
Posts: 77
Joined: Tue Dec 11, 2007 5:54 am
Location: UK

Post by subrat »

Hi Ray,

Could you please let me know the condition you used in the inline view after

SELECT JOBNO FROM DS_JOBS WHERE NAME = '<<Job name&g ...

Thanks
Subrat
ray.wurlod wrote:
subrat wrote:Could you please paste the code once more as i am not a premier customer now(likely to be a soon). or you can email me
Premium memberships is one of the ways that the hosting and bandwidth costs of DSXchange are funded. I am not prepared to create a precedent that might threaten the existence of this site.
subrat
Premium Member
Premium Member
Posts: 77
Joined: Tue Dec 11, 2007 5:54 am
Location: UK

Post by subrat »

Hi Ray,

Could you please let me know the condition you used in the inline view after

SELECT JOBNO FROM DS_JOBS WHERE NAME = '<<Job name&g ...

Thanks
Subrat
ray.wurlod wrote:
subrat wrote:Could you please paste the code once more as i am not a premier customer now(likely to be a soon). or you can email me
Premium memberships is one of the ways that the hosting and bandwidth costs of DSXchange are funded. I am not prepared to create a precedent that might threaten the existence of this site.
Post Reply