Page 1 of 1

ReUse of Routines created in server in PX

Posted: Sun Jan 02, 2005 11:08 pm
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

Re: ReUse of Routines created in server in PX

Posted: Sun Jan 02, 2005 11:53 pm
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.

Re: ReUse of Routines created in server in PX

Posted: Mon Jan 03, 2005 12:19 am
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.

Re: ReUse of Routines created in server in PX

Posted: Mon Jan 03, 2005 8:10 am
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.

Re: ReUse of Routines created in server in PX

Posted: Mon Jan 03, 2005 9:26 pm
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.

Posted: Mon Jan 03, 2005 11:32 pm
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!

Posted: Tue Jan 04, 2005 12:41 am
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!