How to write a unix condition
Moderators: chulett, rschirm, roy
How to write a unix condition
Hi
How to configure a condition to execute a sequence task only when there are rows in a file.
How to write a condition to execute a sequence task either when there are warning messages or when there are no warning messages in the preceding task.
How to configure a condition to execute a sequence task only when there are rows in a file.
How to write a condition to execute a sequence task either when there are warning messages or when there are no warning messages in the preceding task.
Last edited by pradkumar on Thu Nov 20, 2008 5:39 pm, edited 4 times in total.
Couple of options. You can execute the UNIX command "test -s" which returns true if the file exists and has a size greater than zero. You could then "not" that or handle that appropriately in your triggers, such that only an empty / zero byte file triggers the next process.
You could also use a generic routine that leverages the DSGetLinkInfo function with the DSJ.LINKROWCOUNT InfoType to check whatever link in the job is responsible for writing to that file to see if records went down that link. Provided, of course, there is a job creating the file.
You could also use a generic routine that leverages the DSGetLinkInfo function with the DSJ.LINKROWCOUNT InfoType to check whatever link in the job is responsible for writing to that file to see if records went down that link. Provided, of course, there is a job creating the file.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 27
- Joined: Thu Mar 20, 2008 11:55 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Why in the hell do something like that?
As to the filename question:
http://www.soccerhelp.com/Soccer_Tips_D ... html#cards
As to the filename question:
http://www.soccerhelp.com/Soccer_Tips_D ... html#cards
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 27
- Joined: Thu Mar 20, 2008 11:55 am
I wish admin to edit the question(to get back the previous post) and warn the user.
The edit permissions should be taken off for the Questions after the Question gets replies, to avoid these kind of situations.
The edit permissions should be taken off for the Questions after the Question gets replies, to avoid these kind of situations.
Last edited by filename.txt on Thu Nov 20, 2008 2:52 pm, edited 1 time in total.
Thanks.
"Creativity is the ability to use your available resources to their fullest."
"Creativity is the ability to use your available resources to their fullest."
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I disagree. Sometimes it is needful to go back to correct spelling and so forth.
What really should happen is that pradkumar should re-edit the original post and reinstate the questions that ought never to have been removed, and apologize.
Otherwise we may have to start using pratkumar as his appellation.
What really should happen is that pradkumar should re-edit the original post and reinstate the questions that ought never to have been removed, and apologize.
Otherwise we may have to start using pratkumar as his appellation.
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:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: