parameter in the ExecCommand Activity Stage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
fmartinsferreira
Participant
Posts: 142
Joined: Wed Mar 24, 2004 10:51 am
Location: Brazil

parameter in the ExecCommand Activity Stage

Post by fmartinsferreira »

Is it possible to put a parameter in the ExecCommand Activity Stage? :roll:

Thanks,

Fernando
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Yes you can. The command line needs to be an executable and not contain any parameters, but I've done something like make the command line "sh -c " and the command line options then contain "#JobParameterWithUNIXCommand#"
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Be aware that - depending on your version and platform - they may not work. It can be confusing as heck to debug because the command will log correctly with the parameters fully expanded, but the actual command executed will still have the 'unexpanded' parameter name(s) in it.

Test it first.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Craig - do you remember offhand which won't work? I tried it on AIX and it did work, and know I've done it successfully on Windoze in the past.
fmartinsferreira
Participant
Posts: 142
Joined: Wed Mar 24, 2004 10:51 am
Location: Brazil

Post by fmartinsferreira »

ArndW wrote:Yes you can. The command line needs to be an executable and not contain any parameters, but I've done something like make the command line "sh -c " and the command line options then contain "#JobParam ...
It's work! :lol:

Thanks a lot!

Fernando
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I've had the problem here with HP-UX. Definitely saw it under 7.0.1, not sure I've checked again with 7.5.1A.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Thanks for that info; I'll keep that in mind next time I play on HP-UX.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

chulett wrote:I've had the problem here with HP-UX. Definitely saw it under 7.0.1, not sure I've checked again with 7.5.1A.
I have heard the same for the version 7.0. But fortunately, I haven't faced any such issue with the version so far.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply