Hi all,
Is there a simple way to pevent an ftp if the file doesn't contain any records? My job is currently creating a zero length file. I know I could write an after script to do this but just wanted to confirm that was the only way.
Preventing an ftp if file is zero length
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 560
- Joined: Wed Jul 13, 2005 5:36 am
- Location: Ohio
Re: Preventing an ftp if file is zero length
Check it in unix before you run the job. use If condition likekld05 wrote:Hi all,
Is there a simple way to pevent an ftp if the file doesn't contain any records? My job is currently creating a zero length file. I know I could write an after script to do this but just wanted to confirm that was the only way.
If -s filename then run job else abort
Or use sequencer and use activity stage to check if -s filename returns 1 or 0 and use conditional links to control the flow.
Re: Preventing an ftp if file is zero length
I think he meant Test -s Filename. You can use this in COmmand Actvity Stage or a routine.Krazykoolrohit wrote:Check it in unix before you run the job. use If condition likekld05 wrote:Hi all,
Is there a simple way to pevent an ftp if the file doesn't contain any records? My job is currently creating a zero length file. I know I could write an after script to do this but just wanted to confirm that was the only way.
If -s filename then run job else abort
Or use sequencer and use activity stage to check if -s filename returns 1 or 0 and use conditional links to control the flow.
Re: Preventing an ftp if file is zero length
1)use a contol job and check for the readiness of the file before you call the ftp jobkld05 wrote:Hi all,
Is there a simple way to pevent an ftp if the file doesn't contain any records? My job is currently creating a zero length file. I know I could write an after script to do this but just wanted to confirm that was the only way.
2)Don't create an empty file if there is nothing to write[Meaning change your ftp script which actually does this]
3) use a .ready file as a ftp checker file [Wait for file activity in Sequencer].
some thoughts!
regards,
Prabu