ReUse of Routines created in server in PX

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

Post Reply
rajeev_prabhuat
Participant
Posts: 136
Joined: Wed Sep 29, 2004 5:56 am
Location: Chennai
Contact:

ReUse of Routines created in server in PX

Post by rajeev_prabhuat »

Hi,

I have a doubt regarding DS routines, i have created 2 routines (one is to get the log details of the job and second is to reset the job) in server job environment, can the same routine be reused in 7x Parallel Extender, i came to hear that we cannot use the same in PX, is this correct, please get back to me on this immediately.

Regards,
Rajeev Prabhu
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Re: ReUse of Routines created in server in PX

Post by kcbland »

rajeev_prabhuat wrote:... please get back to me on this immediately.
We're sorry, but Ascential technical support receives money from customers to respond immediately, we don't. We're here as a courtesy in the spirit of sharing knowledge and improving our craft.

A job cannot call an after-job routine that resets itself. This is managed thru job control code executing in either a Batch job or a Sequencer. It can access itself for the purpose of logging messages. A transformer based routine is not transportable across PX and Server jobs.

If you are using routines to query jobs and their logs, it's best you do this from a Batch job that can be run as part of a jobstream to monitor/poll other jobs in the stream, or even control them.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
rajeev_prabhuat
Participant
Posts: 136
Joined: Wed Sep 29, 2004 5:56 am
Location: Chennai
Contact:

Re: ReUse of Routines created in server in PX

Post by rajeev_prabhuat »

Hi K C Bland,

Sorry, for puting the requirment as immediate. Thankyou for the reply also.

No it is not after job routine that calls the reset job but after completion of the job once again we are checking the status and reseting the job through the Routine and running the job once again. Hope this is fine.

So you mean to say that Transform based routines cannot be exported and imported in PX environment, but can be use the same routine that is created for before/after job subroutine.

Is there any way by which we can use the same Transform based routines to be reused in PX.

Regards,
Rajeev Prabhu


kcbland wrote:
rajeev_prabhuat wrote:... please get back to me on this immediately.
We're sorry, but Ascential technical support receives money from customers to respond immediately, we don't. We're here as a courtesy in the spirit of sharing knowledge and improving our craft.

A job cannot call an after-job routine that resets itself. This is managed thru job control code executing in either a Batch job or a Sequencer. It can access itself for the purpose of logging messages. A transformer based routine is not transportable across PX and Server jobs.

If you are using routines to query jobs and their logs, it's best you do this from a Batch job that can be run as part of a jobstream to monitor/poll other jobs in the stream, or even control them.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Re: ReUse of Routines created in server in PX

Post by kcbland »

rajeev_prabhuat wrote:No it is not after job routine that calls the reset job but after completion of the job once again we are checking the status and reseting the job through the Routine and running the job once again. Hope this is fine.
No, it is not fine. A job cannot use job control APIs on itself, you need to either use a Sequencer or a Batch job to do the controlling.
rajeev_prabhuat wrote: So you mean to say that Transform based routines cannot be exported and imported in PX environment, but can be use the same routine that is created for before/after job subroutine.

Is there any way by which we can use the same Transform based routines to be reused in PX.
There is no "export or import", they are stored in the same design repository. As for using a Server transformation function in a PX transformer, the answer is "only if using the BASIC transformer", not the PX transformer.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
rajeev_prabhuat
Participant
Posts: 136
Joined: Wed Sep 29, 2004 5:56 am
Location: Chennai
Contact:

Re: ReUse of Routines created in server in PX

Post by rajeev_prabhuat »

Hi,

Thankyou for the reply.

Can you guide me how we can use a Sequencer or Batch job do the controlling of the job.

In advance thanks.

Regards,
Rajeev Prabhu
No, it is not fine. A job cannot use job control APIs on itself, you need to either use a Sequencer or a Batch job to do the controlling.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Start with learning the Sequencer. There's a tutorial on the CD, as well as ample documentation. Start but creating a Sequencer job and adding a job activity stage. You'll quickly grasp how the Sequencer can run a job, as well as reset it if necessary. You'll be able to link jobs into a series so that one job runs after another finishes.

As for a Batch job, use Director and use the menu to create a new batch job. Use the Add Job pull down in the editor window and add a job. Look at the logic statements, then read your DS BASIC manual for the wealth of DS* APIs listed therein. Program away!
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
rajeev_prabhuat
Participant
Posts: 136
Joined: Wed Sep 29, 2004 5:56 am
Location: Chennai
Contact:

Post by rajeev_prabhuat »

Hi,

Thank you.

Regards,
Rajeev Prabhu
kcbland wrote:Start with learning the Sequencer. There's a tutorial on the CD, as well as ample documentation. Start but creating a Sequencer job and adding a job activity stage. You'll quickly grasp how the Sequencer can run a job, as well as reset it if necessary. You'll be able to link jobs into a series so that one job runs after another finishes.

As for a Batch job, use Director and use the menu to create a new batch job. Use the Add Job pull down in the editor window and add a job. Look at the logic statements, then read your DS BASIC manual for the wealth of DS* APIs listed therein. Program away!
Post Reply