Is there a sleep functionality in DataStage
Moderators: chulett, rschirm, roy
Is there a sleep functionality in DataStage
I want to send rows to a Web Service transformer in a controlled format , is there a sleep functionality in DataStage Server Jobs...
Regards,
Ganesh
Ganesh
Re: Is there a sleep functionality in DataStage
For example, if the number of rows has reached 500 , create a 2 minute delay and then start processing the next set of 500 and then a 2 minute delay and so on..
Regards,
Ganesh
Ganesh
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Yes, several.
There is a SLEEP command (argument in seconds or as HH:MM (24 hour clock)).
There are statements SLEEP (argument in seconds) and NAP (argument in milliseconds) that you can use in a server routine.
You have access to the operating system sleep command by various means.
There is a SLEEP command (argument in seconds or as HH:MM (24 hour clock)).
There are statements SLEEP (argument in seconds) and NAP (argument in milliseconds) that you can use in a server routine.
You have access to the operating system sleep command by various means.
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Commands can not be executed from the Transformer. If you need to sleep while in a Transformer then you need a Routine that the Transformer stage can call.
Code: Select all
FUNCTION Doze(aInterval)
Perform "SLEEP " : aInterval
Ans = 0
RETURN(Ans)
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Even better is to leave out the Perform statement.
Code: Select all
FUNCTION Doze(aInterval)
SLEEP aInterval
Ans = 0
RETURN(Ans)
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Or, for the truly paranoid function developer.
Add generation of warnings, etc., to your heart's desire!
Code: Select all
FUNCTION Doze(aInterval)
Begin Case
Case UnAssigned(aInterval) Or IsNull(aInterval)
NULL ; * do nothing
Case Not(Num(aInterval))
NULL ; * do nothing
Case aInterval <= 0
NULL ; * do nothing
Case @TRUE
* We have a positive number as the argument
SLEEP aInterval
End Case
Ans = 0
RETURN(Ans)
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.
-
- Participant
- Posts: 2
- Joined: Thu Mar 10, 2011 11:27 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
No, because the External Filter stage has to do something with the data on its input link and generate data onto its output link. You could possibly add another command in the pipeline, for example
Code: Select all
sleep 30 && cat -
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.