Interesting issue

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Jim

I think it runs in both Windows and UNIX. There a lot of similar products. Most look at file size.

Kim.
Mamu Kim
JDionne
Participant
Posts: 342
Joined: Wed Aug 27, 2003 1:06 pm

Post by JDionne »

kduke wrote:Jim

I think it runs in both Windows and UNIX. There a lot of similar products. Most look at file size.

Kim.
unfortunatly they all need budget money :(
looks like im going back to dos hehehehehe
Sure I need help....But who dosent?
shawn_ramsey
Participant
Posts: 145
Joined: Fri May 02, 2003 9:59 am
Location: Seattle, Washington. USA

Post by shawn_ramsey »

I would just write a Perl script to do the monitoring. I personally prefer having the source system drop a flag or trigger file but you could easaily build a script that watches the size until it stops growing then try to open the file.

Shawn
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

I cautioned you about watching the file size change. You have to be concerned if the feeding process is slow or stalls, your file may not grow and your comparison falsely triggers that the file is done.

Control-M is an enterprise scheduling tool that can run processes on Unix and NT servers. It has file watching capability that can trigger when a file appears, but again, it has the same limitations for file appearance detection. My current client uses Control-M and we inside on "ready" files being watched, never the physical data file.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

We had a similar problem, files being sent by ftp from many sources, DataStage waiting for them to arrive.. We made it a requirement that all files were written to a landing directory and the ftp script was responsible for moving them to a waiting directory. While the ftp may take many minutes to finish a Unix mv command is instantaneous. So when the file arrives in the waiting directory it is ready to process.
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Post by Teej »

vmcburney wrote:We had a similar problem, files being sent by ftp from many sources, DataStage waiting for them to arrive.. We made it a requirement that all files were written to a landing directory and the ftp script was responsible for moving them to a waiting directory. While the ftp may take many minutes to finish a Unix mv command is instantaneous. So when the file arrives in the waiting directory it is ready to process.
Excellent idea!

My idea involves the time stamp of the last update for that file. You know, checking the last inode modification? I never done something like this before, but this is a guarantee method of determining whether the file is last TOUCHED. Not just updated, read, or whatever. Touched. Of course, this would require some serious control of that directory's content so that no passerby could simply do a "cat [filename]" and screwing up the inode timestamp.

-T.J.
Developer of DataStage Parallel Engine (Orchestrate).
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

T.J. -

Back when I was on Tru64, my DBA liked to use "fuser" to help tell if a file was 'done' being ftp'd. If possible, we'd prefer the use of a semaphore file or Vince's rename trick (if we woulda thunk of it!), but for those times when we had absolutely no control over the source system or what they were willing to send or do, he used fuser to tell if a process had the file open. That's what I remember, anyways... you may want to check it out.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Rahul
Participant
Posts: 19
Joined: Wed Oct 29, 2003 10:21 pm

Post by Rahul »

I believe enterprise schedulers are available for almost all flavours of unix and on Windows

-- Rahul
Post Reply