Unix scripts from Datastage job

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
psriva
Participant
Posts: 44
Joined: Fri Aug 11, 2006 8:40 am

Unix scripts from Datastage job

Post by psriva »

Is there any way we can execute a UNIX script from a Datastage job ?
ps
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

Are you on Windows or Unix?
Kris

Where's the "Any" key?-Homer Simpson
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Re: Unix scripts from Datastage job

Post by meena »

Hi

Yes,Execute command activity in the sequencer.
Is there any way we can execute a UNIX script from a Datastage job ?
psriva
Participant
Posts: 44
Joined: Fri Aug 11, 2006 8:40 am

Post by psriva »

I am on the grid. (Not windows.)
ps
jatayl
Premium Member
Premium Member
Posts: 47
Joined: Thu Jan 19, 2006 11:20 am
Location: Rogers, AR

Post by jatayl »

psriva wrote:I am on the grid. (Not windows.)
You can either use an Execute Command in the Job Sequence, or you can go into your job parameters, and execute the unix script either as a pre- or post-command.

TAZ
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

(1) Before/after subroutine in job
(2) Call DSExecute() subroutine with "SH" as Arg1
(3) Execute Command activity in job sequence

(There are other ways, but these are the most commonly used.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Ray - Iam curious to know the rest. I guess Filter option will be one among it.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
psriva
Participant
Posts: 44
Joined: Fri Aug 11, 2006 8:40 am

Post by psriva »

Hi Ray,

Thank for the answers. But DSExecute says that the "Command option" (withing the DSExecute) should not prompt for an input (like below).
_____________________________________________________________
Call DSExecute(ShellType, Command, Output, SystemReturnCode)

ShellType (input) specifies the type of command you want to execute and is either "NT" or "UV" (for DataStage Engine)).

Command (input) is the command to execute. Command should not prompt for input when it is executed.
-------------------------------------------------------------------------------------

And I need to execute a UNIX script from within a Datastage job. So do you think I can do this with the DSExecute or should I use some other command.
ps
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Shell type will be 'UNIX'
Command will be the fully qualified path of your script within quotes.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It's correct that scripts can not prompt for input when invoked from DataStage (by whatever method). This is because DataStage processes are background processes.

Nowhere in this thread has any requirement to prompt for input been mentioned. Therefore all answers given have been valid.

Do you REALLY want to invoke an interactive script in a non-interactive environment? Why? If so, make a "here script" that can supply the inputs.

If you had provided some kind of insight as to what you want to do, maybe more exact answers could have been given.

It was not necessary to send a Private Message as well.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply