Page 1 of 1

Executing a Perl Script Through DataStage job/Sequence

Posted: Wed May 19, 2010 10:05 pm
by DSFreddie
Hi All,

Request your help in resolving an issue with executing a Perl Script through DataStage.

I have a Perl Script that needs to be executed through DataStage. This Perl Script has 10 parameters. ( 6 Mandatory & 4 optional paramaters).

What are the different ways of executing this Perl Script through DataStage.

1) We can do it through Execute Command Activity, but how can we define the optional parameters there.
2) How abt creating a Wrapper Stage?
3) Any other possibilities?

Thanks a lot ....

Freddie.

Posted: Wed May 19, 2010 10:29 pm
by chulett
1) Seems to me you just include all ten and sometimes (as needed) leave any of the last four empty. :?

Posted: Mon May 24, 2010 10:49 am
by DSFreddie
The issue is "The values for the Mandatory as well as the Optional Parameters" is coming from the Master scheduler.

Posted: Mon May 24, 2010 1:10 pm
by chulett
Explain how that is an issue. Details, please.

Posted: Tue May 25, 2010 11:16 am
by DSFreddie
The issue here is, as I have 10 parameters (5 Mandatory & 5 optional), when i run the same job multiple times for different Source to Target loading, for few table loading, the optional might/might not have some values.

Here is an example of how the Perl Script & the parameters look like.

./Gbltest.pl -l REPLACE -b 1 -e 1 -r USA_D1 -t DATA_CHANGE2 -p USA_D1 -m issuer_no -c 5 -a last_operation_cd -B BATCH_TEST_SEQ1 -J SCHD_TEST_SEQ1 -L DW -T Table_Name

The issue is if I dont have a value for a parameter, the next value that succeeds it is passed to the previous paramater.

Any thoughts on how to resolve it.

Also, can we resolve this using a Wrapper Stage.

Thanks,
Arun