Executing a Perl Script Through DataStage job/Sequence

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
DSFreddie
Participant
Posts: 130
Joined: Wed Nov 25, 2009 2:16 pm

Executing a Perl Script Through DataStage job/Sequence

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

1) Seems to me you just include all ten and sometimes (as needed) leave any of the last four empty. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSFreddie
Participant
Posts: 130
Joined: Wed Nov 25, 2009 2:16 pm

Post by DSFreddie »

The issue is "The values for the Mandatory as well as the Optional Parameters" is coming from the Master scheduler.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Explain how that is an issue. Details, please.
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSFreddie
Participant
Posts: 130
Joined: Wed Nov 25, 2009 2:16 pm

Post 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
Post Reply