Running job in another project...
Moderators: chulett, rschirm, roy
Running job in another project...
I know you can run a dsjob -run script, but I am looking to run a batch job in Project1 which will kick off a DS job in Project2.
Can this be done through the batch job? with DSAttachJob (JobName, DSJ.ERRFATAL)?
Can this be done through the batch job? with DSAttachJob (JobName, DSJ.ERRFATAL)?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
NO.
Everything done within a batch job (= job conrol routine) is entirely within the project.
What you would need to do is to invoke dsjob with -project and other options, probably via a call to DSExecute with the Shell argument set to the operating system shell value.
Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
Everything done within a batch job (= job conrol routine) is entirely within the project.
What you would need to do is to invoke dsjob with -project and other options, probably via a call to DSExecute with the Shell argument set to the operating system shell value.
Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
No way to trick DSAttachJob to do a change directory?
We have three jobs...
Master1Batch = passes table_name, schema_name, and where clause
CustomerBatch = passes these parameters in a loop to the job
CustomerJob = runs the OCI with the above as dynamic parameters
CustomerJob now sits in another project. If I use dsjob, can I pass these same parameters over to CustomerJob?
We have three jobs...
Master1Batch = passes table_name, schema_name, and where clause
CustomerBatch = passes these parameters in a loop to the job
CustomerJob = runs the OCI with the above as dynamic parameters
CustomerJob now sits in another project. If I use dsjob, can I pass these same parameters over to CustomerJob?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
quote:There's nothing wrong with having a job in Project1 write its parameter values to a text file, and having a job in Project2 read its parameter values from that text file.
No, we do some of that already. The problem is that these jobs are inline with other dependecies after them. Is it possible to run dsjob from a batch job?
[Edit]
OK, I think I have the gist of it now. I kick of DSExecute to call the ksh script. Now, in the ksh script I place my dsjob command.
The batch job that calls DSExecute contains the parameters that I want to pass to ksh for dsjob. Can I place these in the DSExecute line? We have NO documentation at my site. Thanks for the assistance.
[Edit][Edit]
Where do you declare the jobname in dsjob?
No, we do some of that already. The problem is that these jobs are inline with other dependecies after them. Is it possible to run dsjob from a batch job?
[Edit]
OK, I think I have the gist of it now. I kick of DSExecute to call the ksh script. Now, in the ksh script I place my dsjob command.
The batch job that calls DSExecute contains the parameters that I want to pass to ksh for dsjob. Can I place these in the DSExecute line? We have NO documentation at my site. Thanks for the assistance.
[Edit][Edit]
Where do you declare the jobname in dsjob?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
dsjob [ other arguments ] -run projectname jobname
You have ALL the documentation; it is installed with DataStage client software, in a folder called Docs. The only manuals that may be missing are those for plug-in stage types, which are in the Packages folder on the server CD, or downloaded when you download the stage software.
You have ALL the documentation; it is installed with DataStage client software, in a folder called Docs. The only manuals that may be missing are those for plug-in stage types, which are in the Packages folder on the server CD, or downloaded when you download the stage software.
All I have is a one page summary of the DSExecute subroutine. I need some working examples. The one I got off of this site does not work.
Call DSExecute("UV","/datastage/DataStage/Projects/DRDWSysRes/test_run.ksh", Output, ErrCode)
If ErrCode 0 Then
GoTo MissingFiles
End
MissingFiles:
Call DSLogWarn("WARNING WARNING DANGER DANGER", "DimCONTROL")
NormalExit:
Call DSExecute("UV","/datastage/DataStage/Projects/DRDWSysRes/test_run.ksh", Output, ErrCode)
If ErrCode 0 Then
GoTo MissingFiles
End
MissingFiles:
Call DSLogWarn("WARNING WARNING DANGER DANGER", "DimCONTROL")
NormalExit:
OK, problem somewhat solved. See this thread:
http://www.tools4datastage.com/forum/to ... C_ID=83776
http://www.tools4datastage.com/forum/to ... C_ID=83776