Page 1 of 1

Job Sequencer

Posted: Tue Nov 30, 2004 6:23 am
by rajeev_prabhuat
Hi,

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

Regards,
Rajeev Prabhu

Posted: Tue Nov 30, 2004 6:56 am
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.

Posted: Tue Nov 30, 2004 9:42 pm
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.

Posted: Tue Nov 30, 2004 9:51 pm
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.

Posted: Tue Nov 30, 2004 10:15 pm
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.

Posted: Tue Nov 30, 2004 11:34 pm
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.

Posted: Wed Dec 01, 2004 12:21 am
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.

Posted: Wed Dec 01, 2004 4:30 am
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.

Posted: Wed Dec 01, 2004 4:37 am
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.

Posted: Wed Dec 01, 2004 2:21 pm
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.

Posted: Wed Dec 01, 2004 9:19 pm
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.