Job Sequencer

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:

Job Sequencer

Post by rajeev_prabhuat »

Hi,

Can we have a sequencer inside existing sequencer in DS 7.x

Regards,
Rajeev Prabhu
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You can run a different sequence from within a sequence if that is your question. Most posts call this a child sequence. A sequence is just another job as far as DataStage is concerned.
Mamu Kim
rajeev_prabhuat
Participant
Posts: 136
Joined: Wed Sep 29, 2004 5:56 am
Location: Chennai
Contact:

Post by rajeev_prabhuat »

Hi Kim,

My requirment is like this, i want to schedule the same set of jobs at two different set of times and based on the two different databases, one is from production and if it fails we creat a indicator file saying the connection to production failed and second time i want to connect to backup and do the ETL process so i want it to be done with the same set of jobs in one sequence, can this be done if so let me know how it has to be done.

Regards,
Rajeev Prabhu
kduke wrote:You can run a different sequence from within a sequence if that is your question. Most posts call this a child sequence. A sequence is just another job as far as DataStage is concerned.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

If production and backup instances are identical in every way except connection credentials, simply parameterize your connection credentials (dsn, userid, password).

Run the sequence giving it the production credentials, which in turn propagates the connection credentials in the sequencer to its job stages. If you need to run the sequence again, run it with the backup credentials. You only need 1 copy of the jobs and controlling sequencer. The trick is in the parameter usage.
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. Can give me a logic to get the parameters for two different DSN by using the same sequence, i was thinking to write a routine, but till now i have not written any so can you help me wiriting the same.

Regards,
Rajeev Prabhu
kcbland wrote:If production and backup instances are identical in every way except connection credentials, simply parameterize your connection credentials (dsn, userid, password).

Run the sequence giving it the production credentials, which in turn propagates the connection credentials in the sequencer to its job stages. If you need to run the sequence again, run it with the backup credentials. You only need 1 copy of the jobs and controlling sequencer. The trick is in the parameter usage.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Since the job sequence is a DataStage job in its own right it, too, has job parameters, which you edit in the usual way in the usual location.

Having done that, when filling in the parameters for a job (or job sequence) specified in a Job Activity you can click on "Insert Job Parameter" to be presented with a list of parameters that you filled in in step 1 above.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rajeev_prabhuat
Participant
Posts: 136
Joined: Wed Sep 29, 2004 5:56 am
Location: Chennai
Contact:

Post by rajeev_prabhuat »

Hi,

Thanks you very much i hope this works out. What i understood is like this, we maintain two different sequencer which has parameters for diferent DSN am i right.

I have another doubt, i want to run the job automatically once i schedule it, because i am running the job during mid night, it should not prompt for the parameters, can this be done if we set the default parameters.

Regards,
Rajeev Prabhu
ray.wurlod wrote:Since the job sequence is a DataStage job in its own right it, too, has job parameters, which you edit in the usual way in the usual location.

Having done that, when filling in the parameters for a job (or job sequence) specified in a Job Activity you can click on "Insert Job Parameter" to be presented with a list of parameters that you filled in in step 1 above.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

You are prompted for job parameters at the moment that you add it to the schedule, when it comes time to execute the job will not reprompt for parameters, it will run with the ones you chose when you scheduled it.

No user interaction is required to start a scheduled job.
rajeev_prabhuat
Participant
Posts: 136
Joined: Wed Sep 29, 2004 5:56 am
Location: Chennai
Contact:

Post by rajeev_prabhuat »

Hi,

Thank you Vincent McBurney.

Can you help me in wiriting an simple routine in Parallel, using a if else condition. My requirment is as follows, i want to check time and if the time is less than 3 i want o get value "PROD", else "DEV". Please help me because i am not expert in wirting or rather nill in wiriting routines.

Regrads,
Rajeev Prabhu
vmcburney wrote:You are prompted for job parameters at the moment that you add it to the schedule, when it comes time to execute the job will not reprompt for parameters, it will run with the ones you chose when you scheduled it.

No user interaction is required to start a scheduled job.
T42
Participant
Posts: 499
Joined: Thu Nov 11, 2004 6:45 pm

Post by T42 »

Have you ever develop in any programming languages before you are using DataStage?

If not, I would suggest that you learn one, so you can have a better understanding on passing parameters, and other functions.

DataStage is a programming language that is best understood by developers who have experiences in the past with developing in C/C++/Visual Basic/Perl/Et cetera.

* * *

You need to make a job parameter, and assign the job parameter to the stage's variables. That way, when you call the job, you can adjust from DEV to PROD. This is like having parameters on the command line that get used within the program.
rajeev_prabhuat
Participant
Posts: 136
Joined: Wed Sep 29, 2004 5:56 am
Location: Chennai
Contact:

Post by rajeev_prabhuat »

Hi,

Thank you for your suggestions and i will go through it.

Regards,
Rajeev Prabhu
T42 wrote:Have you ever develop in any programming languages before you are using DataStage?

If not, I would suggest that you learn one, so you can have a better understanding on passing parameters, and other functions.

DataStage is a programming language that is best understood by developers who have experiences in the past with developing in C/C++/Visual Basic/Perl/Et cetera.

* * *

You need to make a job parameter, and assign the job parameter to the stage's variables. That way, when you call the job, you can adjust from DEV to PROD. This is like having parameters on the command line that get used within the program.
Post Reply