error using Before job sub routine

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
Svengiyil
Participant
Posts: 25
Joined: Tue May 05, 2009 12:16 am

error using Before job sub routine

Post by Svengiyil »

Hi

I have to place a file from target directory to source directory before the job run is complete, for which i'm using a DOS script and running it in the before job sub routine.

while running the job , its throwing an error which says

BeforeJob (ExecDOS): Error when executing command: H:\path1\Script\script1 H:\path2\Target\HALO\\smp17.txt H:\path3\Source\HALO\\smp17.txt
*** No output from command ***

Job stopped - before-job routine returned error: Error 1 returned from BEFORE routine DSU.ExecDOS


where script1 is the dos script
H:\path2\Target\HALO\\smp17.txt is the file in the target dir
H:\path3\Source\HALO\\smp17.txt is the file in the source dir.

However the file is actually getting placed in the source directory as expected but the job is getting aborted after that.

Appreciate you help

Thanks,
Svengiyil
Svengiyil
Participant
Posts: 25
Joined: Tue May 05, 2009 12:16 am

Post by Svengiyil »

I just got my solution from the reply given by Arndw in the below link
viewtopic.php?t=103857&highlight=Job+st ... SU.ExecDOS,

However i have a concern here, i finally specified

H:\path1\Script\script1 H:\path2\Target\HALO\\smp17.txt H:\path3\Source\HALO\\smp17.txt H:\ |dir

the path mentioned above(source,target and script path) will not be hardcoded when it is moving into production, so will there be a problem in hardcoding H:\ |dir as it is?

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

Post by chulett »

As long as there is an H: drive there, I would assume you'd be fine.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Post by Kryt0n »

Svengiyil wrote:I just got my solution from the reply given by Arndw in the below link
viewtopic.php?t=103857&highlight=Job+st ... SU.ExecDOS,

However i have a concern here, i finally specified

H:\path1\Script\script1 H:\path2\Target\HALO\\smp17.txt H:\path3\Source\HALO\\smp17.txt H:\ |dir

the path mentioned above(source,target and script path) will not be hardcoded when it is moving into production, so will there be a problem in hardcoding H:\ |dir as it is?

Thanks,
Svengiyil
The solution in the link was to add a " | dir" not "<dir> | dir". The reason they had a "C:" is because it is the target directory for the unzip command. Have you tried running your job without the last "H:/"?
Post Reply