Search for Data File on share drive
Moderators: chulett, rschirm, roy
Search for Data File on share drive
Hi All,
Sorry I'm new on DataStage(InfoSphere). I only used basing stage control in jobs.
What I want?
I would like to (1) check the file on share dirve and once the file found (2)I like to pull through. I think the (2)nd step I can do but , could you please advise me for (1)
What I've done so-far
I was looking one of the control "External_Source" I think it allows to use Batch or Parameters ; If I use this control(stage) control , shoudl I use batch file or use Parameter.
If I use batch file , What shall I write on batch file and how can I link to the control as control only allow me to write the name of batch file
I'm using Parallel job ver 8.7
I hope it make sense.
Regards
Farhan
Sorry I'm new on DataStage(InfoSphere). I only used basing stage control in jobs.
What I want?
I would like to (1) check the file on share dirve and once the file found (2)I like to pull through. I think the (2)nd step I can do but , could you please advise me for (1)
What I've done so-far
I was looking one of the control "External_Source" I think it allows to use Batch or Parameters ; If I use this control(stage) control , shoudl I use batch file or use Parameter.
If I use batch file , What shall I write on batch file and how can I link to the control as control only allow me to write the name of batch file
I'm using Parallel job ver 8.7
I hope it make sense.
Regards
Farhan
Farhan Syed
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Easiest to use would be a sequence with a WaitForFile activity.
Next easiest would be a before-job subroutine using ExecSH to execute a command to check for the file's existence.
Next easiest would be a before-job subroutine using ExecSH to execute a command to check for the file's existence.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Thanks for the reply...
No the source file is not on the ETL Server?
What I've done after your suggestion
Create a new job simple Sequence-Job and
browse the Run.bat file but its not working do I've to pass any parameters
I've run my batch command on cmd window and its working fine but through Sequence job its not?
Please advise
Many thanks
No the source file is not on the ETL Server?
What I've done after your suggestion
Create a new job simple Sequence-Job and
browse the Run.bat file but its not working do I've to pass any parameters
I've run my batch command on cmd window and its working fine but through Sequence job its not?
Please advise
Many thanks
Farhan Syed
The following syntax I've written in my bat file.
The message through Job-Director is as follows:
...
....
10:42:05 Info Testing_Copy_CSV_File.JobControl(@Coordinator):Summary of sequence run()
10:42:05 Finish Job Testing_Copy_CSV_file
Code: Select all
echo "Testing"
REM
REM xcopy /s "T:\Info_Team\Farhan\ETL\DW RFC\CC_xx_Infection_Control\*.csv" "X:\Training\Farhan\Infection_Control\"
xcopy /-y "X:\Training\Farhan\Infection_Control_SAmple_Extractxls.csv" "X:\Training\Farhan\Infection_Control\"
...
....
10:42:05 Info Testing_Copy_CSV_File.JobControl(@Coordinator):Summary of sequence run()
10:42:05 Finish Job Testing_Copy_CSV_file
Farhan Syed
Sorry don't know what happed to my browser posted one reply several times..
After the last post I took following stesp
(1) Reset the job by closing the datastage.
(2) create a fresh job
(3) Deploy "Execute_Command"
(4) Assign the BAT file through browser on "Command" line
G:\Command\Run_Copy_Infection_Control.bat
(5) Now I've added the "Environmental variable whic is default for all jobs
(6) The error is prompting now bere there was no error "fatal error from @taStop): "
I may be making some fundamental mistake.....do I have to use Parameter as this batch filed doesn't required.
Appreciate your help!
Regards
F
After the last post I took following stesp
(1) Reset the job by closing the datastage.
(2) create a fresh job
(3) Deploy "Execute_Command"
(4) Assign the BAT file through browser on "Command" line
G:\Command\Run_Copy_Infection_Control.bat
(5) Now I've added the "Environmental variable whic is default for all jobs
(6) The error is prompting now bere there was no error "fatal error from @taStop): "
I may be making some fundamental mistake.....do I have to use Parameter as this batch filed doesn't required.
Appreciate your help!
Regards
F
Farhan Syed
Yes, that now makes sense, the use of "deploy" confused me, since that usually means to install software or the like.
Are you certain that your sequence log contains no more messages regarding executing this batch? You could also put an "ECHO" command as the first line in the batch to make sure that the batch is being called (You need to specify the path to the batch relative to the server, not your client pc - so drive "G" must be the present viewed from the server).
Are you certain that your sequence log contains no more messages regarding executing this batch? You could also put an "ECHO" command as the first line in the batch to make sure that the batch is being called (You need to specify the path to the batch relative to the server, not your client pc - so drive "G" must be the present viewed from the server).
Thanks to all of you.
Its surprised .. didn't like "xcopy" so I try to use "copy" command and its works
copy "G:\Training\Farhan\Infection_Control_SAmple_Extractxls.csv" "G:\Training\Farhan\Infection_Control\"
Now I'm going to try to copy (Srouce) from outside the ETL SErver lets see its work or not
Regards
F
Its surprised .. didn't like "xcopy" so I try to use "copy" command and its works
copy "G:\Training\Farhan\Infection_Control_SAmple_Extractxls.csv" "G:\Training\Farhan\Infection_Control\"
Now I'm going to try to copy (Srouce) from outside the ETL SErver lets see its work or not
Regards
F
Farhan Syed